小编Ngo*_*yen的帖子

为什么在我的textField清除按钮上调用UIGestureRecognizer?

我有一个带有手势识别器的UITableView:

UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)];
[myTableView addGestureRecognizer:gestureRecognizer];
gestureRecognizer.cancelsTouchesInView = NO;
Run Code Online (Sandbox Code Playgroud)

...当点击tableview以解除键盘时,一切正常.我的问题是,当我点击UITextField上的"清除"按钮时,我的hideKeyboard方法也会调用.很奇怪.

commentTextField = [[UITextField alloc] initWithFrame:CGRectMake(5, 5, 310, 35)];
commentTextField.contentVerticalAlignment =UIControlContentVerticalAlignmentCenter;
commentTextField.borderStyle = UITextBorderStyleRoundedRect;
commentTextField.textColor = [UIColor blackColor]; //text color
commentTextField.font = [UIFont fontWithName:@"Helvetica" size:14.0];  //font size
commentTextField.placeholder = @"Enter a comment...";  //place holder
commentTextField.autocorrectionType = UITextAutocorrectionTypeNo;   // no auto correction support
commentTextField.keyboardType = UIKeyboardTypeDefault;  // type of the keyboard
commentTextField.returnKeyType = UIReturnKeySend;  // type of the return key
commentTextField.clearButtonMode = UITextFieldViewModeAlways;   // has a clear 'x' …
Run Code Online (Sandbox Code Playgroud)

uitableview uigesturerecognizer ios

12
推荐指数
2
解决办法
3137
查看次数

Twitter Reverse Auth iPhone

有没有人能够使用反向身份验证成功获取用户的OAuth令牌?我的应用程序具有反向身份验证权限,但我很难获得有效的身份验证令牌.我正在使用OAuthconsumer,我对如何修改额外的x_auth_mode模式的OAuth调用感到困惑.

我一直在

Failed to validate oauth signature and token
Run Code Online (Sandbox Code Playgroud)

非常感谢任何见解,提前感谢!

api twitter

4
推荐指数
1
解决办法
1902
查看次数

iOS Build中缺少漫画Sans

由于一些奇怪的原因,Comic Sans从我的可用字体列表中消失了.字体不会显示在模拟器或设备上.OS X 10.6.7,10.7,Xcode 4.01或4.2,iOS 4.3或iOS 5.0.它不会出现.

它似乎只是我的计算机,因为我构建的任何其他设备也不会显示该字体.

我在用:

 [UIFont fontWithName:@"ComicSansMS"]
Run Code Online (Sandbox Code Playgroud)

我也尝试过:

   [UIFont fontWithName:@"Comic Sans MS"]
Run Code Online (Sandbox Code Playgroud)

什么都行不通 漫画Sans确实出现在我的电脑上.

感谢您的投入.

iphone

3
推荐指数
3
解决办法
8305
查看次数

无法在Xcode 4中解锁文件进行编辑?

出于某种原因,我的两个文件被锁定,当我点击窗口右上角的小锁图标时,它询问我是否要解锁,这样做会导致"文件xxxx.h不能被锁定解锁"(因未知原因解锁失败).我试图重新启动Xcode,也试图在没有帮助的情况下重启我的机器.

我也无法使用BBEdit编辑文件,我收到错误"你没有足够的权限来执行此操作(MacOS错误代码:-5000)".

我正在使用Xcode 4运行OS X Lion.

非常奇怪,因为在此问题之前我没有对我的系统进行任何更改.任何帮助,将不胜感激.

xcode

2
推荐指数
2
解决办法
2万
查看次数

标签 统计

api ×1

ios ×1

iphone ×1

twitter ×1

uigesturerecognizer ×1

uitableview ×1

xcode ×1