Swipe right to return will be invalid after customizing the return button
//返回按钮
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"return"] style:(UIBarButtonItemStylePlain) target:self action:@selector(back)];
The built-in return button will be overwritten. At this time, the original right slide return will be invalid. You should add a code to make the right slide work normally:
// 解决右滑返回失效问题
self.navigationController.interactivePopGestureRecognizer.delegate = self;
In this case, the controller needs to have a navigation bar. If the navigation bar of the controller is hidden or replaced by a custom view, the navigation bar part will be hidden when returning, so it is recommended to use the system navigation column
In addition: If you perform a refresh operation in viewDidAppear, there will be no right-swiping back to freeze phenomenon.
viewWillAppear:(BOOL)animated; // Triggered when the root view of the view controller is about to be displayed;
viewDidAppear:(BOOL)animated; // Triggered when the root view of the view controller is displayed;