search

Home  >  Q&A  >  body text

objective-c - 安卓的问题难倒ios开发的

第一个页面是一个按钮 跳转到第二个页面 第二个页面有3种功能 打电话 开网页 发信息 我点击开网页 之后返回会显示一个页面 会显示有一个进程任务 三个同时打开会显示三个进程任务. 用ios怎么解决这个问题

阿神阿神2771 days ago504

reply all(3)I'll reply

  • 阿神

    阿神2017-04-18 09:43:29

    Save the variables of these three interfaces in the first interface, such as a, b, c.
    Refresh the UI in viewWillAppear and display whether there are corresponding tasks a,b,c according to whether a,b,c is nil:

    if (self.a) {
        self.status = "a...";
    }
    if (self.b) {}
    if (self.c) {}

    When opening the interface, first determine the variables:

    if (! self.a) {
        self.a = [... new];
    }
    [self open:self.a];

    reply
    0
  • 阿神

    阿神2017-04-18 09:43:29

    Declare a block in the second interface,
    For example: .h in
    @property (nonatomic,strong) void(^TwoViewBlock)(Nsstring str1,Nsstring str2,Nsstring * str3);

     .m中

    self.TwoViewBlock(@"1",@"2",@"3");

    In the first interface, where to jump,
    vc.TwoViewBlock = ^(Nsstring str1,Nsstring str2,Nsstring * str3){

    if([str1 isEqualToString:@"1"]){
    // Execute the call
    }
    ...
    ...Similarly

    }

    reply
    0
  • PHPz

    PHPz2017-04-18 09:43:29

    Indicates that you don’t understand what you are saying

    reply
    0
  • Cancelreply