您的位置:首页 > 移动开发 > Objective-C

Object-C 空@selector

2015-09-20 16:22 489 查看
// 空@selector
- (void) :(id)obj
{
    NSLog(@".......");
}
// 有一个参数名为空@selector
- (void)firstSeg:(id)firstObj secSeg:(id)secObj :(id)thirdObj
{
    NSLog(@"%s",__func__);
}
- (void)firstSeg:(id)firstObj secSeg:(id)secObj thirdSeg:(id)thirdObj
{
    NSLog(@"%s",__func__);
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [self :nil];
    [self firstSeg:@"1" secSeg:@"2" :@"3"];
    [self firstSeg:@"1" secSeg:@"2" thirdSeg:@"3"];
    
}


结果

2015-09-20 15:28:55.106 JSStudy[2726:325573] .......
2015-09-20 15:28:55.106 JSStudy[2726:325573] -[ViewController firstSeg:secSeg::]
2015-09-20 15:28:55.106 JSStudy[2726:325573] -[ViewController firstSeg:secSeg:thirdSeg:]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: