Search Results

Search found 439 results on 18 pages for 'navigationcontroller'.

Page 6/18 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • In UISplitViewController rootView/masterView to tell detailView to push a viewcontroller ?

    - by arash13
    This is almost a follow up of my last question. Now i have a splitview with a rootview / leftview that has a table and detailview / rightView that has some view controller pushed into it's navigationcontroller. So this is what i want to achieve: When i tap on a tablerow on my rootView , i want my detail view to push a viewController associated with that row... any ideas ? I also tried making a protocol on my tableviewcontroller and have it implemented in detailview controller .. but i dont know how to call it, is it [self performselector:.... ? case 1:{switch ([indexPath row]) { case 0:{[_detailViewController.navigationController pushViewController:_s2d animated:YES]; // just trying to push it from here but didnt work }break; case 1:{ [_detailViewController loadEqViewController]; // this one is an instance method in detailview it is being called but nothing happends }break; }}break;

    Read the article

  • Application crash when using an NSTimer and pushViewController

    - by Cesar
    I'm using an NSTimer to implement a 3 seconds splash screen. If a don't use a timer the view it's correctly pushed but if I use the timer for adding a little delay the application crash with a EXC_BAD_ACCESS. I'm pretty sure the answer contains "memory management" but I can't get the point... @interface RootViewController : UIViewController { NSTimer *timer; } -(void)changeView:(NSTimer*)theTimer; @property(nonatomic,retain) NSTimer *timer; ... @implementation RootViewController @synthesize timer; - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [[self navigationController] setNavigationBarHidden:YES]; timer = [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(changeView:) userInfo:nil repeats:NO]; } -(void)changeView:(NSTimer*)theTimer { NSLog(@"timer fired"); //Crash here, but only if called using a timer [[self navigationController] pushViewController:list animated:YES]; }

    Read the article

  • How to navigate clicking row to another UITableView ?

    - by Meko
    Hi. I am trying to show detailed UItable view when clicking on row. I used - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; photoListViewController = [[PhotoListViewController alloc]initWithNibName:@"PhotoListViewController" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:photoListViewController animated:YES]; [photoListViewController release]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; } This PhotoListViewController is an empty UITableViewController. As I know UITableViewCOntroller has a navigation controller implemented and I don`t have to create navigation controller. But When I clicked on row it does not navigate to second view.AM I have to make some connection on nib file?I only created this PhotoListViewController in File-New-UIViewCOntroller and selected UITableView. EDIT : SOLVED I solved my problem.I should use UINAvigation object.I thought that UITable has it but there was no ))

    Read the article

  • How do I find out what objects points to another object i Xcode Instruments

    - by Arlaharen
    I am trying to analyze some code of mine, looking for memory leaks. My problem is that some of my objects are leaking (at least as far as I can see), but the Leaks tool doesn't detect the leaks. My guess is that some iPhone OS object still holds pointers to my leaked objects. The objects I am talking about are subclasses of UIViewController that I use like this: MyController *controller = [[MyController alloc] initWithNibName:@"MyController" bundle:nil]; [self.navigationController pushViewController:controller animated:YES]; When these objects are no longer needed I do: [self.navigationController popViewControllerAnimated:YES]; Without a [controller release] call right now. Now when I look at what objects that gets created I see a lot of MyController instances that never gets destroyed. To me these are memory leaks, but to the Leaks tool they are not. Can someone here tell me if there is some way Instruments can tell me what objects are pointing to my MyController instances and thereby making them not count as memory leaks?

    Read the article

  • Remove Custom UINavigationBar

    - by Lithium
    Hi, I've customized my UINavigationBar with an image like that : @implementation UINavigationBar (CustomImage) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"NavigationBar.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } @end When I launch a video my custom NavigationBar (with the picture) is on the top or I would like to have the default navigationBar style when I'm playing a video. I tried to hide the navigationBar with [self.navigationController setNavigationBarHidden:YES animated:animated]; but it just remove the navigationBar in my controller but I still have the NavigationBar.png when I'm playing a video. I tried to set the barstyle but it doesn't work either ... self.navigationController.navigationBar.barStyle = UIBarStyleDefault; Could you help me ?

    Read the article

  • [iPhone] presentModalViewController not working

    - by ryyst
    Hi, here's my code: ViewController *vc = [[ViewController alloc] initWithNibName:@"TableView" bundle:nil]; [self.navigationController presentModalViewController:vc animated:YES]; //[self setView:[vc view]]; If I call it, nothing happens. However, if I change it to: ViewController *vc = [[ViewController alloc] initWithNibName:@"TableView" bundle:nil]; //[self.navigationController presentModalViewController:vc animated:YES]; [self setView:[vc view]]; The view appears just fine (without the transition, of course). What am I doing wrong? Is there anything special you have to take care of when initializing the view controller? I tried to copy as much as possible from Apple's examples, but I can't get this to work... Thanks for any input! -- Ry

    Read the article

  • iPhone modal view inside another modal view?

    - by Rick
    My App uses a modal view when users add a new foo. The user selects a foo type using this modal view. Depending on what type is selected, the user needs to be asked for more information. I'd like to use another modal view to ask for this extra information. I've tried to create the new modal view like the first one (which works great) and it leads to stack overflow/“Loading Stack Frames” error in Xcode. Am I going about this in completely the wrong way i.e. is this just a really bad idea? Should I rethink the UI itself? UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addController]; [self presentModalViewController:navigationController animated:YES];

    Read the article

  • Anything wrong with this code?

    - by ct2k7
    I am using this to determine which view to go to next, from the result as input from UITableView. The following code isn't working, but I think it should be! Do you see anything wrong with it? NSString *option = [menuArray objectAtIndex:indexPath.row]; if (option == @"New Transaction"){ NTItems *nTItemsController = [[NTItems alloc] initWithNibName:@"NTItems" bundle:nil]; // Pass the selected object to the new view controller. [self.navigationController pushViewController:nTItemsController animated:YES]; [NTItems release];} else if (option == @"Previous Transactions"){} else if (option == @"Reprint a reciept"){} else if (option == @"Settings"){} else if (option == @"Logout"){ LoginViewController *nTItemsController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; // Pass the selected object to the new view controller. [self.navigationController pushViewController:nTItemsController animated:YES]; [LoginViewController release]; }

    Read the article

  • UINavigationController and memory management

    - by Dan Ray
    - (void)launchSearch { EventsSearchViewController *searchController = [[EventsSearchViewController alloc] initWithNibName:@"EventsSearchView" bundle:nil]; [self.navigationController pushViewController:searchController animated:YES]; //[searchController release]; } Notice the [searchController release] is commented out. I've understood that pushing searchController onto the navigation controller retains it, and I should release it from my code. I did just alloc/init it, after all, and if I don't free it, it'll leak. With that line commented out, navigation works great. With it NOT commented out, I can navigate INTO this view okay, but coming back UP a level crashes with a *** -[CFArray release]: message sent to deallocated instance 0x443a9e0 error. What's happening here? Is the NavigationController releasing it for me somehow when it goes out of view? The boilerplate that comes on a UINavigationController template in XCode has the newly-pushed controller getting released. But when I do it, it fails.

    Read the article

  • iphone - UIViewController header view errors

    - by Fiona
    Hi there, So to give a little background: I've an app that has a UITableViewController- (ContactDetailViewController) In this view at the top, I require a few labels and buttons, followed by a group style tableview. So I've created a nib file containing these elements. (ContactHeaderView.xib) Then in the viewDidLoad of ContactDetailViewController I've loaded this nib as the headerView. See implementation file below: #import "ContactDetailViewController.h" #import "DisplayInfoViewController.h" #import "ActionViewController.h" @implementation ContactDetailViewController @synthesize name; @synthesize date; @synthesize nextAction; @synthesize nameLabel; @synthesize usernameLabel; @synthesize nextActionTextField; @synthesize dateLabel; @synthesize contactInfoButton; @synthesize backgroundInfoButton; @synthesize actionDoneButton; - (void)viewDidLoad { [super viewDidLoad]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } #pragma mark Table view methods - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 3; } - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if (section == 0){ UIViewController *chv = [[[UIViewController alloc] initWithNibName:@"ContactHeaderView" bundle:nil] autorelease]; // self.nameLabel.text = self.name; return chv.view; }else{ return nil; } } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ return 300.0; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Set up the cell... return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; } /* // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the specified item to be editable. return YES; } */ - (void)dealloc { [name release]; [date release]; [nextAction release]; [nameLabel release]; [usernameLabel release]; [nextActionTextField release]; [dateLabel release]; [contactInfoButton release]; [backgroundInfoButton release]; [actionDoneButton release]; [super dealloc]; } -(IBAction)displayContactInfo:(id)sender{ DisplayInfoViewController *divc = [[DisplayInfoViewController alloc] init]; divc.textView = self.nextAction; divc.title = @"Contact Info"; [self.navigationController pushViewController:divc animated:YES]; [divc release]; } -(IBAction)displayBackgroundInfo:(id)sender{ DisplayInfoViewController *divc = [[DisplayInfoViewController alloc] init]; divc.textView = self.nextAction; divc.title = @"Background Info"; [self.navigationController pushViewController:divc animated:YES]; [divc release]; } -(IBAction)actionDone:(id)sender{ ActionViewController *avc = [[ActionViewController alloc] init]; avc.title = @"Action"; avc.nextAction = self.nextAction; [self.navigationController pushViewController:avc animated:YES]; [avc release]; } @end Here's the Header File: #import <UIKit/UIKit.h> @interface ContactDetailViewController : UITableViewController { NSString *name; NSString *date; NSString *nextAction; IBOutlet UILabel *nameLabel; IBOutlet UILabel *usernameLabel; IBOutlet UITextField *nextActionTextField; IBOutlet UILabel *dateLabel; IBOutlet UIButton *contactInfoButton; IBOutlet UIButton *backgroundInfoButton; IBOutlet UIButton *actionDoneButton; } @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSString *date; @property (nonatomic, retain) NSString *nextAction; @property (nonatomic, retain) IBOutlet UILabel *nameLabel; @property (nonatomic, retain) IBOutlet UILabel *usernameLabel; @property (nonatomic, retain) IBOutlet UITextField *nextActionTextField; @property (nonatomic, retain) IBOutlet UILabel *dateLabel; @property (nonatomic, retain) IBOutlet UIButton *contactInfoButton; @property (nonatomic, retain) IBOutlet UIButton *backgroundInfoButton; @property (nonatomic, retain) IBOutlet UIButton *actionDoneButton; -(IBAction)displayContactInfo: (id)sender; -(IBAction)displayBackgroundInfo: (id)sender; -(IBAction)actionDone: (id)sender; @end However when I run it, I get the following error message: * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key nameLabel.' In IB I've hooked up the labels/buttons/textbox to the File's Owner (set the File's Owner Class to: ContactDetailViewController) Anyone any idea what I'm doing wrong? Regards, Fiona

    Read the article

  • connect tableView + tableView

    - by totato
    Right now I have an indexed tableview that goes to a detail view but i want it to go to another tableview then a detail view. my code like this: ` - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { displyAnnController *anController = [[displyAnnController alloc] initWithNibName:@"AnnView" bundle:[NSBundle mainBundle]]; DetailViewController *dvController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped]; switch (indexPath.row) { case 0: [self.navigationController pushViewController:anController animated:YES]; [anController release]; anController = nil; break; case 1: [self.navigationController pushViewController:dvController animated:YES]; [dvController release]; dvController = nil; break; default: break; }` and when I press the cell with index 0 in the simulator, the program is crash! what's the problem? pleas help me ..

    Read the article

  • UITabBarController "More" tab issues

    - by codemonkey
    I've got a UITabBarController with 7 tabs. Each of the 7 tabs has its own UINavigationController and customizes its toolbar. When a view is loaded via the UITabBarController's "More" menu its custom toolbar isn't appearing. If i switch the order of the views around so that the same view is now accessible from the UITabBar without going through the "More" menu then the custom toolbar shows up like it's supposed to. Is there a way to customize a NavigationController's toolbar when that NavigationController is loaded via the "More" menu of a TabBarController? I'm actually also interested in replacing the "More" menu navigation controller with my own custom one on views loaded via the "More" menu... not sure whether that's even possible. Any feedback will be appreciated.

    Read the article

  • C# Xamarin.IOS / MonoTouch - Toolbar Disappears

    - by Goober
    I have a Xamarin.IOS/Monotouch project with 2 views - MainView and View2. My MainView window has a navigationController at the top, and a toolbar at the bottom. When I call PushViewController(View2,true); - I get pushed from MainView to my second view (View2). View2 also has a navigationController at the top, but it DOES NOT have a toolbar at the bottom - intentionally. When I click the "Back" button on View2 to push back to my MainView, the toolbar at the bottom of MainView has disappeared. Any ideas on how to get around this? Much appreciated.

    Read the article

  • My map callouts don't display the image when clicked

    - by Neelam Khan
    I am developing an iPhone application for a university project and I'm new to iPhone development. I have looked through Apple's MapCallouts code but it doesn't seem feasible to implement it. So far my code displays a map, drops annotations, displays the title and it displays the right call out button. But this is where I encounter problems. When I press on the callout button, it displays a blank view controller but it should display a different image for every callout that's tapped and this isn't happening so far. I have added my code below: - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { //NSUInteger tag = ((UIButton *)control).tag; if (self.detailController==nil) { DetailViewController* detailViewController = [[DetailViewController alloc] init]; [self.navigationController pushViewController:detailViewController animated:YES]; } // self.detailController.tag =1; //to identify image required // self.detailController.tag = tag; [self.navigationController pushViewController:detailController animated:YES]; }

    Read the article

  • Why does addSubview load the view asynchronously

    - by moshe
    I have a UIView that I want to load when the user clicks a button. There happens to be some data processing that happens as well after I call addSubview that involves parsing an XML file retrieved from the web. The problem is the view doesn't show up until after the data processing even if addSuview is called first. I think I'm missing something here, can anyone help? Code: I have a "Loading..." view I'm adding as a custom modal (meaning I'm not using the modalViewController). This action is linked to a button in the navigationController. - (IBAction)parseXml:(id)sender { LoadingModalViewController *loadingModal = [[LoadingModalViewController alloc] initWithNibName:@"LoadingModalViewController" bundle:nil]; [navigationController.view addSubview:loadingModal.view]; [xmlParser parse]; }

    Read the article

  • How to position a UIToolbar at the top of the screen?

    - by Mr_Nizzle
    I've figured out how to hide the navigation bar and then show the toolbar it has built-in but the toolbar appears at the bottom os the screen how can i position the toolbar on the top of the scren? here's some of my code UIBarButtonItem *yesterday = [[UIBarButtonItem alloc]initWithTitle:@"Yesterday" style:UIBarButtonItemStyleBordered target:self action:@selector(yesterday:)]; UIBarButtonItem *today = [[UIBarButtonItem alloc]initWithTitle:@"Today" style:UIBarButtonItemStyleDone target:self action:@selector(today:)]; UIBarButtonItem *tomorrow = [[UIBarButtonItem alloc]initWithTitle:@"Tomorrow" style:UIBarButtonItemStyleBordered target:self action:@selector(tomorrow:)]; UIBarButtonItem *month = [[UIBarButtonItem alloc]initWithTitle:@"Month" style:UIBarButtonItemStyleBordered target:self action:@selector(month:)]; NSArray *items = [NSArray arrayWithObjects:yesterday,today,tomorrow,month, nil]; [yesterday release]; [today release]; [tomorrow release]; [month release]; [self setToolbarItems:items]; [[self navigationController] setNavigationBarHidden:YES animated:NO]; [[self navigationController] setToolbarHidden:NO animated:YES]; Thanks.

    Read the article

  • Problem adding UIBarButtonItems to a ToolBar

    - by Olivier de Jonge
    I have a UINavigationController with a UITableViewController in it. I want to show a ToolBar on the bottom with UIBarButtonItem's. The ToolBar is showing up, but the buttons won't appear. Anyone knows why? - (void)viewDidLoad { [super viewDidLoad]; [[self navigationItem] setTitle:@"Selections List"]; [[self navigationItem] setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addProjectSearch:)] autorelease]]; [[self navigationItem] setLeftBarButtonItem:[self editButtonItem]]; [[super tableView] setDataSource: self]; [[super tableView] setDelegate: self]; //Toolbar UIBarButtonItem * logoutButton = [[[UIBarButtonItem alloc] initWithTitle:@"Log out" style:UIBarButtonItemStylePlain target:self action:@selector(logOut:)]autorelease]; NSMutableArray * arr = [NSMutableArray arrayWithObjects:logoutButton, nil]; [[self navigationController] setToolbarHidden: NO animated:YES]; [[self navigationController] setToolbarItems:arr animated:YES]; }

    Read the article

  • iPhone - UITableViewController not loading table

    - by RyanJM
    I'm pushing a UITableViewController onto a navigationController. The title (set in the viewDidLoad) shows up but not the table. numberOfSectionsInTableView is called. But tableView:numberOfRowsInSection: is not called. I'm passing in 1 so it should be looking for number of rows. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } I'm setting up the view in the following manner: SelectUserViewController *nextController = [[SelectUserViewController alloc] initWithStyle:UITableViewStyleGrouped]; nextController.managedObjectContext = managedObjectContext; OrangeQCAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.navigationController pushViewController:nextController animated:YES]; Again, the viewDidLoad method is called. And my class is set up as follows: @interface SelectUserViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {...} What else should I be looking at? When I go through the debugger, after it looks at numberOfSectionsInTableView it just disappears (I think it is in the UITableViewController class) and never comes back.

    Read the article

  • Remove a toolbar when pushing a new view

    - by nevan
    In the iPhone maps app there's a toolbar at the bottom of the map view (it contains the Search/Directions segment control and others). When moving from the map view by clicking on a callout, the toolbar slides out with the map view, leaving the next view (a table controller) with no toolbar. I've tried to do the same thing with [self.navigationController setToolbarHidden:YES animated:YES] in the second view controller, but this gives a strange toolbar sliding down animation, while the map view is sliding to the left. Using [self.navigationController setToolbarHidden:YES] in viewDidLoad:animated also causes a bad effect (it makes the toolbar disappear the moment the push animation starts, leaving an ugly white space). I'm assuming the answer to this is to use a nib file, but I'd prefer to do it programatically (if possible). How can I get the toolbar to "stick" to the map view and slide out with it when I push a new view controller? Thanks.

    Read the article

  • iPhone SDK - keep data in modal view

    - by swalkner
    Hi all, I've got a modal view loaded the following way: ModalViewController *modalController = [[ModalViewController alloc] initWithNibName:@"ModalViewController" bundle:nil]; searchController.delegate = self; [self.navigationController presentModalViewController:modalController animated:YES]; [modalController release]; When the modal view appears, "viewDidLoad" is called. When I dismiss the modal view via [self.navigationController dismissModalViewControllerAnimated:YES]; the method "viewDidUnload" ISN'T called, but the next time I let the modal view appear, "viewDidLoad" is called again. My problem now is that I'm creating an NSArray in the modal view's "viewDidLoad" - and as I'm fetching the data from the web, I would like to do it only once. But this way, it's fetched every time... Any hints how I could achieve that the data is only fetched once? I would really like to do it in the modal view and not in the parent and provide the array as parameter to the modal view... Thanks!

    Read the article

  • Correct way to add "Tab Bar" in Navigation based tamplate in iPhon

    - by iPhoneDev
    I have added Tab Bar in Navigation based tamplate like this: [self.navigationController pushViewController:anotherViewController animated:YES]; And I think this is not the correct way to have Tab Bar in detail view in Navigation based tamplate. Please make me correct? UnsentView *unsent = [[UnsentView alloc] initWithNibName:@"UnsentView" bundle:nil]; unsent.title =@"Unsent"; UITabBarController *anotherViewController = [[UITabBarController alloc] init]; anotherViewController.viewControllers = [NSArray arrayWithObjects: unsent, setting, nil]; [self.navigationController pushViewController:anotherViewController animated:YES]; [anotherViewController release];

    Read the article

  • unrecognized selector sent to instance

    - by iamsmug
    My app works fine in the simulator but when I run it on my phone I get this error: 2010-04-05 21:32:45.119 Top Banana[119:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[MethodViewController setReferringObject:]: unrecognized selector sent to instance 0x16e930' It happens here: -(void)method { [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:0.50]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO]; MethodViewController *methodViewController = [[MethodViewController alloc] initWithNibName:@"MethodViewController" bundle:0]; NSManagedObject *selectedObject = self.referringObject; methodViewController.referringObject = selectedObject; [self.navigationController pushViewController:methodViewController animated:NO]; methodViewController.title = @"Method"; [UIView commitAnimations]; [MethodViewController release]; } It crashes on this line: methodViewController.referringObject = selectedObject; Not sure how to resolve this as it works in the simulator, I'm sure it is fairly basic to fix, any help will be appreciated.

    Read the article

  • Presenting an EKCalendarChooser modally

    - by pmb
    I'm trying to present the new EKCalendarChooser in my app as a modal view. I'm doing it using the following code: EKCalendarChooser *calendarChooser = [[EKCalendarChooser alloc] initWithSelectionStyle:EKCalendarChooserSelectionStyleMultiple displayStyle:EKCalendarChooserDisplayAllCalendars eventStore:self.ekDataSource.eventStore]; calendarChooser.showsDoneButton = YES; calendarChooser.showsCancelButton = NO; calendarChooser.modalTransitionStyle = UIModalTransitionStyleCoverVertical; calendarChooser.delegate = self; [[self navigationController] presentViewController:calendarChooser animated:YES completion:nil]; The problem I'm having is that when the view is displayed, it is missing the done button. If however, I display the view using the following code: [[self navigationController] pushViewController:calendarChooser animated:YES]; It works just fine. The done button is displayed. Shouldn't the done button be shown with the presentViewController call as well? Thanks in advance for any help! pmb

    Read the article

  • Best way to call other class view in iphone?

    - by aman-gupta
    Hi, Generally i call my other class view by creating a pointer of delegate and then call the other class by using its link as below:- First Way :- Mydelegate *ptr = (Mydelegate *)[[UIApplication sharedApplication]delegate]; [self.navigationController pushViewController:ptr.NextClasspointer animated:YES]; Second Way :- Create a pointer of that class which u want to call :-- NextClass *nextptr = [[NextClass alloc]initWithnibName:@"NextClass" bundle:nil]; [self.navigationController pushViewController:nextptr animated:YES]; [nextptr release]; nextptr = nil; These above two methods i generally used but my problem is that which one is best for big project so that my stack problem will be removed I mean memory issue will be solved.And is it necessary to release pointer in first and second case is the way i release is correct or wrong Please help me Thanks in Advance

    Read the article

  • Where to add an observer to the NotificationCenter in a UITableViewController

    - by Saifis
    I want to send a notification from a UITableViewController-A to UITableViewController-B. I was adding the observer in the initwithCoder of the UITableViewController that is supposed to catch the notifications. The classes are correlated as folows RootViewController ===NavigationController-A =====UITableViewController-A ===NavigationController-B =====UITableViewController-B I need to add the observer before the views are actually loaded because notifications may be sent before the view is called. However I have been told that initializing in the initWithCoder method in a UIViewController is not advisable, and was told to add the observer in the AppDelegate. Are there any other suggestions for doing this?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >