This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UIViewController *)initialViewController { | |
ContentViewController *viewController = [ContentViewController new]; | |
viewController.index = 0; | |
viewController.name = [[ContentController sharedInstance].content[0] description]; | |
return viewController; | |
} | |
- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil]; | |
self.dataSource = [PageViewControllerDataSource new]; | |
self.pageViewController.dataSource = self.dataSource; | |
[self.pageViewController setViewControllers:@[[self.dataSource initialViewController]] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil]; | |
// We need to add the pageViewController as a childViewController (so that the lifecycle methods get called together. And then we can add the main view of the pageViewController to this viewController's main view. | |
[self addChildViewController:self.pageViewController]; | |
[self.view addSubview:self.pageViewController.view]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIPageControl *pageControl = [UIPageControl appearanceWhenContainedIn:[PresentationViewController class], nil]; | |
pageControl.pageIndicatorTintColor = [UIColor darkGrayColor]; | |
pageControl.currentPageIndicatorTintColor = [UIColor blackColor]; | |
pageControl.backgroundColor = [UIColor lightGrayColor]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 40, self.view.frame.size.width, 40)]; | |
[self.view addSubview:self.pageControl]; | |
self.pageControl.numberOfPages = self.dataSource.pageCount; | |
} | |
#pragma mark - UIPageViewController | |
- (void)pageViewController:(UIPageViewController *)pageViewController willTransitionToViewControllers:(NSArray *)pendingViewControllers { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - Debugging Methods | |
- (void)retrieveEntriesFromCloudKit { | |
// Simple request to check to see what is on CloudKit | |
NSPredicate *truePredicate = [NSPredicate predicateWithValue:YES]; | |
CKQuery *query = [[CKQuery alloc] initWithRecordType:EntryRecordKey predicate:truePredicate]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CGFloat margin = 25; | |
@interface SectionHeaderView () | |
@property (nonatomic, strong) UILabel *dateLabel; | |
@property (nonatomic, strong) UILabel *titleLabel; | |
@end | |
@implementation SectionHeaderView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface AvatarView () | |
@property (nonatomic, strong) CAShapeLayer *circleLayer; | |
@end | |
@implementation AvatarView | |
- (id)initWithFrame:(CGRect)frame { | |
self = [super initWithFrame:frame]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CGFloat leftMargin = 50; | |
@interface EventTableViewCell () | |
@property (nonatomic, strong) UIImageView *marker; | |
@property (nonatomic, strong) UILabel *eventTimeLabel; | |
@property (nonatomic, strong) UILabel *titleLabel; | |
@property (nonatomic, strong) UILabel *locationLabel; | |
@property (nonatomic, strong) AvatarView *avatarView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"deacon": { | |
"understand": { | |
"learn": { | |
"bullet": "<ul class=\"bullet\">\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<p>Read <a href=\"https://www.lds.org/scriptures/dc-testament/dc/11.21?lang=eng#20\" onclick=\"newWindow(this.href); return false;\" class=\"scriptureRef\">Doctrine\n\t\t\t\t\t\t\t\tand Covenants 11:21</a>. What promises does the Lord give to those who study His word?\n\t\t\t\t\t\t\tRecord your thoughts in the box below.</p>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<p>You will need a basic understanding and a testimony of gospel truths to\n\t\t\t\t\t\t\tfulfill your duties now as a priesthood holder and in the future as a full-time missionary\n\t\t\t\t\t\t\tand as a husband and father.</p>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<p>Look at the list of <a href=\"https://www.lds.org/young-men/duty-to-god/deacon/understand/act?lang=eng\" class=\"crossRef\">doctrinal topics</a>, and choose\n\t\t\t\t\t\t\tfour or more that you would like to learn about. One of th |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you use Parse for Push Notifications, the tutorial on their site is well written: https://www.parse.com/tutorials/ios-push-notifications | |
// 2 - Add Private-Key.h file and set keys | |
static NSString * const ParseApplicationID = @""; | |
static NSString * const ParseClientKey = @""; | |
// 3 - Register for Push from the applicationDidFinishLaunching method | |
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { |