我的类是UIView,我无法将其更改为UIViewController,因为它被另一个类中的loadNibNamed调用。
我知道presentModalViewController会向UIViewController发送消息,那么我在UIView类中如何解决这个问题呢?
这会导致崩溃,这是正常现象:
[self presentModalViewController ....
尝试了这个,但被叫视图剂量被拉了:
.h
@class Setting;
@interface SettingProfile : UIView ...
Setting *setting;
@property (nonatomic, retain) Setting *setting;
.m
@synthesize setting;
...
[setting presentModalViewController ....
我试过了 this thread ,但没有多大帮助。
答案 0 :(得分:2)