我有一个字符串列表NSMutableArray,我希望在我的表视图中显示它们之前将它们按字母顺序排序.
我怎样才能做到这一点?
单击完成按钮后,我在调整键盘时出现问题.我正在使用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开发中使用PNG或JPG?
我想知道为什么所有建议使用.png图像而不是.jpg和.gif图像用于iphone应用程序.当我们使用.gif或.jpg图像时会出现什么问题.Apple是否不支持使用非.png图像的应用程序.请澄清我.
提前致谢
我想从照片库中添加图像或使用相机添加到我的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)