小编pra*_*ena的帖子

如何将NSMutableArray中的字符串排序为字母顺序?

我有一个字符串列表NSMutableArray,我希望在我的表视图中显示它们之前将它们按字母顺序排序.

我怎样才能做到这一点?

sorting cocoa-touch objective-c nsmutablearray ios

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

在textView中,当我单击完成按钮时键盘没有退出

单击完成按钮后,我在调整键盘时出现问题.我正在使用textView

-(BOOL)textViewShouldReturn:(UITextView *)textView
{
    if(textView == addressView)
    {
        if(isNotif)
        {
            [self setViewMovedUp:NO];
        }
        textView.text= [textView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
        [addressView resignFirstResponder];
    }
    return YES;
}
Run Code Online (Sandbox Code Playgroud)

而不是键盘重新签名光标将转到文本字段中的新行.请帮我.

谢谢Praveena.

iphone objective-c

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

为什么所有人都建议在iphone中使用PNG而不是GIF,JPG图像?

可能重复:
何时在iPhone开发中使用PNG或JPG?

我想知道为什么所有建议使用.png图像而不是.jpg和.gif图像用于iphone应用程序.当我们使用.gif或.jpg图像时会出现什么问题.Apple是否不支持使用非.png图像的应用程序.请澄清我.

提前致谢

iphone objective-c

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

如何将照片库或相机中的图像添加到我的Ipad应用程序?

我想从照片库中添加图像或使用相机添加到我的ipad应用程序中.我使用了与iphone相同的编码.但是应用程序崩溃了.我认为这不是从库添加图片到ipad应用程序的正确方法.如果有人知道请帮助我.

-(void)ctnPhotoSelection
{
    isMyCtView = YES;
    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@""
                                                             delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil
                                                    otherButtonTitles:@"Take Photo With Camera", @"Select Photo From Library", @"Cancel", nil];
    actionSheet.actionSheetStyle = UIActionSheetStyleAutomatic;
    actionSheet.destructiveButtonIndex = 1; 
    [actionSheet showInView:self.view]; 
    [actionSheet release];
}

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if (buttonIndex == 0)
    {
        [self TakePhotoWithCamera];
    }   
    else if (buttonIndex == 1)
    {
        [self SelectPhotoFromLibrary];
    }

    else if (buttonIndex == 2)
    {
        NSLog(@"cancel");
    }
}

-(void) TakePhotoWithCamera
{
    [self startCameraPickerFromViewController:self usingDelegate:self];
}

-(void) SelectPhotoFromLibrary
{
    [self startLibraryPickerFromViewController:self usingDelegate:self]; …
Run Code Online (Sandbox Code Playgroud)

objective-c ipad ios

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

为什么我们要合成?

嗨,我是手机的新手,我想知道为什么要合成.

iphone objective-c

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

标签 统计

objective-c ×5

iphone ×3

ios ×2

cocoa-touch ×1

ipad ×1

nsmutablearray ×1

sorting ×1