84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
UIDevice.currentDevice().performSelector( "setOrientation:", withObject:UIInterfaceOrientation.LandscapeRight )
有如上代码 后面 withObject 的参数是一个 AnyObject 类型的,这样直接传的话会报错,试过几种方法都不行,求大神帮忙。T T
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Repost UIInterfaceOrientation.LandscapeRight.rawValue
UIInterfaceOrientation.LandscapeRight.rawValue
id corresponds to AnyObject?, you define a var with ? and try it:
import Foundation func displayObjectName(yourobject : AnyObject?) { NSLog("%@",yourobject as! String); } var s:String?="Hello,World"; displayObjectName(s);
Repost
UIInterfaceOrientation.LandscapeRight.rawValue
id corresponds to AnyObject?, you define a var with ? and try it: