سؤال

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