【问题标题】:XIB Modal window iosXIB 模态窗口 ios
【发布时间】:2014-12-03 13:56:40
【问题描述】:

如何在objective-c XIB窗口中创建模态窗口? 我创建了一个多列表,现在单击任何行,即在 didSelectRowIndexPath 事件上我想打开一个模式窗口。

【问题讨论】:

    标签: objective-c xib


    【解决方案1】:

    当您在行中选择一个单元格时。定义要在模态视图中显示的视图控制器。

    YourViewController *vc = [[YourViewController alloc] initwithnibname:@"YourViewController" bundle:nil];
    vc.(delegatemethod) = self;
    [self presentViewController:vc animated:YES completion:NULL];
    

    【讨论】:

    • 嗨,我按照以下步骤完成了上述操作:通过 1)@protocol myViewControllerDelegate 2) @property(nonatomic,weak)iddelegate 创建了委托; 3) 从我的基本控制器 --- @interface mybaseController:uiTableViewController。然后在 mybasecontroller 中,我编写了上面所有的代码,它编译得很好,但它进入了 myViewController。
    • 我需要查看此代码。你为什么不尝试调试并检查它在哪里停止??
    猜你喜欢
    • 1970-01-01
    • 2014-09-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-17
    • 1970-01-01
    • 2015-10-27
    • 1970-01-01
    相关资源
    最近更新 更多