subview

UITextView change height instead of scroll

By default, the UITextView's contentView becomes scrollable when there is too much text to fit into the textview based on it's height. I'd like to disable this and instead, update the height of the UITextView to fit in the text. The reason I'm doing this is because I'm adding the UITextView as a subview of a UIScrollView which should ha...

Subview Doesnt AutoSize When Added to Root View Controller

Hello, I have a root view controller that will have up to 10 or so subviews. I am implementing autorotation/autosize accross the entire app. My problem is this: - When I allocate all the view controllers and add each as a subview to the root controller during startup, everything works as it should. The only problem is that each view c...

Iterating 'Active' View Controllers

Ola Folks, In an iPhone application I am displaying different views by using the addSubView:SomeViewController.view method. I want to be able to, at the very least, log the view controllers that are in the view hierarchy that is being displayed. I would prefer to be able to get a handle to a specific view controller. I know how to ite...

CGAffineTransform does not rotate subview - MKAnnotationView, CGAffineTransformMakeRotation

I have a view that does 1 simple thing: draws an image. I can rotate the image like this: CGAffineTransform transform = CGAffineTransformMakeRotation((CGFloat)radians); self.transform = transform; // WORKS: DRAWS, ROTATES But if I delegate the image-drawing function to a subview, and apply the rotation transform to the subview: C...

integrate a view into another view in iphone

Good Day! i want to add a subview in another view in iphone. and i want that child view to be of size which i want like if i want to change its height/width i can. Can somebody please suggest me something or help me out in this regard. Thanks in advance ...

Why i cannot get the frame of a UIView in order to move it? The view is defined.

I am creating a nav-based app with a view that floats at the bottom of the screen (Alpha .7 most of the time). I create it like this... // stuff to create the tabbar/nav bar. // THIS ALL WORKS... // then add it to subview. [window addSubview:tabBarController.view]; // need this last line to display the window (and tab bar controller)...

UITableView subview to uitableviewcell

i am trying to add a button to the tableview and no matter what frame i specify the button is not visible. This is a custom UITableViewCell and I am adding the button in the code rather than in the xib file is so that I can click on the button and perform an action which is not didSelectRowAtIndexPath: I have the following code in cellF...

Removing UITextField from superview does not make it disappear on screen

I have the following code // Breakpoint here [label removeFromSuperview]; [label release]; label = nil; stepping through it with the debugger outputs (gdb) po [self subviews] <NSCFArray 0x476af70>( <UIImageView: 0x47581a0; frame = (0 0; 232 81); opaque = NO; autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x476b3d0>>...

Warning generated by UIButton setting code

I have a for loop setting the background images on buttons, basically the buttons are thumbnail previews of different items & can't be set statically, however the code gives an warning because it runs through all the UIViews but then calls setBackgroundImage which does not apply to all views. The warning is an irritation, I understand wh...

Call Navigation Controller from Subview

Hi everyone! how can i push a view from a subview? i've implemented a paging scroll view with custom view. each view has some button and from this buttom i want to push other view into navigation controller. how can i do it? thanks this is the code: RadicalResearchViewController.h #import <UIKit/UIKit.h> @class ListOneViewControl...

Where Does A UIAlertView Live While Not Dismissed

Does anyone know in whose subview an active UIAlertView is located or how to find the thread in which it is running? ...

Subviews are incorrectly positioned by the amount of the iPad status bar

I have a fullscreen view (768x1004), when I add a fullscreen subview to this view, it is incorrectly positioned by the height of the status bar (20 pixels). So the view will be clipped by 20 pixels at the top. I can't figure out why this is happening. The only way I can fix it is to set the origin to CGPointMake(0, 20) in viewDidLoad. I...

[IPHONE] How can I loop through all subviews of a UIView, and their subviews and their subviews...

Hello, How can I loop through all subviews of a UIView, and their subviews and their subviews... Thank you. ...

iPhone loading view from nib only works once

Hi Forum I'm trying to add a «loader-view» to my app which shows a spinner while doing stuff. This works fine the first time, but it doesn't work a second time. here's what I do: I have a viewController for the spinner (spinnerViewController) and a nib-file which I made in IB (spinner.xib). I load the nib in the viewDidLoad-event: ...

call addsubview again causes slowdown

hi guys, i am writing a little music-game for the iphone. I am almost done, this is the only issue which keeps me from rolling it out. any help to solve this is much appreciated. this is what i do: at my appDelegate I add my menu-view-screen to the window. the menu-view-screen acts as a container and controls which view gets presented ...

How to check whether the cell has a subview or not in iphone?

I am new to iphone development.I have a view called barView which is added as the subview to the cell, if want to check for the condition like this if(cell has a subview barview) { do something....... }else { do something...... } How can i check like this, please help me out.Thanks. ...

iPhone question: How can I add a button to a tableview cell?

Hi guys, Little background, the table view is filled by a fetchedResultsController which fills the table view with Strings. Now I'm trying to add a button next to each String in each tableview cell. So far, I've been trying to create a button in my configureCell:atIndexPath method and then add that button as a subview to the table cell'...

Manually fade in a newly added subview?

I want a view to fade in when being added to the stack via [self.view addSubview:someSecondaryViewController.view]; How do I animate this call so that the view fades in (and out)? ...

iPhone: [subview release] removes my subview from the display

I have these two pieces of code. The first one works perfectly: UIView *tmp = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 60.0f, 296.0f, 44.0f)]; [self.dynamicView addSubview:tmp]; [tmp release]; The second one is pretty much the same, but the view doesn't show up. CommentBox *commentBox = [[CommentBox alloc] initWithFrame:CGRectM...

Switching Between Subviews in iPhone App

So, in an iPhone app I am working on, I've decided that the best way to display all the contents to the user is to have the top part of the screen show some information, and the bottom of the screen show different information. However, the bottom part will change sometimes, so I was working on implementing that. Another app that does t...