English 中文(简体)
寻求权利模式(iPhone/Objective C)
原标题:Searching for the Right Pattern (iPhone/Objective C)
问题回答

1. 在您的标语中(无论在哪类微米上都有一个领域)有目前的看法,并实行变革 每一方意见。

那么,你的方法是:

- (void) changeMiniView: (id)sender {
    [self.currentMiniView changeMiniView: [sender selectedSegmentIndex]];
}

如何使用选择?

- (void)viewDidLoad {
    if (self.track) {
        sel = @selector(changeTrackMiniView:);
    } else if (self.waypoint) {
        sel = @selector(changeWaypointMiniView:);
    } else if (self.photo) {
        sel = @selector(changePhotoMiniView:);
    } else if (self.map) {
        sel = @selector(changeMapMiniView:);
    }
}

- (void)changeTrackMiniView:(id)sender {
    ....
}

- (void)changeMiniView:(id)sender {
    [self performSelector:sel withObject:sender];
}




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签