项目介绍:
项目简介
Onboard
使用几行代码就能轻松创建创建优美而迷人的体验的iOS框架。
使用方法
在Podfile中添加下列信息并运行pod install
pod ‘Onboard’
Objective-C
OnboardingContentViewController *firstPage = [OnboardingContentViewController contentWithTitle:@”Page Title” body:@”Page body goes here.” image:[UIImage imageNamed:@”icon”] buttonText:@”Text For Button” action:^{
// do something here when users press the button, like ask for location services permissions, register for push notifications, connect to social media, or finish the onboarding process
}];
Swift
let firstPage = OnboardingContentViewController(title: “Page Title”, body: “Page body goes here.”, image: UIImage(named: “icon”), buttonText: “Text For Button”) { () -> Void in
// do something here when users press the button, like ask for location services permissions, register for push notifications, connect to social media, or finish the onboarding process
}
自定义
onboardingVC.topPadding = 20;
onboardingVC.underIconPadding = 10;
onboardingVC.underTitlePadding = 15;
onboardingVC.bottomPadding = 20;
github地址:https://github.com/mamaral/Onboard