subview

Dynamicly added subview disappears

I have a UIView that gets created and added as a subview dynamically, not in interface builder. Problem is the subview disappears eventually and all that is left on the screen is the objects that are defined in the xib that is being loaded. It seems to occur once the retainCount of the subview drops from 3 to 2. I'm fairly new to iPhon...

How can I check whether a subview exists at a certain frame in UIScrollView?

I have a UIScrollView with a big contentSize of around 5000*5000. I have the coordinates and the frame of a subview. I want to check whether a subview exists at that exact position in UIScrollView. If no. I will add a new subView and if Yes I will not add. Can anyone help? ...

iPhone Subview Transparent

I subclassed a subview and added it to the current view. It draws a simple circle by overriding the draw method. But the subview has a black background it looks like by default. How do I make the background of my subclassed subview to be transparent? ...

iPhone position of a subview?

I add a view dynamically, but when it appears on the form, it's in the upper left hand corner. Where do I set the X and Y of the new subview? ...

UISegmentedControl Best Practice

Hi all, I'm trying to work out the "best" way to use a UISegmentedControl for an iPhone application. I've read a few posts here on stackoverflow and seen a few people's ideas, but I can't quite sort out the best way to do this. The posts I'm referring to are: http://stackoverflow.com/questions/1559794/changing-views-from-uisegmentedc...

iPhone addSubview overlays the whole view

Hi all, I've created a .xib file and added a UIView to it in IB that I've called detailView. I need to load a .xib into the detailView area, and here is the code I'm using in my view controller to do so: NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"DetailView" owner:s...

UIScrollView - Input outwith visible area

I have a UIScrollView to which I add a bunch of UIImageView's as sub views. Everything works fine apart from that I get input from the subviews when they are outwith the visible area of the scroll view. I would have thought the scroll view would prevent any events from reaching subviews outwith the visible area by default but I presume t...

iPhone - Remove all SubViews?

When my app gets back to it's root controller, in the ViewDidAppear I need to remove all subviews. How is this done? ...

How can I add a UIDatePicker Subview with working user interaction

I have a view based application which has some textboxes that I'm trying to populate with some pickers. For example, one of them will be for date selection. I'm using the following to add a new view to the bottom of my current view, then scroll the entire view upwards: - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { if(...

How to detect a SubView has closed?

I have View A, when the user clicks a button I pop up View B. When the user dismisses View B, and we return to View A I would like to refresh a label on View A, but is there an event that I can use to detect that we have returned to View B? I know that ViewDidLoad doesn't fire again. ...

Why is pushing a new view controller moving my current subviews?

I'm developing an application with a UINavigationBar which by default shows a particular view controller. There's a button in the nav bar that links to an outlet that pushes another xib using: - (IBAction) settingsBtnClicked:(id)sender { SettingsViewController *settingsController = [[SettingsViewController alloc] initWithNibName:@"S...

Setting a subview in UIViewController

Why can't i just set self.mySubView = anoterhView; like one can set self.view = anotherView; ? ## .h @interface TestController : UIViewController { IBOutlet UIView *mySubView; } @property (nonatomic, retain) IBOutlet UIView *mySubView; ##.m @implements TestController @synthesize mySubView; - (void)viewDidLoad { AnotherCon...

iPhone: how do i redraw subviews while pinch zooming a uiscrollview

I am developing an iPhone app that places multiple custom UIViews as subviews in a UIScrollView. The subviews are placed on top of each other as transparent views as each view has its own drawing routines that traces parts of the base view. The base view is a UIImageView that is typically a large image that I want the user to be able t...

How to remove subview loaded from another window/view? iPhone SDK

EDIT: I had set the overlay view to 460px high, not 480. New question: How do you remove a subview loaded to another window/view? ...

Subview shifting down 20 pixels when called in AppDelegate

I'm facing this issue when I'm calling AdMob ad with [rootController.view addSubview:adMobAd]; //setup the ad Upon returning from the ad being clicked the AdMob frame moves down 20 pixels. However it seems that this is not a AdMob issue, but a issue that is also discussed here: http://discussions.info.apple.com/thread.jspa?threadID=2...

How to reference a subview without outlet

Just beginning with iPhone development i seem to miss something fundamental. In a View based application i'm adding programaticaly a UIView subclass in the ViewController implementation file and can set a value: - (void)viewDidLoad { [super viewDidLoad]; CGRect myRect = CGRectMake(20, 50, 250, 320); GraphView *graphView = [[Gr...

Hide a view controller's view while flipping a view

I have 3 views in my app. Main view has 2 buttons and when selected it displays 2nd view(which again has buttons and displays a 3rd view with images). I have a home button on second view. When pressed I want to show the main view. I can do this if I add the 2nd view as subview [self.view addSubview:secondViewController.view] But whenev...

[iphone] How to prevent subview from overlapping tab bar?

Hi, I have a view with tab bar at the bottom. This view is pushed on a navigation controller, so there is also a navigation bar at the top. Unto this view, I would like to show a table view, which I create from its own nib. When I add this view as a subview, it overlaps the tab bar. Is there a way to make this subview automatically re...

warning message with detailed subviews?

Does my code look right? Im trying to load data into my table view and detailed sub view. My table works fine, but the data wont load in my sub view The warning appears under this line nextController.dataItem = [data objectAtIndex:indexPath]; Here is my RootViewController.m // Configure the data for the cell. NSDictionary *...

Tableviews and the subviews with .plist problem

I am trying to use data from my plist in my table view and subview. the table view works fine and everything loads. But I cant get the data into the subview. My app is based around apples advance table cell download My RootViewControllerPoints.m - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)secti...