Skip to content

Commit

Permalink
修改Example
Browse files Browse the repository at this point in the history
  • Loading branch information
xhzengAIB committed Aug 31, 2015
1 parent 9a5cea1 commit 2830461
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ - (id)init {
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];

if (self.pullDownRefreshed) {
[self setupRefreshControl];
}
[self setupRefreshControl];
}

- (void)viewDidLoad {
Expand Down
12 changes: 12 additions & 0 deletions XHRefreshControlExample/XHRefreshControlExample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@

@implementation AppDelegate

- (void)setupBarStyle {
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackTranslucent];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UIBarButtonItem appearance] setTitleTextAttributes:@{
NSForegroundColorAttributeName: [UIColor whiteColor],
NSFontAttributeName : [UIFont systemFontOfSize:14],
}
forState:UIControlStateNormal];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[self setupBarStyle];

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ - (void)viewDidLoad

[XHSegueItem initSegueItemWithTitle:@"Pinterest" onClasseName:@"PinterestDemoRefreshTableViewController"],

[XHSegueItem initSegueItemWithTitle:@"网易新闻样式有导航栏的" onClasseName:@"XHDemoTableViewController"],

[XHSegueItem initSegueItemWithTitle:@"网易新闻样式没有导航栏的" onClasseName:@"XHDemoTableViewController"],

[XHSegueItem initSegueItemWithTitle:@"网易新闻样式有导航栏的" onClasseName:@"XHDemoTableViewController"],

[XHSegueItem initSegueItemWithTitle:@"模仿网易新闻4.0网络差的情况" onClasseName:@"XHSimulationNetEaseNetworkErrorViewController"],

Expand Down Expand Up @@ -94,7 +94,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
XHSegueItem *segueItem = self.dataSource[row];

UIViewController *viewController = nil;
if (row == 8) {
if (row == 9) {
viewController = [[DemoCollectionViewController alloc] initWithCollectionViewLayout:[[CollectionViewFlowLayout alloc] init]];
} else {
viewController = [[NSClassFromString(segueItem.className) alloc] init];
Expand Down

0 comments on commit 2830461

Please sign in to comment.