
iOS
miechalzhao
这个作者很懒,什么都没留下…
展开
-
iphone swipe left and right
ios 默认的UISwipeGestureRecogner只支持单方向的swipe,为了实现双向swipe 需要在 初始化view中添加如下代码 UISwipeGestureRecognizer *swipe = [[[UISwipeGestureRecognizer all原创 2011-08-02 20:14:18 · 3594 阅读 · 0 评论 -
iphone keyboard
1.在视图控制器中声明UITextField变量#import //#import //#import @interface keyboardViewController : UIViewController { IBOutlet UITextFi原创 2011-08-05 12:38:21 · 2078 阅读 · 0 评论 -
terminate called throwing an exception" SIGABRT UIApplicationMain
问题:启动程序直接挂在UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));并且控制台和堆栈只显示main和UIApplicationMain.解决方法:1.首先排除由于iOS SDK最新版的兼容问题,如果是SDK问题,那直接修改SDK版本。2.针对这种情况,没有多余的有用信息,原创 2012-11-15 18:00:40 · 3323 阅读 · 0 评论 -
xcode 编译静态库
这里以libcurl 为例: 1.首先需要下载 libcurl http://curl.haxx.se/download.html .解压... 2.打开mac上的 terminal :切换到 解压的libcurl 的目录下... 3.编译配置: export CC=/Developer/Platforms/iPhoneOS.platform/De原创 2011-08-16 23:02:28 · 6533 阅读 · 0 评论 -
iphone gamecenter GKErrorDomain code =17
使用gamecenter 下载数据 或者上传数据时,遇到这个问题,说明gamecenter 没有这个ID,解决方法:需要检查程序bundle id中设定的category,是否与itunes connection 上gamecenter配置一致。若刚注册 gamecenter id, 此时下载数据并不会立马生效,需要过一阵子,大概几小时的样子,才能生效。测试的时候需要在沙箱原创 2012-05-28 17:22:52 · 2978 阅读 · 0 评论 -
gamecenter peer - to -peer
iOS GameCenter P2P要想使用GameCenterP2P对战功能,需要了解GKSession详见https://developer.apple.com/library/ios/#documentation/GameKit/Reference/GKSession_Class/Reference/Reference.htmlGKSession可以创建和管理移动网络蓝牙或者本地原创 2012-04-16 22:23:43 · 3352 阅读 · 0 评论 -
objective-c NSMutableDictionary 使用
NSMutableDictionary *tris = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"value1",@"key1",@"value2",@"key2",nil];NSEnumerator *enumerator =[tris keyEnumerator]; NSString* key; while ((key =原创 2012-03-15 22:06:15 · 1981 阅读 · 0 评论 -
willRotateToInterfaceOrientation not called
call use the follow method to do .Observe UIDeviceOrientationDidChangeNotification:[[NSNotificationCenter defaultCenter] addObserver:self se原创 2011-10-10 16:54:59 · 4210 阅读 · 0 评论 -
NSString 与C++ string字符串的互转
1. string 转换为 NSString std::string str("hello"); NSString *str=[NSString stringWithString:str.c_str()]; NSString *istr=[NSString stringWithString:@"zsh"]; str=[istr cStringUs原创 2011-08-29 17:50:40 · 38648 阅读 · 2 评论