小编Rav*_*jha的帖子

RegisterUserNotificationSettings在ios 6.1中不起作用

我在我的项目中使用Parse SDK进行推送通知.我已经didFinishLaunchingWithOptions:在parse.com上添加了代码

UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert |
                                                UIUserNotificationTypeBadge |
                                                UIUserNotificationTypeSound);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes
                                                                         categories:nil];


[application registerUserNotificationSettings:settings];
[application registerForRemoteNotifications];
Run Code Online (Sandbox Code Playgroud)

它的工作正常,如果设备或模拟器版本是iOS 8,但它在iOS 6.1中不起作用,并显示消息

[UIApplication registerUserNotificationSettings:]: unrecognized selector sent to instance 0x208406c0

谁能告诉我怎么解决呢?

objective-c ios parse-platform ios8

9
推荐指数
1
解决办法
6291
查看次数

模拟器在xcode 6.2中不存在

我在Xcode中创建了一个项目,并将项目复制到另一个系统.当我在另一个系统上打开项目时,没有选择模拟器设备(仅限真实设备)的选项.我该如何解决这个问题?

ios ios-simulator xcode5

0
推荐指数
1
解决办法
99
查看次数

在tableview上添加图像自定义按钮背景

我想在tableview单元格上的按钮上添加图像,这是我的代码,一切正常但是在选择图像后,它没有设置或可见imagebutton,请帮助我......

cellForRowAtIndexpath方法中

  if(indexPath.row == 0)
    {
        cell.userInteractionEnabled = YES;
         cell.textLabel.text =@"Your Profile Photo";
         imageBtn = [[UIButton alloc]initWithFrame:CGRectMake(250, 5, 35, 35)];
           [imageBtn setBackgroundImage:[UIImage imageNamed:@"AFPFriendThumbnail.png"]    forState:UIControlStateNormal];
        [imageBtn addTarget:self
                     action:@selector(myAction)
           forControlEvents:UIControlEventTouchUpInside];

        imageView.backgroundColor = [UIColor lightGrayColor];

        [cell addSubview:imageBtn];

    }
Run Code Online (Sandbox Code Playgroud)

按钮上的动作

-(void)myAction
{    
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:picker animated:YES];
}


- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage];
[imageBtn setImage:image forState:UIControlStateSelected];
imageBtn.backgroundColor = [UIColor redColor];
[tableView_ …
Run Code Online (Sandbox Code Playgroud)

objective-c uitableview ios

0
推荐指数
1
解决办法
76
查看次数