一般写法:
float tempOffset = wordsDisplay == DisPlayBottom ? -80 : 80;

优质写法:

float offset = (DisPlayBottom == wordsDisplay) ? - 80 : 80;

遵循常量放左边的原则

三目运算也可以这么写:
NSString *filetestpaht;
filetestpaht = filetestpaht ? : [NSString stringWithFormat:@"abc"];