- (void)setupIntroductionViewController{
IntroductionViewController *introductionVC = [[IntroductionViewController alloc] init];
// [self.window setRootViewController:[[BaseNavigationController alloc] initWithRootViewController:introductionVC]];
[self.window setRootViewController:introductionVC];
}
介绍界面的分析:
@interface IntroductionViewController : IFTTTAnimatedPagingScrollViewController
@end
继承自IFTTTAnimatedPagingScrollViewController一个开源的ios动画类库JazzHands,具体可以参考:https://github.com/IFTTT/JazzHands
1、登录和注册按钮
学习第三方Auto Layout库Masonry的初步使用
https://github.com/SnapKit/Masonry
http://draveness.me/ios-yuan-dai-ma-fen-xi-masonry/
2、
学习了解ios适配的初步东西,这部分比较复杂,暂时也不是特别清楚
http://blog.csdn.net/phunxm/article/details/42174937
3、两个判断是否是iphone6和6s的宏
#define kDevice_Is_iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
4、
几个有关屏幕宽高的宏:
#define kScreen_Bounds [UIScreen mainScreen].bounds
#define kScreen_Height [UIScreen mainScreen].bounds.size.height
#define kScreen_Width [UIScreen mainScreen].bounds.size.width
5、
Objective C类方法load和initialize的区别
+ (void)initialize
{
NSString *reqSysVer = @"7.0";
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending) {
_defaultStyleForSystemVersion = SMPageControlDefaultStyleModern;
} else {
_defaultStyleForSystemVersion = SMPageControlDefaultStyleClassic;
}
}
参考:
http://www.cnblogs.com/ider/archive/2012/09/29/objective_c_load_vs_initialize.html
http://justsee.iteye.com/blog/1630979
6、https://github.com/Spaceman-Labs/SMPageControl 开源项目
SMPageControl
页面指示器
ios原生控件:UIPageControl
7、按钮注册点击事件
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button addTarget:self action:@selector(loginBtnClicked) forControlEvents:UIControlEventTouchUpInside];
响应处理:
#pragma mark Action
- (void)registerBtnClicked{
RegisterViewController *vc = [[RegisterViewController alloc] init];
UINavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:vc];
[self presentViewController:nav animated:YES completion:nil];
}
- (void)loginBtnClicked{
LoginViewController *vc = [[LoginViewController alloc] init];
vc.showDismissButton = YES;
UINavigationController *nav = [[BaseNavigationController alloc] initWithRootViewController:vc];
[self presentViewController:nav animated:YES completion:nil];
}
进入另一个试图控制器:
[self presentViewController:nav animated:YES completion:nil];