小编Nit*_*hin的帖子

UItableViewCell中的uibutton问题

在我的应用程序中,我使用的是自定义表.每个细胞都有一个uibutton和uiimage.当触摸按下按钮时,我想调用uiimagepickercontroller方法从iphone库中选择一张图片并将其显示在图像视图中.我已经写了但收到警告......'customCell'可能无法响应presentmodalviewcontroller动画...这里customCell是我的主类myApp的子类,也是自定义单元格的nib的名称.谁知道这个问题???? 谢谢...

编辑

- (IBAction)selectExistingPicture1 { 
    if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary]) {
        UIImagePickerController *picker = [[UIImagePickerController alloc] init];
        picker.delegate = self; 
        picker.allowsImageEditing = YES;
        picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        [self presentModalViewController:picker animated:YES];
        [picker release];
    } 
    else { 
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error accessing photo library" message:@"Device does not support a photo library" delegate:nil cancelButtonTitle:@"Drat!" otherButtonTitles:nil]; 
        [alert show]; 
        [alert release]; 
    } 
}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo {    
    CGSize newSize = CGSizeMake(80, 80);
    UIGraphicsBeginImageContext( newSize );
    [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
    UIImage* newImage = …
Run Code Online (Sandbox Code Playgroud)

iphone uitableview uiimagepickercontroller

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

添加按钮到导航栏

是否可以使用IPhone SDK将按钮添加到导航栏?

我在导航栏中已经有两个按钮,分别是leftBarButton和rightBarButton.我还需要2个按钮.如何实现?

我不需要将它们包含在导航栏中.但由于应用程序只包含一个表,我不认为它可以在其他地方给出.

navigation iphone uinavigationbar

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

为移动浏览器创建网页

我正在为移动用户和PC用户创建一个网站.我希望在这些最终用户上正确查看此网站.我现在基本上是在调查移动用户的一部分.当我在我的手机上加载页面时,它似乎有点太小了.我需要减少页面的整体尺寸或其分辨率以适应移动设备.当我检查谷歌的移动版本(这里)时,它在PC的浏览器中似乎更小,因为它适合移动浏览器.

我使用的方法是什么?我正在使用支持javascript和css的Xhtml来构建网站

html javascript

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

在没有自定义单元格的情况下向uitableview显示一个detaildisclosure按钮

如何在不使用自定义单元格的情况下向uitableview显示详细信息披露按钮.我通过使用accessoryType:方法知道它,但不知道如何实现..pls帮助..

iphone uitableview accessorytype

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

iPhone中的内存泄漏警告

类NSCFString的对象0x3d58870自动释放,没有池 - 只是泄漏

我收到以下函数中使用的几乎所有变量的内存警告:

- (void) backgroundTask {

c= [array1 count];
if (c == 0){
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"ERROR" message:@"Chose an image to upload!!!" delegate:nil cancelButtonTitle:@"OK!" otherButtonTitles:nil];
    [alert show];
    [alert release];
}
else {  
    for(k==0;k<c;k++){
        [uploading startAnimating];

        upload = [array1 objectAtIndex:0];
        NSData *imageData = UIImageJPEGRepresentation(upload, .9);      
        NSString *urlString = @"http://fileserver.colormailer.com/fileserver/photoService?method=addPhoto&description=testingupload&albumId=nithinalbum&userId=123nithin&sid=12345678&title=image125";

        NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
        [request setURL:[NSURL URLWithString:urlString]];
        [request setHTTPMethod:@"POST"];

        NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"];
        NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary];
        [request addValue:contentType forHTTPHeaderField:@"Content-Type"];

        NSMutableData *body …
Run Code Online (Sandbox Code Playgroud)

iphone

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