diff options
author | Vitaly Takmazov | 2020-12-10 18:49:43 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-12-10 18:49:43 +0300 |
commit | aa6e2444af3bb07180550b646ad8f0d3ca78ddfb (patch) | |
tree | f32d436f733109a68555a51eac84163be58eef6d | |
parent | e2f81493ceb395d43e5fc5ee626d294bc2fd0649 (diff) |
Refresh on view appear
-rw-r--r-- | Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata | 2 | ||||
-rw-r--r-- | Juick/ViewControllers/MessagesViewController.m | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 7889985..919434a 100644 --- a/Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/Juick.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ <Workspace version = "1.0"> <FileRef - location = "self:Juick.xcodeproj"> + location = "self:"> </FileRef> </Workspace> diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m index d25f438..536815c 100644 --- a/Juick/ViewControllers/MessagesViewController.m +++ b/Juick/ViewControllers/MessagesViewController.m @@ -25,6 +25,7 @@ NSString* const messageCellIdentifier = @"messageCell"; - (void)viewWillAppear:(BOOL)animated { self.navigationController.visibleViewController.title = self.title; + [self refreshData]; } -(void) refreshData { @@ -107,7 +108,6 @@ NSString* const messageCellIdentifier = @"messageCell"; } self.refreshControl = [UIRefreshControl new]; [self.refreshControl addTarget:self action:@selector(refreshData) forControlEvents:UIControlEventValueChanged]; - [self refreshData]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(newMessage:) name:NewMessageNotificationName object:nil]; } |