Skip to content

Commit

Permalink
Fix issue with viewDidAppear not being called
Browse files Browse the repository at this point in the history
  • Loading branch information
Qata committed Oct 15, 2019
1 parent dc29027 commit f02e822
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions BarMagnet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@
"$(SRCROOT)/Sources",
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/NSBencodeSerialization-ezakathubkhhsxayghzwbjqodwih/Build/Products/Debug-iphoneos",
);
MARKETING_VERSION = 2.0;
MARKETING_VERSION = 2.0.1;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = consulting.monadic.BarMagnet;
PRODUCT_NAME = BarMagnet;
Expand Down Expand Up @@ -1104,7 +1104,7 @@
"$(SRCROOT)/Sources",
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/NSBencodeSerialization-ezakathubkhhsxayghzwbjqodwih/Build/Products/Debug-iphoneos",
);
MARKETING_VERSION = 2.0;
MARKETING_VERSION = 2.0.1;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = consulting.monadic.BarMagnet;
PRODUCT_NAME = BarMagnet;
Expand Down
8 changes: 4 additions & 4 deletions Sources/View Controllers/QueryTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ - (void)viewDidLoad {
}

- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url {
NSLog("%@", url);
[[TorrentDelegate sharedInstance] handleTorrentFile:url viewController:self];
}

Expand Down Expand Up @@ -79,9 +78,9 @@ - (void)search:(NSString *)text withQuery:(NSDictionary *)query {
[self.navigationController presentViewController:webViewController animated:YES completion:nil];
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationNone];
-(void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationAutomatic];
}

- (void)viewWillDisappear:(BOOL)animated {
Expand Down Expand Up @@ -254,6 +253,7 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
[segue.destinationViewController setQueryDictionary:[sender queryDictionary]];
}
}
segue.destinationViewController.modalPresentationStyle = UIModalPresentationFullScreen;
}

@end
7 changes: 6 additions & 1 deletion Sources/View Controllers/TorrentClientTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ - (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setToolbarHidden:YES animated:NO];
[self selectCurrentClient];
[self.tableView reloadData];
}

- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationAutomatic];
}

- (void)viewWillDisappear:(BOOL)animated {
Expand Down Expand Up @@ -161,6 +165,7 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
[segue.destinationViewController setClientDictionary:sender];
}
}
segue.destinationViewController.modalPresentationStyle = UIModalPresentationFullScreen;
}

@end

0 comments on commit f02e822

Please sign in to comment.