Search Results

Search found 418 results on 17 pages for 'ib'.

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

  • addSubview and autosizing

    - by neoneye
    How does one add views to a window, so that the views are resized to fit within the window frame? The problem I'm making a sheet window containing 2 views, where only one of them is visible at a time, so it's important that the views have the same size as the window. My problem is that either view0 fits correctly and view1 doesn't or the other way around. I can't figure out how to give them the same size as the window. Possible solution I could just make sure that both views have precisely the same size within Interface Builder, then it would work. However I'm looking for a way to do this programmatically. Screenshot of view0 Below you can see the autoresizing problem in the top and the right side, where the view is somehow clipped. Screenshot of view1 This view is resized correctly. Here is my code Can the views be resized before adding them to the window. Or is it better to do as I do now where the views are added one by one while changing the window frame. How do you do it? NSView* view0 = /* a view made with IB */; NSView* view1 = /* another view made with IB */; NSWindow* window = [self window]; NSRect window_frame = [window frame]; NSView* cv = [[[NSView alloc] initWithFrame:window_frame] autorelease]; [window setContentView:cv]; [cv setAutoresizesSubviews:YES]; // add subview so it fits within the contentview frame { NSView* v = view0; [v setHidden:YES]; [v setAutoresizesSubviews:NO]; [cv addSubview:v]; [v setFrameOrigin:NSZeroPoint]; [window setFrame:[v frame] display:NO]; [v setAutoresizesSubviews:YES]; } // add subview so it fits within the contentview frame { NSView* v = view1; [v setHidden:YES]; [v setAutoresizesSubviews:NO]; [cv addSubview:v]; [v setFrameOrigin:NSZeroPoint]; [window setFrame:[v frame] display:NO]; [v setAutoresizesSubviews:YES]; } // restore original window frame [window setFrame:window_frame display:YES]; [view0 setHidden:NO]; [view1 setHidden:YES];

    Read the article

  • Changing custom cell appearance when entering editing mode

    - by Nava Carmon
    Hi, I have a table with custom cells, that I built in IB. When entering editing mode, content of all cells is moved to show delete edit control. My question is where can I adjust the cell appearance before entering editing mode? I saw that willBeginEditingRowAtIndexPath function is supposed to let adjust the UI, but seems I don't get there at all. Please help, TIA

    Read the article

  • Interface builder background color => clear color ?

    - by jchatard
    I've setup some background colors for my Labels in order to position them. Now that they are well in place, I vould like to reset their background color to none, or clearColor. But I don't find any way to achieve this in IB, I don't gind any "no color" color... Any way to do this without re-coding color at runtime? Thanks, Jérémy

    Read the article

  • how do I copy UITextField data into a UILabel

    - by orangecl4now
    I have a textfield and a label. When you touch the textfield, the keyboard appears In IB, the textfield's properties are Keyboard: ASCII Capable Return Key: Done I wired the IBOutlet to the label and the textfield. How do I get the keyboard to go away when I'm done entering text. How do I get to copy the text to the UIlabel? thanks

    Read the article

  • Animating multiple UIViews at once using CoreAnimation

    - by Thomas
    Hi, I'm using a UIImageView as a background-image and placed multiple UIButtons on it. Now I want to move the UIImageView (with all the buttons on it) out of sight with a smooth animation. I couldn't find a container or grouping element in IB, so is there a way to move all the Views at once? Thank you in advance and sorry for my english!

    Read the article

  • Customize iPhone view for iPad

    - by Erick Sasse
    I have converted a very simple iPhone app to Universal app. Now I need to customize the view on the iPad to use a higher resolution image for the background, move and resize some labels, etc. How can I do it without changing the iPhone version? I can see that there is a new MainWindow-iPad.xib, but when I open in IB, it looks empty. Thanks.

    Read the article

  • Interface Builder Does Not Recognize Toolbar Buttons

    - by Sheehan Alam
    I created 4 UIButton's that are Custom and Plain in IB. I added a background image to them and then placed them onto my UIToolbar. I created IBActions and hooked up all of the buttons I did not create @property for the buttons, but 3/4 of them appear on my toolbar and they work. Why isnt my 4th button appearing? If I need to declare an @property for them, will it be a UIToolbarButtonItem or a UIButton?

    Read the article

  • How do I enable spell checking within an NSTextField on Mac OS X?

    - by Luke
    I have an NSTextField that I would like to enable "as-you-type" spell checking. When I load my application I can do this from the Menu Bar Edit Spelling and Grammar Check Spelling While Typing. I would like this option to be enabled by default. Within IB I can enable this for a NSTextView but I would like to use NSTextField for this part of the UI. Thank you.

    Read the article

  • Terminating app due to uncaught exception 'NSInvalidArgumentException' in iPhnoe

    - by mayur birari
    i have view controller including image ,table and tab ,i want to fill the table thats why i written separate class for table as uitableviewcontroller and give mapping to that class in IB, but i have following exception Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[AssetTableView superview]: unrecognized selector sent to instance 0x39322b0' please give me answer ,i am waiting, thANKS IN ADVANCE

    Read the article

  • Custom UITableViewCell not appearing when row height is set

    - by Sheehan Alam
    I have a custom UITableViewCell which I have created in IB. My labels display when I don't over-ride: - (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath however my content is squished. I want the height to be 120px so I have the following: - (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath { CGFloat rowHeight = 120; return rowHeight; } I'm not sure why the content inside of my UITableViewCell all of a sudden disappears?

    Read the article

  • How do I hide the text on a label in Obj-C?

    - by dbonneville
    I'm using label of a button to send a value into a function. However, I want the button to be invisible. I have the background color turned of in IB, and the text color is also set to nothing, but the text still shows up on the button. Is there another way to have a clear button that sends a value when it's clicked? If I could just turn off / hide the text on the stock UIButton that would be perfect... Thanks, Doug

    Read the article

  • How do I use AFAssistantPane?

    - by Koning Baard
    I have searched my entire Mac for ibplugin to find the QTKit IBPlugin, but I also came accros a plugin which adds AFAssistantPane to IB. I did a Google-search but Google has no results for it. So, does anyone know how I can use this AFAssistantPane? Thanks Update: I noted that this is in a private framework (that's why it is not documented).

    Read the article

  • Why is my Interface Builder wiring so bonkers and what can I do to straighten it out?

    - by editor
    I've been working on an iPhone application in XCode and Interface Builder of the Tab Bar project type. After getting a table view of topics (business sectors) working fine I realized that I would need to add a Navigation Control to allow the user to drill into a subtopics (subsectors) table. As a green Objective-C developer, that was confusing, but I managed to get it working by reading various documentation trying out a few different IB options. My current setup is a Tab Bar Controller with Tab 1 as a Navigation Controller and Tab 2 a plain view with a Table View placed into it. The wiring works: I can log when table rows are selected and I'm ready to push a new View Controller onto the stack so that I can display the subtopics Table View. My problem: For some reason the first tab's Table View is a delegate and dataSource of the second ta. It doesn't make sense to me and I can't figure out why that's the only setup that works. Here is the wiring: Navigation Controller (Sectors) is a delegate of Tab Bar Navigation Bar is a delegate of Navigation Controller (Sectors) View Contoller (Sectors) has a view of Table View Table View (in Navigation Controller (Sectors)) is a delegate of First View Controller (Companies) Table View (in Navigation Controller (Sectors)) is a dataSource outlet of First View Controller (Companies) First View Controller (Companies) First View Contoller (Sectors) has a view of Table View Table View (in First View Controller (Companies)) is not hooked up to a dataSource outlet and is not a delegate When I click the tab buttons and look at the Inspector I see that the first tab is correctly hooked up to my MainWindow.xib and the second tab has selected a nib called SecondView.xib. It's in the File's Owner of MainWindow.xib where I inherit UITableViewDataSource and UITableViewDelegate (and also UITabBarControllerDelegate) in the .h, and in the .m where I implement the delegate methods. Why does this setup only work when the Table View in my first tab (View Controller (Sectors)) is a delegate and dataSource of the second tab? I'm confused: why wouldn't it need to be hooked up to the Navigation Controller-enabled tab in which the Table View is seen (Navigation Controller (Sectors))? The Table View seen on the second tab has neither dataSource and is not a delegate. I'm having trouble getting a pushViewController to fire (self.navigationController is not nil but the new View Controller still doesn't load) and I suspect that I need to work out this IB wiring issue before I can troubleshoot why the Nav Controller won't push a new View Controller onto the stack. if(nil == self.navigationController) { NSLog(@"self.navigationController is nil."); } else { NSLog(@"self.navigationController is not nil."); SectorList *subsectorViewController = [[SectorList alloc] initWithNibName:@"SectorList" bundle:nil]; subsectorViewController.title = @"Subsectors"; [[self navigationController] pushViewController:subsectorViewController animated:YES]; [subsectorViewController release]; }

    Read the article

  • iPhone SDK Question with Audio/Mic

    - by Henry D'Andrea
    I am trying to do an app, to where when it launches, it will detect audio, and then play it back automatically. NO BUTTONS, nothing to press. Just a picture of something then, it listens for audio, then plays it back. Similar to the Talking Carl app in the App Store. Any ideas/help? Would appreciate it, if i could use the code with IB.

    Read the article

  • UISegmentedControl not expanding size for navigation bar/very squished

    - by davetron5000
    Running through an iPhone SDK book and one of the examples has me creating a table and then later adding a UISegmentedControl to the table for sorting. I dutifully did this in IB, and it looks great: When I run it in the simulator or my phone, it's totally squished: The buttons work perfectly, it's just they are not sizing according to their content. Any ideas what's going wrong? Here's the attributes I have set:

    Read the article

  • Adding back button to navigation bar

    - by 4thSpace
    I've added a navigation bar to a UIViewController. It is displayed from another UIViewController only. I'd like to have a left side back button that is shaped similar to an arrow, just like the normal navigation bar back button. It seems I can only add a bar button through IB. I'm guessing the back button needs to be added programmatically. Any suggestions on how I should do this?

    Read the article

  • Preview rounded image in iphone

    - by camilo
    Hi, can anyone tell me how can I create an image preview inside a customized cell with the aspect of the ones loaded in the mms'. I've been trying to do it by changing values in IB and I haven't been able to. Thanks a lot!

    Read the article

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