When a view loads, i want to see if it's because the user pressed the back button. How can i check this?

推荐答案

The only way to do this so you know for sure that it was the back button is to create a custom button. If you don't know how to do that, check out this tutorial. It won't look exactly like the normal back button, but close. If you need more help, post a comment

Objective-c相关问答推荐

NSMutableDictionary 的深层可变副本

viewWillAppear,viewDidAppear 没有被调用,没有触发

Objective C 中的 RSA 实现

我需要在 ARC 中使用 dealloc 方法吗?

tableView:canEditRowAtIndexPath: 弹出 viewController 时崩溃

为什么 UITableViewCell Select 时所有背景都消失了?

为什么我不应该在 init/dealloc 中使用 Objective C 2.0 访问器?

如何为代码自动格式化设置 Xcode 插件

Obj-C 中的多值枚举

dyld:找不到符号:try 运行 iOS 应用程序时的 _NSURLAuthenticationMethodClientCertificate

无法在 Interface Builder (Xcode 5) 中创建与子视图的出口连接

动画 UIButton 状态变化

当用户点击文本字段外的其他区域时如何关闭键盘?

主队列上的 dispatch_sync 与 dispatch_async

从 iPhone 设备查找当前国家

如何将 NSOperationQueue 与 NSURLSession 一起使用?

xcode 5.1 中的 Arm64 架构

如何更新 Core Data 中的现有对象?

判断 UIViewController 是否即将从导航堆栈中弹出?

如何在 iOS 中创建自定义 UIActivity?