MAOFlipViewController(iOS源代码)

  • N6_967728
    了解作者
  • 214.3KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-15 17:57
    上传日期
来源:github/MAOFlipViewContrLicence:MIT作者:mao     实现折叠式的视图切换效果,可以手指滑动视图来翻转视图。
A020040701-27084.rar
内容介绍
MAOFlipViewController ===================== Usage This is the OSS that provide interacition transition like FlipBoard. ![](introduction.gif) ===================== Demo Project Please open the file below to run the demo project. ``` MAOFlipViewController/Demo/Demo.xcodeproj ``` ===================== Usage Podfile is below. ``` platform :ios, '7.0' pod 'MAOFlipViewController', :git => "https://github.com/nishimao/MAOFlipViewController.git" ``` Please import "MAOFlipViewController.h" only. ``` #import "MAOFlipViewController.h" ``` Please addSubview "MAOFlipViewController's instance" Example below. ``` - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.flipViewController = [[MAOFlipViewController alloc]init]; self.flipViewController.delegate = self; [self addChildViewController:self.flipViewController]; self.flipViewController.view.frame = self.view.frame; [self.view addSubview:self.flipViewController.view]; [self.flipViewController didMoveToParentViewController:self]; } ``` Please implements delegate method. Example below. ``` #pragma mark - MAOFlipViewControllerDelegate - (UIViewController*)flipViewController:(MAOFlipViewController *)flipViewController contentIndex:(NSUInteger)contentIndex { DetailViewController *c = [self.storyboard instantiateViewControllerWithIdentifier:@"DetailViewController"]; c.requestNumberText = [NSString stringWithFormat:@"%d", contentIndex]; return c; } - (NSUInteger)numberOfFlipViewControllerContents { return 5; } ```
评论
    相关推荐