【发布时间】:2012-09-18 07:42:41
【问题描述】:
可能重复:
What does the question mark and the colon (?: ternary operator) mean in objective-c?
NSString *requestString = (self.isFirstTimeDownload) ? [NSString stringWithFormat:[self.commonModel.apiURLs objectForKey:@"updateNewsVerPOST"],@""] : [NSString stringWithFormat:[self.commonModel.apiURLs objectForKey:@"updateNewsVerPOST"], [[NSUserDefaults standardUserDefaults] objectForKey:@"localnewsupdate"]];
谁能帮我理解这是什么()?和:在Objective-c中? 谢谢!!
【问题讨论】:
-
What does the question mark and the colon (?: ternary operator) mean in objective-c?、What does this mean: NSString *string = NO ? @“aaa” : @“bbb”;、Don't understand this syntax、Objective-C operator (?) and (:)、What does the “?” mean in the following statement?、inactive ? @“inactive”: @“active” syntax? 的可能重复项,
标签: objective-c ios