@@ -33,7 +33,11 @@ - (id)initWithViewController:(UIViewController *)viewController activities:(NSAr
3333 }
3434
3535 _activities = activities;
36- _activityView = [[REActivityView alloc ] initWithFrame: CGRectMake (0 , UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPhone ? [UIScreen mainScreen ].bounds.size.height : 0 , self .view.frame.size.width, self .height) activities: activities];
36+ _activityView = [[REActivityView alloc ] initWithFrame: CGRectMake (0 ,
37+ UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPhone ?
38+ [UIScreen mainScreen ].bounds.size.height : 0 ,
39+ self .view.frame.size.width, self .height)
40+ activities: activities];
3741 _activityView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
3842 _activityView.activityViewController = self;
3943 [self .view addSubview: _activityView];
@@ -63,18 +67,6 @@ - (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))comp
6367 }
6468}
6569
66- - (void )performBlock : (void (^)(void ))block afterDelay : (NSTimeInterval )delay
67- {
68- block = [block copy ];
69- [self performSelector: @selector (runBlockAfterDelay: ) withObject: block afterDelay: delay];
70- }
71-
72- - (void )runBlockAfterDelay : (void (^)(void ))block
73- {
74- if (block != nil )
75- block ();
76- }
77-
7870- (void )viewWillAppear : (BOOL )animated
7971{
8072 if (UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPhone) {
@@ -107,10 +99,19 @@ - (void)viewDidLoad
10799 [super viewDidLoad ];
108100}
109101
110- - (void )didReceiveMemoryWarning
102+ #pragma mark -
103+ #pragma mark Helpers
104+
105+ - (void )performBlock : (void (^)(void ))block afterDelay : (NSTimeInterval )delay
111106{
112- [super didReceiveMemoryWarning ];
113- // Dispose of any resources that can be recreated.
107+ block = [block copy ];
108+ [self performSelector: @selector (runBlockAfterDelay: ) withObject: block afterDelay: delay];
109+ }
110+
111+ - (void )runBlockAfterDelay : (void (^)(void ))block
112+ {
113+ if (block != nil )
114+ block ();
114115}
115116
116117@end
0 commit comments