[google-toolbox-for-mac] r697 committed - Fix compilation against iOS 7 deployment target.

瀏覽次數:111 次
跳到第一則未讀訊息

google-tool...@googlecode.com

未讀,
2014年10月29日 上午11:41:392014/10/29
收件者:google-tool...@googlegroups.com
Revision: 697
Author: thomasvl
Date: Wed Oct 29 15:41:24 2014 UTC
Log: Fix compilation against iOS 7 deployment target.
https://code.google.com/p/google-toolbox-for-mac/source/detail?r=697

Modified:
/trunk/iPhone/GTMUIFont+LineHeight.m

=======================================
--- /trunk/iPhone/GTMUIFont+LineHeight.m Tue Nov 4 20:10:52 2008 UTC
+++ /trunk/iPhone/GTMUIFont+LineHeight.m Wed Oct 29 15:41:24 2014 UTC
@@ -18,8 +18,15 @@

#import "GTMUIFont+LineHeight.h"

+#import <Availability.h>
+
@implementation UIFont (GTMLineHeight)
- (CGFloat)gtm_lineHeight {
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0
+ // |sizeWithFont:| is deprecated in iOS 7, replaced by |
sizeWithAttributes:|
return [@"Fake line with gjy" sizeWithFont:self].height;
+#else
+ return [@"Fake line with gjy"
sizeWithAttributes:@{NSFontAttributeName:self}].height;
+#endif
}
@end
回覆所有人
回覆作者
轉寄
0 則新訊息