草庐IT

button_sent

全部标签

ios - 尝试隐藏键盘时出现 "unrecognized selector sent to instance"

我在UITableView的单元格上有一个文本字段。在UITableViewControoler中,我将其设置为文本字段的委托(delegate),我使用以下方法隐藏键盘-(BOOL)textFieldShouldReturn:(UITextField*)theTextField{if(theTextField==self.nameTextField){[theTextFieldresignFirstResponder];}returnYES;}我可以看到此方法被调用,但当它到达resignFirstResponder时崩溃,并出现错误“无法识别的选择器发送到实例”。我不知道为什么?

ios - 触摸 UITextField 时出现 "message sent to deallocated instance"崩溃

我有一个UIViewController的实现,其中viewDidLoad的代码如下:-(void)viewDidLoad{[superviewDidLoad];//Doanyadditionalsetupafterloadingtheviewfromitsnib.for(inti=0;i0)[selfgetTextField:i].text=speedDial;[selfgetTextField:i].returnKeyType=UIReturnKeyDone;[selfgetTextField:i].delegate=self;}}当我触摸屏幕上的UITextField时,应用程序

iOS 10 [CFString 发布] : message sent to deallocated instance

最近,我将我的iPhone升级到iOS10。我在iPhone上安装了我的应用程序后,我发现当我在我的应用程序中点击一个tableView时,它肯定会崩溃。我在方法cellForRowAtIndexPath中做了一些断点,并在Diagnostics表中选择了ZombieObjects。但是消息[CFStringrelease]:messagesenttodeallocatedinstance0x17063b960总是出现在Debug区。此问题仅出现在iOS10Beta上,我不确定是否是iOS10Beta引起的问题。有没有人像我一样遇到这个问题?我将不胜感激。更新:当它返回cell时,崩溃

ios - 在 Cordova 中使用 Button 进行登录验证后重定向

我是Cordova语言的初学者。我正在尝试在javascript中单击按钮时重定向我的html页面。在validateform方法中,我想重定向到我的主页。我已经尝试了所有可能的事情,例如window.location,document.location。但我没有得到重定向的确切答案。window.onload=function(){document.addEventListener("deviceready",init,false);}functioninit(){varmyButton=document.getElementById("BtnClick");myButton.add

iphone - iOS 开发 : Adding an "Add Friend" button inside my app

我正在构建一个iPhone游戏,它使用GameCenter自动连接寻找游戏的随机玩家。比赛结束后,我想让玩家可以选择将对手添加为游戏中心好友,以便他们以后可以再次玩。如果我有对手的GKPlayer数据,包括他们的playerID和别名,我怎样才能让玩家通过我的应用在GameCenter中将对手添加为好友?或者这只能通过GameCenter应用程序本身实现吗?非常感谢您的帮助! 最佳答案 看起来GKFriendRequestComposeViewController是你想要的?它允许你发送好友请求(甚至有一个预制的模态视图Contro

ios - UIAlertView alertViewShouldEnableFirstOtherButton : disables wrong button on iOS7

我目前正在开发一款需要支持iOS6和iOS7的应用。我正在创建这样的警报:self.newCategoryAlertView=[[[UIAlertViewalloc]initWithTitle:NSLocalizedString(@"MessageTitleNewCategory",nil)message:NSLocalizedString(@"MessageTextNewCategory",nil)delegate:selfcancelButtonTitle:nilotherButtonTitles:NSLocalizedString(@"ButtonOK",nil),NSLocal

ios - 如何在 UINavigatorBar/Button 中有一个 "Back button style"

我有一个UINavigatorBar,并在InterfaceBuilder的左上角放置了一个按钮。简单的问题:按钮是圆形的,如何将按钮设置为“后退式”按钮?(我的意思是,按钮的左侧不是圆形,应该是箭头)。 最佳答案 我只是组合了一个简单的UIViewController子类,它添加了一个可自定义的后退按钮,允许您更改文本颜色。它基本上添加了一些willAppear/willDisappear逻辑来为后退按钮设置动画,就像UINavigationController在使用leftBarButtonItem时所做的那样属性(proper

ios - GKSession 模式对端 : How to automatically connect two peers without any button/confirmation?

我想在两部没有GKPeerPickerController且没有按下任何“连接按钮”的情况下使用GKSession的iPhone之间建立蓝牙连接。我正在使用以下代码:currentSessionAuto=[[GKSessionalloc]initWithSessionID:@"instant-friend-auto"currentSessionAuto.delegate=self;currentSessionAuto.available=YES;currentSessionAuto.disconnectTimeout=5;[currentSessionAutosetDataReceiv

ios - [NSTaggedPointerString objectAtIndex :]: unrecognized selector sent to instance

我的应用程序中的每个UITextfield都有问题。每当UITextfield的实例成为第一响应者时,我的应用程序就会崩溃并显示以下错误消息。有关应用程序的一些详细信息:多语言支持使用Storyboard我的应用程序使用了用户定义的运行时属性,我正试图摆脱它(使用PixateFreestyleSDK来设置UI样式的遗留问题),但Storyboard中仍然有一些属性离开了。在真实设备上测试我在[NSTaggedPointerStringobjectAtIndex:]上设置了一个符号断点,但它似乎没有在应用程序本身崩溃之前捕捉到错误iOS8SDK/Swift/Xcode7.1(也发生在Xc

objective-c - 由于未捕获的异常 'NSInvalidArgumentException' 而终止应用程序,原因 : '-[NSCFString objectForKey:]: unrecognized selector sent to instance

我在主头文件中有如下代码NSMutableArray*array;NSDictionary*dict,*dict1;.m文件包含字典数组,显示商品名称及其相应价格,我在UITableView中显示了它-(NSInteger)tableView:(UITableView*)tablenumberOfRowsInSection:(NSInteger)section{return[arraycount];}-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexP