문제

So I'm trying trying to print all the days in a month, vertically on a UIScrollView. Here is a mock-up in photoshop of what I'm trying to accomplish:

enter image description here

NSCalendar *cal = [NSCalendar currentCalendar];
NSRange nums = [cal rangeOfUnit:NSDayCalendarUnit inUnit:NSMonthCalendarUnit forDate:[NSDate date]];
NSUInteger numberOfDaysInMonth = nums.length;
NSString *string = [NSString stringWithFormat:@"%d", numberOfDaysInMonth];

Now this is the code I have so far, it finds what month it is then it counts the number of days in the current month. So my problem is I'm really lost on how to print them like I did in my design. Thanks!

도움이 되었습니까?

해결책

I figured it out thanks to Paulw11, he suggested that I use a UITableview. I can't believe I didn't think of that.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top