SGPagingView是第三方,可以使用cocoapods或者自己去github去找包
AppDelegate.h
无
AppDelegate.m
#import "AppDelegate.h"
#import "ViewController.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
ViewController *vc = [[ViewController alloc]init];
vc.title = @"新闻demo";
UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
self.window.rootViewController = nav;
return YES;
}
ViewController.h
无
ViewController.m
#import "ViewController.h"
#import "SGPagingView.h"
#import "oneViewController.h"
#import "twoViewController.h"
#import "threeViewController.h"
#import "fourViewController.h"
#import "fiveViewController.h"
#import "sixViewController.h"
#import "caidanViewController.h"
@interface ViewController ()<SGPageTitleViewDelegate, SGPageContentViewDelegate,UIPopoverControllerDelegate>
@property (nonatomic, strong) SGPageTitleView *pageTitleView;
@property (nonatomic, strong) SGPageContentView *pageContentView;
@property (nonatomic, assign) BOOL isPushNextVC;