Search Results

Search found 359 results on 15 pages for 'xib'.

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

  • interface builder breaks on dual display

    - by madmik3
    Hi, I frequently connect and disconnect my laptop from a secondary display. Additionally I work in a small group that uses svn to manage xib files. It seems that if you drag a UIView display into a secondary display in interface builder and save the xib then either disconnect that display or open it on a computer with a secondary display in a different postion (left v right of the screen for example) then the view can't be seen/closed/moved. I've found no work around other than attaching a secondary display in the same position. This can be a real pain. Has anyone found a solution to this? thanks.

    Read the article

  • Conditional interface programming for iPad?

    - by Fyrian
    Hi everyone! I'm working on an app for the iPad and am a little over my head with one issue. Is it possible to build an app for iPad that uses a function to control which interface layout is displayed? Something like "if these parameters are met, use XIB file "a" else use XIB file "b". I know that's not in any kind of legitimate format, but you get the idea. If this is possible, does anyone know of any tutorials on how to do it or sample code I could look at? Thanks!

    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

  • adding a UIScrollView as a superview of 2 UITextview

    - by Risma
    hi i have 2 textview in a viewcontroller. the 1st textview is not editable, but the 2nd is editable. i want to make both of them scroll in the same position and size when the keyboard is appear. I think i have to use UIScrollView as base of both of textview. And then i add the UIScrollView in xib (bot of textview are made in xib too). and this is the picture if this hierarchy : in the viewDidLoad method, i add this code : - (void)viewDidLoad { [super viewDidLoad]; [scrollTextView addSubview:lineNumberTextView]; [scrollTextView addSubview:_codeTextView]; [lineNumberTextView bringSubviewToFront:scrollTextView]; [_codeTextView bringSubviewToFront:scrollTextView]; } but when i tap on the 2nd textview, the keyboard is not appear. What i have to do? thx for the advices

    Read the article

  • adding a UIScrollView as a superview of 2 UITextview made no view can be scrolled

    - by Risma
    hi i have 2 textview in a viewcontroller. the 1st textview is not editable, but the 2nd is editable. i want to make both of them scroll in the same position and size when the keyboard is appear. I think i have to use UIScrollView as base of both of textview. And then i add the UIScrollView in xib (bot of textview are made in xib too). and this is the picture if this hierarchy : in the viewDidLoad method, i add this code : - (void)viewDidLoad { [super viewDidLoad]; [scrollTextView addSubview:lineNumberTextView]; [scrollTextView addSubview:_codeTextView]; [lineNumberTextView bringSubviewToFront:scrollTextView]; [_codeTextView bringSubviewToFront:scrollTextView]; } but after that i can't scroll anything. What i have to do? thx for the advices

    Read the article

  • How to make same UIWebView take data from different local .html files?

    - by Mike Rychev
    I have an app, where there's one UIWebView and a UITableView. I don't want to create many .xib's, so I decided to make one .xib for all elements of the table. When user chooses a table element, the UIWebView appears and I want it to load data from different .html's depending on the name of the parent controller. I tried this: if (selectedTableElement==@"FirstElement") { [childController.message loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"_" ofType:@"html"]isDirectory:NO]]]; } And then myWebView=message; But it didn't work. Thanks in advance!

    Read the article

  • How to set Main Inerface in xCode programatically

    - by Tom Tallak Solbu
    I am using Apples MultipleDetailViews http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html for template as a source for my iPad app. The template is using a splitviewController in the interface builder (MainWindow). In the iPhone/iPad Deployment info of the target, MainWindow is set as the "Main Interface". I want my app to also run on iPhone. This means I need to load a different xib when the app is run on an iPhone. I must then remove "MainWindow" from "Main Interface" because the app will crash when I load on an iPhone due to the splitViewController. The AppDeleagte of the template look like this: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = self.splitViewController; [self.window makeKeyAndVisible]; } If I remove "Main Window" from "Main Interface", how do I then need to change the APpDelegate, or maybe I need to change the MainWindow.xib to also work for iPhone?

    Read the article

  • Customized annotation problem

    - by user128647
    I want my custom UIView (.Xib View) to appear when user tabs on pins (not apple's callOutBubble) and in that UIView there should be a button which fires an IBAction on touched down event. Therefore I have added an AddObserver method to MKAnnotationView. which responds to touch events over pin in MKMapView. I have also added 3 buttons over that XIB view, which have also assigned IBActions. But when I run my application, buttons in the customized annotation view are not responding to IBAction (Touch Down). Why does this happen, and how can I fix it? I need to call a method when those 3 buttons are tabbed.

    Read the article

  • AppDelegate, RootViewController, and UIApplication

    - by guy8214
    Hi Guys I am trying to figure out the relationship between the appdelegate, RootViewControoler, and UIApplication. Here is what I kinda have figured out so far: When starting your application up, main.m gets loaded. From here, your MainWindow.xib gets loaded. In your MainWindow.xib, your File's Owner is of type UIApplication. You set your UIApplication's delegate to your AppDelegate. In your AppDelegate's source code, you can set your RootViewController to be the first view shown. Is this right? What prompts AppDelegate to initially run it's - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { } method?

    Read the article

  • UIViewController presentModalViewController: animated: doing nothing?

    - by ryyst
    Hi, I recently started a project, using Apple's Utility Application example project. In the example project, there's an info button that shows an instance of FlipSideView. If you know the Weather.app, you know what the button acts like. I then changed the MainWindow.xib to contain a scrollview in the middle of the window and a page-control view at the bottom of the window (again, like the Weather.app). The scrollview gets filled with instances of MainView. When I then clicked the info button, the FlipSideView would show, but only in the area that was previously filled by the MainView instance – this means that the page-control view on the bottom of the page still showed when the FlipSideView instance got loaded. So, I thought that I would simply add a UIViewController for the top-most window, which is the one declared inside the AppDelegate created along side with the project. So, I created a subclass of UIViewController, put an instance of it inside MainWindow.xib and connected it's view outlet to the UIWindow declared as window inside the app delegate. I also changed the button's action, so that it know sends a message to the MainWindowController instance. The message does get sent (I checked with NSLog() statements), but the FlipSideView doesn't get shown. Here's the relevant (?) code: FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil]; controller.delegate = self; controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:controller animated:YES]; [controller release]; Why's this not working? I've uploaded the entire project here for you to be able to see the whole thing. Thanks for help! -- Ry

    Read the article

  • Selection Highlight in NSCollectionView

    - by Hooligancat
    On some occasions my head just hurts from banging it against the Cocoa wall. Today is one of those days. I have a working NSCollectionView with one minor, but critical, exception. Getting and highlighting the selected item within the collection. I've had all this working prior to Snow Leopard, but something appears to have changed and I can't quite place my finger on it, so I took my NSCollectionView right back to a basic test and followed Apple's documentation for creating an NSCollectionView here: http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/CollectionViews/Introduction/Introduction.html The collection view works fine following the quick start guide. However, this guide doesn't discuss selection other than "There are such features as incorporating image views, setting objects as selectable or not selectable and changing colors if they are selected". Using this as an example I went to the next step of binding the Array Controller to the NSCollectionView with the controller key selectionIndexes, thinking that this would bind any selection I make between the NSCollectionView and the array controller and thus firing off a KVO notification. I also set the NSCollectionView to be selectable in IB. There appears to be no selection delegate for NSCollectionView and unlike most Cocoa UI views, there appears to be no default selected highlight. So my problem really comes down to a related issue, but two distinct questions. How do I capture a selection of an item? How do I show a highlight of an item? NSCollectionView's programming guides seem to be few and far between and most searches via Google appear to pull up pre-Snow Leopard implementations, or use the view in a separate XIB file. For the latter (separate XIB file for the view), I don't see why this should be a pre-requisite otherwise I would have suspected that Apple would not have included the view in the same bundle as the collection view item. I know this is going to be a "can't see the wood for the trees" issue - so I'm prepared for the "doh!" moment. As usual, any and all help much appreciated.

    Read the article

  • How do I create a UISplitView manually?

    - by Mark
    I have an app that is going to navigate to a UISplitView (inside another view altogether) like so: - (void) switchToMyDayView { NSLog(@"Show My Day Screen"); if (self.myDayController.view.superview == nil) { if (self.myDayController == nil) { MyDayController *myController = [[MyDayController alloc] initWithNibName:@"MyDay" bundle:nil]; self.myDayController = myController; [myController release]; } [homeScreenController.view removeFromSuperview]; [self.view insertSubview:self.myDayController.view atIndex:0]; } } Which is done on the main navigation screen Now, the MyDayController has a XIB called MyDay.xib which has these items: File's Owner: MyDayController First Responder: UIResponder Split View Controller ---->Navigation Controller ---->Navigation Bar ----> Table View Controller ----> Navigation Item ---->View Controller So, I need some more components here, I need a UITableViewController and a UISplitViewControllerDelegate correct? I was going to just implement these protocols in my MyDayController, is this sort of standard? So, after the code above, I get an error: -[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MyDay" nib but the view outlet was not set. so, how can I fix it using the UISplitViewController? I know that the UISplitViewController has a view property, but I cannot use it/connect it up in IB can I? Thanks a lot Mark

    Read the article

  • Custom view in iPhone SDK gets placed incorrectly in realation to statusbar

    - by markqvist
    (ragh, i'm apparently not allowed to post images, so i have included links to the images in this post instead of embedding them) Im writing an iPhone application based on the navigation controller template, but I am not loading the actual navigation controller as the first view in the window. I create a new view controller from a xib, and then add that as a subview, and then only push the navigation view as a modal when i need it. Here's my application: didFinishLaunching ... method in the application deleate RootViewController *rootViewController = (RootViewController *)[navigationController topViewController]; rootViewController.managedObjectContext = self.managedObjectContext; mainViewController = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:[NSBundle mainBundle]]; mainViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [window addSubview:[mainViewController view]]; [[mainViewController view] setNeedsLayout]; [window makeKeyAndVisible]; return YES; It works but the view is not properly aligned with the statusbar: http://img.exdev.dk/1.png When i click "my ambiances" and push the navigation controller view, and then dismiss it again, the layout is fine: same link as above, just replace the 1 with a 2. Sorry for the hassle, apparently I can also only post one link.... Here's the code I use for presenting/dismissing the navigationcontroller: -(void)pushMyAmbiences { [mainViewController presentModalViewController:navigationController animated:TRUE]; } -(void)returnToMainView { [mainViewController dismissModalViewControllerAnimated:TRUE]; } Is there anything I'm missing here? Layout-wise? Something that needs to be set in the xib? In a vain attempt I tried calling setNeedsLayout on the view, no luck. Any help is greatly appreciated!

    Read the article

  • Can I include a NSUserDefault password test in AppDelegate to load a loginView?

    - by Michael Robinson
    I have a name and password in NSUserDefaults for login. I want to place a test in my AppDelegate.m class to test for presence and load a login/signup loginView.xib modally if there is no password or name stored in the app. Here is the pulling of the defaults: -(void)refreshFields { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; usernameLabel.text = [defaults objectForKey:kUsernameKey]; passwordLabel.text = [defaults objectForKey:kPasswordKey]; Here is the tabcontroller loading part: - (void)applicationDidFinishLaunching:(UIApplication *)application { firstTab = [[FirstTab alloc] initWithStyle:UITableViewStylePlain]; UINavigationController *firstNavigationController = [[UINavigationController alloc] initWithRootViewController:firstTab]; [firstTab release]; secondTab = // EDITED FOR SPACE thirdTab = // EDITED FOR SPACE tabBarController = [[UITabBarController alloc] init]; tabBarController.viewControllers = [NSArray arrayWithObjects:firstNavigationController, secondNavigationController, thirdNavigationController, nil]; [window addSubview:tabBarController.view]; [firstNavigationController release]; [secondNavigationController release]; [thirdNavigationController release]; [self logout]; [window makeKeyAndVisible]; Here is where the loginView.xib loads automatically: - (void)logout { loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginView" bundle:nil]; UINavigationController *loginNavigationController = [[UINavigationController alloc] initWithRootViewController:loginViewController]; [loginViewController release]; [tabBarController presentModalViewController:loginNavigationController animated:YES]; [loginNavigationController release]; } I want to replace the above autoload with a test similar to below (that works) using IF-ELSE - (void)logout { if ([usernameLabel.text length] == 0 || [passwordLabel.text length] == 0) { loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginView" bundle:nil]; UINavigationController *loginNavigationController = [[UINavigationController alloc] initWithRootViewController:loginViewController]; [loginViewController release]; [tabBarController presentModalViewController:loginNavigationController animated:YES]; [loginNavigationController release]; }else { [window addSubview:tabBarController.view];} Thanks in advance, I'm totally lost on this.

    Read the article

  • Pushing to a UITable inside a UIView from a UITableview

    - by Michael Robinson
    I can firgure out how to push a UIView from a Tableview and have the "child" details appear. Here is the view I'm trying to load: Here is the code that checks for children and either pushes a itemDetail.xib or an additional UITable, I want to use the above .xib but load the correct contents "tableDataSource" into the UItable: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //Get the dictionary of the selected data source. NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; //Get the children of the present item. NSArray *Children = [dictionary objectForKey:@"Children"]; if([Children count] == 0) { ItemDetailViewController *dvController = [[ItemDetailViewController alloc] initWithNibName:@"ItemDetailView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release]; } else { //Prepare to tableview. FirstTab *rvController = [[FirstTab alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]]; //Increment the Current View rvController.CurrentLevel += 1; //Set the title; rvController.CurrentTitle = [dictionary objectForKey:@"Title"]; //Push the new table view on the stack [self.navigationController pushViewController:rvController animated:YES]; rvController.tableDataSource = Children; [rvController release]; } } Thanks for the help. I see lots of stuff on this but can't find the correct push instructions.

    Read the article

  • Iphone: TabView + TableView

    - by OneTrickPonySoft
    I think I'm missing something simple, but I can't figure out exactly what it is. I'm trying to set up an App with a UITabViewController, and one of the Tabs will have a UITableView and UISearchBar (but no Navigation Controller). I set up the UITabViewController with all the tabs in interface builder, and the views are in their own xib files. The xib file for the tab with the UITableView is set up and connected as follows. Stuff in the browser: File's owner (Class is my custom class that is a child of UITableViewController) view - View View (class UIView, reference view - File's owner) contains: UITableView (if i try and set references to the data source / delegate, the app breaks) UISearchBar (unconfigured at the moment) This setup displays all the items and doesn't lock up, but I can't assign a DataSource without it crashing when i try and load the tab with the UITableView. What should I do to get data into this table, either in IB or code? My ideas are as follows: Implement custom UITableView class, hook up to table view in IB or to custom tableviewcontroller in Xcode. Pound head or laptop against the wall until it works. Update: Here's the error the simulator pushes to the console when I connect the Tableview's data source and delegate to File Owner (who's class is my custom tableviewcontroller). 2/14/09 6:59:12 PM TabBarWillbeRight[33172] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x523760'

    Read the article

  • Interface Builder caching bad data (voodoo)

    - by Ryan Townshend
    Sometimes IB will hold onto old or bad references, and I cannot seem to remove or edit them. EDIT I have made this a wiki question with the intention of gathering more data on the phenomenon. Answers involving situations where other coders have encountered this are welcome. This happened to me again last night with a table controller. When I created a spike project to try and reproduce the error, the system worked the way I anticipated. Then back in the actual project the bad behavior continued, even if I remove the xib file and all controllers involved. Creating a whole new project with none of the original (problematic) xib and nib files worked correctly. This question is not about the specifics of this incident but about this type of incident in IB. Does anyone know more about this type of bad IB behaviour, and possibly a more stylish way to to eliminate it than nuking the project? Note, removing the offending IB files and recreating them in the same project has not solved this for me in the past, only whole new projects. Answers regarding examples of when/how this glitch has been observed/created are welcome as well.

    Read the article

  • iPhone - ModalViewController not raising to top of the screen

    - by Oliver
    Hello, I have a UIImagePickerController that is shown [self presentModalViewController:self.picker animated:NO]; Then later on the code, I allow the user to display a preference panel : PreferencesController *nextWindow = [[[PreferencesController alloc] initWithNibName:@"Preferences" bundle:nil] autorelease]; UINavigationController* navController = [[[UINavigationController alloc] initWithRootViewController:nextWindow] autorelease]; [self presentModalViewController:navController animated:YES]; At this point, the new controller raises on the screen, but don't go to the top. Some space is left "transparent" at the top (I can see the camera view behind), and the bottom of the view is hidden out of the screen. The space I am talking about is about a status bar height. The status bar is not present on the screen. The navigation controller is hidden : self.navigationController.navigationBarHidden = YES; There is a toolbar at the top of the view. Nothing special into the view. The height of the view is defined at 480. All simulated element are set off in IB. The autoresize properties are all set on. I had a previous xib (I rebuilt it from scratch) that worked very well. I don't see what I missed on this one (I have only changed the xib, that replaces the previous one). I've cleaned the cache to be sure there was nothing left. No change... I've deleted everything in the new view to prevent some conflicts. No change... What did I miss ? How could I remove this empty space ?

    Read the article

  • Personalized UIView created with Interface Builder

    - by Malox
    I need to project a personalized UIView with a UIImageView and 3 UILabel. I need to allocate more of this view because I want put it into a UIScrollView. I would avoid to generate the view programatically because it's difficult and boring design it. My idea is to create a new class that extends UIView and design it with interface builder. For example my Personalized View code is like that: #import <UIKit/UIKit.h> @interface PersonalizedPreview : UIView { IBOutlet UIImageView *image; IBOutlet UILabel *first_label; IBOutlet UILabel *second_label; IBOutlet UILabel *third_label; } -(void) setImage:(UIImage *)image; @property (nonatomic, retain) IBOutlet UIImageView *image; @property (nonatomic, retain) IBOutlet UILabel *label; .... @end I would create an associated xib file for this view and initialize it simply specifing the xib file. Note that I don't want create a specific ViewController for this view and PersonalizedView is instantiate at runtime not when the app runs, moreover I don't know how many PersonalizedView I will instantiate, it depends on runtime execution. Anyone can help me? Thank you very much.

    Read the article

  • UIImageView Centering Problem.

    - by sagar
    To understand my problem let's follow this steps. Open - XCode - New Project - View based application. Open View Controller.xib file. Drag an image-view into viewController's view. Place that image view on center of viewController's view. Apply size of 125x125 to image-view. Take any image with dimension of 320 width & 460 height. Drag that image into your application resources directory. Now, Again back to .xib File & select image-view Set image (which is in your resources) to image-view Set Image-view Mode to - Center Ok. Let me explain the situation now. after performing all above steps - image-view has an image which is larger than image-view's size. However, Image-view places that image on center & in View controller image-view is looking proper ( not scaled ). But When you run your application, image-view will be displayed in size of 320x460. ( but it is not actually scaled. ) Now, I can't find the reason, why interface builder is displaying something else & simulator/iphone is displaying something else ? My Query. I want the image's center portion within image-view no matter what image size is. Thanks in advance for sharing your knowledge. Sagar.

    Read the article

  • iPhone toolbar shared by multiple views

    - by codemonkey
    Another iPhone noob question. The app I'm building needs to show a shared custom UIToolbar for multiple views (and their subviews) within a UITabBarController framework. The contents of the custom toolbar are the same across all the views. I'd like to be able to design the custom toolbar as a xib and handle UI events from its own controller class (I'm assuming I can subclass UIToolbar to do so?). That way I could define IBOutlet & IBAction items, etc. Then I could associate this custom toolbar with eachs of the UITabBarController views (and their subviews). But I'm having trouble finding out whether that's possible - and if so, how to do it. In particular, I want to be able to push new views onto UINavigationControllers that are each associated with parent UITabBarController tabs. So, to summarize, I want a: custom toolbar shared by multiple views which are managed by multiple navigation controllers and the navigation controllers are associated with different tabs of a parent tab bar controller The tab bar controller itself is launched modally, though I don't believe that's relevant. Anyway, the tab bar controller is working, as are its child navigation controllers. I'm just having a little trouble figuring out how to persist the shared toolbar to the various subviews. I'd settle for a good clean way of implementing programmatically... though I'd prefer the flexibility of keeping the toolbar's visual design in a xib. Anyone have any suggestions?

    Read the article

  • Loading a UIView from a UITableview

    - by Michael Robinson
    I can firgure out how to push a UIView from a Tableview and have the "child" details appear. Here is the view I'm trying to load: Here is the code that checks for children and either pushes a itemDetail.xib or an additional UITable, I want to use the above .xib but load the correct contents "tableDataSource" into the UItable: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //Get the dictionary of the selected data source. NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; //Get the children of the present item. NSArray *Children = [dictionary objectForKey:@"Children"]; if([Children count] == 0) { ItemDetailViewController *dvController = [[ItemDetailViewController alloc] initWithNibName:@"ItemDetailView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release]; } else { //Prepare to tableview. FirstTab *rvController = [[FirstTab alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]]; //Increment the Current View rvController.CurrentLevel += 1; //Set the title; rvController.CurrentTitle = [dictionary objectForKey:@"Title"]; //Push the new table view on the stack [self.navigationController pushViewController:rvController animated:YES]; rvController.tableDataSource = Children; [rvController release]; } } Thanks for the help. I see lots of stuff on this but can't find the correct push instructions.

    Read the article

  • View Controller Question

    - by user341444
    First off I'm new at programming. I'm creating an app with one navigation bar controller. The app is pretty basic except for a quiz section that is comprised of 12 xibs. As the users takes the quiz a new xib is pushed onto the stack. I want to create a button that takes the user back to the home screen if they do not want to complete the quiz. The back button takes them to the previous xib which could be 11 deep. Is it possible to dismiss the modal views and reload the rootView controller? Here's the code from my delegate @synthesize window; @synthesize navigationController; (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after application launch [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; } (void)dealloc { [window release]; [navigationController release]; [super dealloc]; } This is how I'm pushing new xibs onto the stack (IBAction) showTesting: (id)sender { Testing *varTesting = [[[Testing alloc] initWithNibName:@"Testing" bundle:nil] autorelease]; [[self navigationController] pushViewController:varTesting animated: YES]; } Any help would be greatly appreciated. Thanks

    Read the article

  • How to display controllers with proper aligning in iPhone screen ?

    - by chatcja
    I have a issue of displaying information in iPhone screen. Case is as follows. I crated a view-based application in Xcode name as myView. Then open myViewViewController.xib interface builder, change back groung color and added label at top-let (0, 0) of the view. Then I add new file named as myView2ViewController, which is subclass of UIViewController and corresponding XIB also generated. Open myView2ViewController in IB and added a label at top-left as previous. Also changed the background color. In the "applicationDidFinishLaunching" of AppDeligate do following myView2ViewController *mView = [[myView2ViewController alloc] initWithNibName:@"myView2ViewController" bundle:nil]; [window addSubview:mView.view]; When I run the application, it is shown as upper part of the Label is sheared. It seems as whole UI has been moved 20 px upper (Because, there is a horizontal space in the bottom). I guess this is due to some positioning. But still I could not found any way to fix it. Hope somebody will help me to identify this issue !!

    Read the article

  • Can I use a UINavigationController as the detail view of a UISplitViewController?

    - by B Sweigard
    I'm running into a problem with an iPad app where I would like to have UINavigationControllers in both of the views within a UISplitView. I've looked through other similar questions here, but most link to a tutorial online that doesn't completely solve the problem. Here's a 2-minute walkthrough to re-create the problem I'm having: Create a New Project in XCode, starting from the Split View-based Application template. Add the following NSLog statement as the first line within the DetailViewController's willHideViewController method: NSLog(@"toolbar: %@", toolbar); If you run the application now, the log will show that the DetailViewController's toolbar is alive and well. Now... Open MainWindow.xib and expand the SplitViewController. Drag a Navigation Controller from the library on top of the DetailViewController. Expand the new Navigation Controller and change the class of the UIViewController within to a DetailViewController. Ctrl-drag from the SplitViewController to the DetailViewController and assign it as the delegate. Save MainWindow.xib and run the app again. At this point, the detail view has a navigation bar and an empty toolbar. If you view the logs, you should find that the toolbar is null. Why is this? Am I missing some sort of connection in Interface Builder? Is the navigation bar the problem for some reason? Unlike the tutorial at http://www.cimgf.com/2010/05/24/fixing-the-uisplitviewcontroller-template/, I would like to keep both the navigation bar and the toolbar (preferably with the toolbar at the top when in portrait and not visible when in landscape), so that I still have a functional "Back" button when the iPad is in portrait orientation. Does anyone have any suggestions for fixing this problem? An example project with this sort of set-up would be ideal.

    Read the article

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