Search Results

Search found 422 results on 17 pages for 'uicolor'.

Page 12/17 | < Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Editing a UIViewController from another class.

    - by Guy
    I am trying to programmatically change the user interface of a UIViewController from another NSObject class. The problem is that I am unsure of how to access the UIViewController's view from the NSObject class. So for example, in my NSObject class, I say something like: self.view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; self.view.backgroundColor = [UIColor yellowColor]; but I keep getting errors saying "Request for member "view" in something not a strut or union." Is there something I need to allow my NSObject class to see my UIViewController? Thanks!

    Read the article

  • problem in adding image to the UIButton.

    - by monish
    Hi friends, I got an another problem in my application and I am wasting so much of time on that. Does pls anyone can help with this problem. Actually I had an Event and I should give rating for that event for that I wrote the code as: In CellForRowAtIndexPath......I had the code as: - (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MasterViewIdentifier"]; //UITableViewCell *cell = nil; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"MasterViewIdentifier"] autorelease]; cell.selectionStyle = UITableViewCellSelectionStyleNone; UIView* elementView = [[UIView alloc] initWithFrame:CGRectMake(20,170,320,280)]; elementView.tag = 0; elementView.backgroundColor=[UIColor clearColor]; [cell.contentView addSubview:elementView]; [elementView release]; } UIView* elementView = [cell.contentView viewWithTag:0]; elementView.backgroundColor=[UIColor clearColor]; for(UIView* subView in elementView.subviews) { [subView removeFromSuperview]; } if(indexPath.section == 8) { UIImage *whiteImg = [UIImage imageNamed:@"white_star.png"] ; UIImage *yellowImg = [UIImage imageNamed:@"yellow_Star.png"] ; UIButton *button1 = [[UIButton alloc]initWithFrame:CGRectMake(159, 15, 25, 20)]; [button1 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; button1.tag = 1; UIButton *button2 = [[UIButton alloc]initWithFrame:CGRectMake(185, 15, 25, 20)]; [button2 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; button2.tag = 2; UIButton *button3 = [[UIButton alloc]initWithFrame:CGRectMake(211, 15, 25, 20)]; [button3 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; button3.tag = 3; UIButton *button4 = [[UIButton alloc]initWithFrame:CGRectMake(237, 15, 25, 20)]; [button4 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; button4.tag = 4; UIButton *button5 = [[UIButton alloc]initWithFrame:CGRectMake(263, 15, 25, 20)]; [button5 addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; button5.tag = 5; if(event.eventRatings == 1) { [button1 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button2 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button3 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button4 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button5 setBackgroundImage:whiteImg forState:UIControlStateNormal]; } else if(event.eventRatings == 2) { [button1 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button2 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button3 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button4 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button5 setBackgroundImage:whiteImg forState:UIControlStateNormal]; } else if(event.eventRatings == 3) { [button1 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button2 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button3 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button4 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button5 setBackgroundImage:whiteImg forState:UIControlStateNormal]; } else if(event.eventRatings == 4) { [button1 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button2 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button3 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button4 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button5 setBackgroundImage:whiteImg forState:UIControlStateNormal]; } else if(event.eventRatings == 5) { [button1 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button2 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button3 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button4 setBackgroundImage:yellowImg forState:UIControlStateNormal]; [button5 setBackgroundImage:yellowImg forState:UIControlStateNormal]; } else { [button1 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button2 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button3 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button4 setBackgroundImage:whiteImg forState:UIControlStateNormal]; [button5 setBackgroundImage:whiteImg forState:UIControlStateNormal]; } [elementView addSubview:button1]; [button1 release]; [elementView addSubview:button2]; [button2 release]; [elementView addSubview:button3]; [button3 release]; [elementView addSubview:button4]; [button4 release]; [elementView addSubview:button5]; [button5 release]; if(isRightButton == YES) { button1.enabled = NO; button2.enabled = NO; button3.enabled = NO; button4.enabled = NO; button5.enabled = NO; } else if(isRightButton == NO) { button1.enabled = YES; button2.enabled = YES; button3.enabled = YES; button4.enabled = YES; button5.enabled = YES; } [elementView addSubview:ratingsTitleLabel]; cell.accessoryType = UITableViewCellAccessoryNone; } return cell; } And the action of the button is written as: -(void)buttonAction:(id)sender { rating = [sender tag]; printf("\n Ratig Value inside Button Action~~~~~~~~~~~~~~~~%d",rating); event.eventRatings = rating; [tableView reloadData]; } When I build the application in simlator of 3.1.2 O.S its working fine by displaying the star images. My porblem is when I build it in 3.1.2 O.S Device the images are not displaying.I checked the code for casesensitivity in file name and its gud but Im not gettig the images to display. Guys help me to solve this. Thank you, Monish Kumar.

    Read the article

  • MPMoviePlayerController not setting the bounds for background image

    - by VXtreme
    I am using MPMoviePlayerController for playing the media . I want to set the image at the background of the player.The image is set accordingly but when i set the bounds for the image then the image is not set according to bounds . I have tried following code: UIImageView *imageView=[[UIImageView alloc]initWithImage:[operationControl getCoverImage:stringId]]; imageView.bounds=CGRectMake(0, 100, 200, 200); [moviePlayer.backgroundView addSubview:imageView]; [moviePlayer.backgroundView setBackgroundColor:[UIColor purpleColor]]; moviePlayer.controlStyle = MPMovieControlStyleDefault; moviePlayer.shouldAutoplay = YES; [moviePlayer setScalingMode:MPMovieScalingModeAspectFit]; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES animated:YES];

    Read the article

  • cant scroll the scrolview?

    - by Abhi_Iphone_Blackberry
    I have a problem with my UIScrollView. It's visible but I can't scroll it. CGRect frame = CGRectMake(20, 90,280,1000); scroll1=[[UIScrollView alloc]initWithFrame:frame]; scroll1.contentSize = CGSizeMake(280,1000); scroll1.backgroundColor=[UIColor grayColor]; //scroll1.delegate=scroll1; [scroll1 setUserInteractionEnabled:TRUE]; [scroll1 setPagingEnabled:TRUE]; [scroll1 setScrollEnabled:TRUE]; [scroll1 showsVerticalScrollIndicator]; Thanks in advance.

    Read the article

  • Getting invalid context errors

    - by Andrew
    I don't have much code thus far, only this to start: UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0); CGContextRef context = UIGraphicsGetCurrentContext(); CGMutablePathRef outerPath; CGMutablePathRef highlightPath; CGRect outerRect = rectForRectWithInset(bounds, 1); CGRect highlightRect = CGRectMake(outerRect.origin.x, outerRect.origin.y + 1, outerRect.size.width, outerRect.size.height); And then the problematic bit, which when commented out, the error goes away: CGContextSaveGState(context); CGContextAddPath(context, highlightPath); CGContextSetFillColorWithColor(context, [[UIColor colorWithWhite:1.0 alpha:0.05]CGColor]); CGContextFillPath(context); CGContextRestoreGState(context); Below that is simply: UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();

    Read the article

  • How to change the color of the navigation bar in more than one table view controller

    - by Dctennisboy
    I am trying to figure out how to change the color of the table view navigation bar in multiple table views. The table views are all connected to a navigation controller. For example, I want one navigation bar to be blue, but another to be red. I have tried the code below in the AppDelegate.m file, but it just changes all the navigation bars to the same color. Is there anywhere else I could place this code to change the color in specific places. I've heard that I need to create new files, but I don't know where to place the code, or what code to use in the new files. I am somewhat new to this. Any suggestions would be greatly appreciated![[UINavigationBar appearance] setBarTintColor:[UIColor orangeColor]];

    Read the article

  • Will it use more and more memory if I keep drawing on the UIView?

    - by Tattat
    This is my drawRect: CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor); CGContextMoveToPoint(context, x1, y1); CGContextAddLineToPoint(context, x2, y2); CGContextStrokePath(context); If I run this code thousand times or more. My UIView will have many lines on that. Will it use more memory than only just one line on it? Er... ...I mean, will the program remember the line I draw or after it draw the lines, it won't have any information in the memory. thz .

    Read the article

  • How do I create an image for a UITableViewCell dynamically

    - by Xetius
    I want to dynamically create an image for a UITableViewCell which is basically a square with a number in it. The square has to be a colour (specified dynamically) and contains a number as text inside it. I have looked at the CGContextRef documentation, but can't seem to work out how to get the image to fill with a specified certain colour. This is what I have been trying so far. -(UIImage*)createCellImageWithCount:(NSInteger)cellCount AndColour:(UIColor*)cellColour { CGFloat height = IMAGE_HEIGHT; CGFloat width = IMAGE_WIDTH; UIImage* inputImage; UIGraphicsBeginImageContext(CGSizeMake(width, height)); CGContextRef context = UIGraphicsGetCurrentContext(); UIGraphicsPushContext(context); // drawing code goes here // But I have no idea what. UIGraphicsPopContext(); UIImage* outputImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return outImage; }

    Read the article

  • iPhone How to set a clearcolor for my custom view

    - by user355066
    Hi, I am creating a custom StyleLabel by extending the UIView, which provides a link for particular type of strings. I have successfully implemented this functionality. I am using this label in TableViewCell along with UILabel.i set UILabel & StyleLabel background color is set to clearColor. UILabel works fine, but StyleLabel shows background in blackColor. I am not sure what is the problem with the following code. Here is the drawRect method of CustomLabel class -(void) drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextClearRect(ctx, rect); [[UIColor clearColor] setFill]; CGContextAddRect(ctx, rect); CGContextDrawPath(ctx, kCGPathFill); [_text drawText:ctx]; } Thanks Sasikumar

    Read the article

  • MPMoviePlayerController stutter

    - by Paul
    Code : NSString *path = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"m4v"]; MPMoviePlayerController *video = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]]; [video setBackgroundColor:[UIColor blackColor]]; video.scalingMode = MPMovieScalingModeAspectFill; [[ NSNotificationCenter defaultCenter ] addObserver: self selector: @selector(movieFinishedCallback:) name: MPMoviePlayerPlaybackDidFinishNotification object: aVideo ]; [video play]; ....movieFinishedCallback... [video release]; Result : Movie starts at frame 10 and then resets to frame 0, creating a stutter effect... Any Ideas ?

    Read the article

  • Vertically align UILabel

    - by Ashish Agarwal
    I am trying to vertically align the text in the UILabel view of my app. The problem is that I want the text to be vertically aligned to the top and the size of the label to be 280 x 150. I am only able to achieve one of these 2 things. If I remove the line [myLabel sizeToFit]; then the alignment of the text is alright but the size is messed up. But if I add the above line, then the alignment is messed up but the size is alright. How do I fix this problem. I've added the code below - CGRect labelFrame = CGRectMake(22, 50, 280, 150); UILabel *myLabel = [[UILabel alloc] initWithFrame:labelFrame]; [myLabel setText:finalRecipe]; [myLabel setBackgroundColor: [UIColor lightGrayColor]]; [myLabel setNumberOfLines:0]; [myLabel sizeToFit]; [self.view addSubview:myLabel];

    Read the article

  • iphone memory management: alloc and retain properties.

    - by Jonathan
    According to the docs, you do one release per alloc or retain (etc) However what about when using retain propertys? eg: HEADER @property(retain)UIView *someView; IMPLEMENTATION /*in some method*/ UIView *tempView = [[UIView alloc] init]; //<<<<<ALLOC - retain count = +1 [tempView setBackgroundColor:[UIColor redColor]]; self.someView = tempView; ///<<<<<RETAIN - retain count = +2 [tempView release]; ///should I do this? or a different version of the IMPLEMENTATION self.someView = [[UIView alloc] init]; //<<<<<ALLOC & RETAIN - retain count = +2 //now what??? [self.someView release]; ???? EDIT: I didn't make it clear, but I meant what to do in both circumstances, not just the first.

    Read the article

  • how to remove sub views.

    - by mac
    Hi I have added UIButton,UITextView as subview to my view, programatically. notesDescriptionView = [[UIView alloc]initWithFrame:CGRectMake(0,0,320,460)]; notesDescriptionView.backgroundColor=[UIColor redColor]; [self.view addSubview:notesDescriptionView]; textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0,320,420)]; [self.view addSubview:textView]; printf("\n description button \n"); button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button addTarget:self action:@selector(cancel:) forControlEvents:UIControlEventTouchDown]; [button setTitle:@"OK" forState:UIControlStateNormal]; button.frame = CGRectMake(80.0, 420.0, 160.0, 40.0); [self.view addSubview:button]; here if we click the button , i need to remove the all the sub views, i am trying [self.view removeFromSuperView] but its not working any help.

    Read the article

  • Problems with UITableView when loading the view into the main window

    - by GuidoMB
    I've created a sub class of UITableViewController named LoginViewController with the XIB file using XCode. Then I opened the XIB file with IB and set the table's style to grouped. Finally I wrote the following code: - (void)applicationDidFinishLaunching:(UIApplication *)application { LoginViewController *loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:[NSBundle mainBundle]]; [window addSubview: loginViewController.view]; window.backgroundColor = [UIColor blueColor]; [window makeKeyAndVisible]; [window layoutSubviews]; } I set the window's background color to blue for you to see what the problem is. I put a link to the screenshot If I don't use the table style grouped the problem does not occur

    Read the article

  • How can we add scrolling text in cocos2d by using UITextView ?

    - by srikanth rongali
    I want a UITextView in cocos2d. I used in init method I wrote the code, UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; textView.backgroundColor = [UIColor clearColor]; textView.text = @"I am First enemy"; [textView setEditable:NO]; [[[CCDirector sharedDirector]openGLView]addSubview:textView]; the orientation is [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; I need the text to appear in landscape mode, but I am getting the text in following way. How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down. Thank you.

    Read the article

  • When I select any segment in segmentControll it doesnot show highlighted

    - by rathodrc
    NSArray *itemArray = [NSArray arrayWithObjects:@"one", @"Two", @"Three", nil]; segmentControl = [[UISegmentedControl alloc] initWithItems:itemArray]; segmentControl.frame = CGRectMake(5, 5, 325, 35); segmentControl.segmentedControlStyle = UISegmentedControlStyleBar; segmentControl.tintColor = [UIColor blackColor]; [self changeUISegmentFont:segmentControl]; //[self.view addSubview:segmentControl]; self.navigationItem.titleView = segmentControl; [segmentControl addTarget:self action:@selector(segmentAction:) forControlEvents:UIControlEventValueChanged]; This is my code of segment control and my problem is .. When I select any segment it does not show me that that segment is selected.. I mean it is not shown highlighted.. can Anyone tell me what the problem is??

    Read the article

  • simple obj-c naming question

    - by Highstead
    This question is more to figure out how to look up classes and objects in objective-c but i lack the knowledge to figure out how to look this up so i pose the question here. In .Net if i had a MyObject.MyValue the MyValue would be called a property, and I could look this up in MSDN. In java i would check the javadocs online (and that property would have to be a value). With objective-c that is called a ? and if i wanted to look it up i would look where? Example: //Object.??? UIImage.backgroundColor = [UIColor blueColor];

    Read the article

  • How can we make the text to appear in landscape mode in cocos2d by using UITextView ?

    - by srikanth rongali
    I want a UITextView in cocos2d. I used in init method UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0, windowSize.height/2,windowSize.width/2)]; textView.backgroundColor = [UIColor clearColor]; textView.text = @"I am First enemy"; [textView setEditable:NO]; [[[CCDirector sharedDirector]openGLView]addSubview:textView]; the orientation is [[CCDirector sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft]; I need the text to appear in landscape mode, but I am getting the text in following way. How can I make the text to appear in the landScape mode. I am working in cocos2d. CanOI scroll the text ? What should i add to make the text scroll up and down. Thank you.

    Read the article

  • Change UIView alpha value

    - by Ask
    I'm trying to create an UIView and change its alpha property to simulate backlight change. Here is my code if (TransparentView == nil) { TransparentView = [[UIView alloc] initWithFrame:self.view.bounds]; TransparentView.backgroundColor = [UIColor whiteColor]; self.view = TransparentView; } start=start+appDelegate.OnOffTime; TransparentView.alpha = 0.2; float step = 1.0 / ( appDelegate.OnOffTime * 100); for (float f = 0; f < 1; f=f+step) { TransparentView.alpha = (CGFloat)(1 - f); [NSThread sleepForTimeInterval:0.01]; } Both TransparentView.alpha = 0.2 and TransparentView.alpha = (CGFloat)(1 - f) do change TransparentView.alpha, but only TransparentView.alpha = 0.2 changes real device "brightness'. What am I doing wrong?

    Read the article

  • NavigationBar text colour not changing?

    - by Jeff
    In my tabbar application I am adding Navigation controller in each tab. Suppose the selected index is 0 when I opening the app.In my 3rd tab(selected index=2) I want to change the text colour of navigationbar title.And I am using the code [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor greenColor],UITextAttributeTextColor,nil]]; But its not changing the text color of Index 0 and 2.Colour of index 1 will change only if that tab was not clicked before changing the colour by using the above code. I don't know whats is the issue ? Any help/code will be appreciable.

    Read the article

  • iphone - Search bar disappears from my root view controller

    - by Sudharsanan
    Hi, I have a search bar in my main screen - root table view controller. If I browse other screens and come back, sometimes, the search bar disappears. Here's my code. searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 0)]; searchBar.delegate = self; searchBar.tintColor = [UIColor blackColor]; [searchBar sizeToFit]; self.tableView.tableHeaderView = searchBar; searchDisplayController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self]; searchDisplayController.delegate = self; searchDisplayController.searchResultsDataSource = self; searchDisplayController.searchResultsDelegate = self; Is there anything wrong with my code or is it one of the quirks of SDK 3.0?

    Read the article

  • Please explain class methods

    - by user1209902
    I'm finding it difficult to understand when it is necessary to create class methods. From what I've read, they are important for creating new objects, but I do not see how. The following class create a simple shape black rectangle. Can anyone show me how to incorporate a class method to do something that I could not do with an instance method? Shape.h #import <UIKit/UIKit.h> @interface Shape : UIView; - (id) initWithX: (int)xVal andY: (int)yVal; @end Shape.m #import "Shape.h" @implementation Shape - (id) initWithX:(int )xVal andY:(int)yVal { self = [super init]; UIView *shape = [[UIView alloc] initWithFrame:CGRectMake(xVal, yVal, 10, 10)]; shape.backgroundColor = [UIColor blackColor]; [self addSubview:shape]; return self; } @end

    Read the article

  • Change backgroundcolor for UIButton IPhone

    - by lightwave
    I have a problem. I use a Button as a BarButtonItem. It works fine so far, but my backgroundcolor works only if I click on my button. How can I make it so that my backgroundcolor will be set every time ? UIButton *redEmergencyButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; redEmergencyButton.frame = CGRectMake(100, 100, 100, 50); redEmergencyButton.backgroundColor = [UIColor colorWithRed:0.8 green:0.898039215686274509803 blue:1.0 alpha:1.0]; [redEmergencyButton setTitle:@"Emergency" forState:UIControlStateNormal]; [redEmergencyButton addTarget:self action:@selector(doEmergency) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *rButton = [[UIBarButtonItem alloc] initWithCustomView:redEmergencyButton];

    Read the article

  • Do we need to release an UIImage object even not allocated memory?

    - by Madan Mohan
    Hi Guys, I added an image to button UIImage* deleteImage = [UIImage imageNamed:@"Delete.png"]; CGRect imageFrame=CGRectMake(-4,-4, 310, 55); [btn setFrame:imageFrame]; btn.backgroundColor=[UIColor clearColor]; [btn setBackgroundImage:deleteImage forState:UIControlStateNormal]; [btn setTitle:@"Delete" forState:UIControlStateNormal]; [btn addTarget:self action:@selector(editDeleteAction) forControlEvents:UIControlEventTouchUpInside]; [elementView addSubview:btn]; [deleteImage release];// do we need to release the image here If I release here its working fine but in object allocations no.of image count is increasing.

    Read the article

  • Getting a SIGABRT error in dismissModalViewController

    - by mcalleja
    Im receiving a SIGABRT error when I cancel a MFMailComposeViewController, exactly in the dismissViewController, don't work I have a UIViewController within a UINavigationController. My Code: - (void)sendMail { if ([MFMailComposeViewController canSendMail]) { controller = [[MFMailComposeViewController alloc] init]; [[controller navigationBar] setTintColor:[UIColor getHexColorWithRGB:@"e2de09" alpha:1.0f]]; controller.mailComposeDelegate = self; [controller setSubject:@"Subject"]; NSString *msg="xxxxx"; [controller setMessageBody:msg isHTML:YES]; [self presentModalViewController:controller animated:YES]; } else { NSString * errorString = [NSString stringWithFormat:@"mail account not set."]; UIAlertView * errorAlert = [[UIAlertView alloc] initWithTitle:@"Error:" message:errorString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [errorAlert show]; } } The presentModalViewController:animated: works correctly. - (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { [self becomeFirstResponder]; [self dismissModalViewControllerAnimated:YES]; } But calling [self dissmissModalViewControllerAnimatedLYES] causes a SIGABRT error.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17  | Next Page >