A beginner in iOS Objective C, I need to some help to create a custom tab as shown in the pic.
<a href="https://i.stack.imgur.com/M9OwG.png" rel="nofollow"><img alt="Custom Tab" class="b-lazy" data-src="https://i.stack.imgur.com/M9OwG.png" data-original="https://i.stack.imgur.com/M9OwG.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>
The custom tab will show today's plus 6 days date. Then when user click on the dates, it will call a uRL. I need some pointers if possible. All help is highly appreciated, thank you very much.Answer1:
You could use some third-party segmented controls. For Objective-C is could be <a href="https://github.com/cwRichardKim/RKSwipeBetweenViewControllers" rel="nofollow" title="this">this</a> or <a href="https://github.com/dzenbot/DZNSegmentedControl" rel="nofollow">this</a>, then you get 6 next dates from current date, for example this code adds 1 day to current date and etc.:
NSDateComponents *dayComponent = [[NSDateComponents alloc] init]; dayComponent.day = 1; NSCalendar *theCalendar = [NSCalendar currentCalendar]; NSDate *nextDate = [theCalendar dateByAddingComponents:dayComponent toDate:[NSDate date] options:0]; NSLog(@"nextDate: %@ ...", nextDate);