addsubview

Apple Interface Builder: adding subview to UIImageView

I created UIImageView with the help of Interface Bulder. Now I want to place label inside it (as its subview). In code I can type something like: [myUIImageView addSubview:myUILabel]; But can I do it with the help of IB? I found the solution for UIView, but can't find something similar for UIImageView. ...

Is the method addSubview of NSView inherently slow? (Cocoa OSX)

I am trying to speed my gui that loads very slow slow when I am loading a large project (the gui is a representation of groups and sub groups and is made up of many views). During this process I was looking at how long certain code segments take to execute and I have found that a call to addsubview is taking between 10 and 20 millisecon...

iphone SDK: How to add image subview to UITableViewController and still see cells?

I'm adding an image subview to an UITableViewController with a grouped table. Once I add the image subview I can see the table headers on top of the image, but the cells are being drawn behind the image. Is there something else I need to do to ensure that the table cells appear on top of the background image? Here is the code I'm using...

Initialization of controllers in a for loop - leaking problem ?

Hey, I am creating a kinda gallery and for each gallery I created a view controller whose view is added to a scrollview (see code below) : GalleryViewController *galViewController; for (NSUInteger i = 0 ; i < [galleries count]; i++) { galViewController = [[GalleryViewController alloc] init]; galViewController.record = [galleri...

How to change the UIImage of a UIImageView from a subview?

I want to change an image on a view, from a popup dialog of 4-6 icons (imagine like changing your image on a messenger application). The way I implement this modal popup is by creating a new view at IB, with opacity on the background, and then I load this as a subview: IconsViewController *iconsViewController = [[IconsViewController...

Go back to main window once secondView is loaded

Hi, I have a Tableview on AppDelegate That calls a SecondView (dvController) when DidSelectRowAtIndexPath using: [self.window addSubview:[dvController view]]; On SecondView I defined a button linked to IBAction that should go back to previous view. It works great but when row selected but, How could then go back to previous view if mai...

Displaying indexed png- files out of NSArray on the iphone screen

Hi, i like to create an artwork counter- display on an iphone, diplaying 0 to 9. The 10 digits are 10 png- files with the numbers 0 to 9 as their artwork content. The 10 png- files are implemented by using NSArray. Following you'll find the implementation- code: zahlenArray = [NSArray arrayWithObjects: [UIImage imageNamed:@"...

Adding a UIPickerView over a UITabBarController

I'm trying to have a UIPickerView slide from the bottom of the screen (over the top of a tab bar) but can't seem to get it to show up. The actual code for the animation is coming from one of Apple's example code projects (DateCell). I'm calling this code from the first view controller (FirstViewController.m) under the tab bar controller....

Subview appears behind tableview

When I add a subview to my UITableViewController, it seems to be underneath the tableview. I may be loading my subview incorrectly, or calling addSubview in the wrong place. The subview I'm referring to is the red area above the tabbar that also contains the "Click me" button: You can see that the cell lines kind of overlap. Here i...

Fully-loaded UIViewController losing all it's data after adding to scroll view

Summary I'm repurposing Apple's Page Control project. In loadScrollViewWithPage:, the view controllers that I'm adding to the scroll view appear on screen without their initialized values, as if displayed directly from the nib. Specifics Here's the code that appears to be working when I step through it: CBFullScreenViewController *c...

Build xib Interface Builder and load them as subview in iphone

Hi all, what I would like to know if it's possible to build a view and its correspondent xib file. Then, in a generic controller, load this view programmatically and add as a subview to the current view. This subview should act as a generic info box which can be loaded by many controller. thanks Leonardo ...

[self.view addSubview:UIView] doesn't work correctly. addSubview problem

Help me. addSubview doesn't work. I want to add "ContentView" on scrollView. But "ContentView" doesn't appear on screen. "ContentView" is UIView. When I change to self.view=scrollView from [self.view addSubview:scrollView], addSubview doesn't work. Please teach me how to add UIView on this screen!! - (void)viewDidLoad { [super viewDid...

Viewcontroller not getting pushed to stack

hi.I am fairly new to iphone. I have a peculiar problem. I am adding a view controller as a subView to the current view. And then i want to push a new view controller from it. The problem is when i try to do pushViewController, it is not responding. The am stuck where i was. EG: In CurrentViewController i have added NewViewController's...

how to remove sub views.

Hi I have added UIButton,UITextView as subview to my view, programatically. notesDescriptionView = [[UIView alloc]initWithFrame:CGRectMake(0,0,320,460)]; notesDescriptionView.backgroundColor=[UIColor redColor]; [self.view addSubview:notesDescriptionView]; textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0,320,420)]; [self.vi...

UIViewController remove subview

Hi all! I add a view as subview of my uiviewcontroller like this: // into my ViewController: UIImageView *imView =[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"img.jpg"]]; imView.frame = CGRectMake(2, 46, 1020, 720); [self.view addSubview:imView]; now, with another button I wish remove the imView from the subview chain.. ho...

Iphone: Cannot switch back from my landscape view to a portrait view

Hello, I am working on an app (my first one), which is basically a TabBar app. To be more precise there are: - a login view controller - a tab bar controller (when login is done) - a landscape view controller that is used when the first itel of the TabBar is switch from Portrait to Landscape. So, when I am in the first tab, I need to ...

iphone sdk: how to correctly switch controller

hello, I am struggling with my app for a couple of days now and there are some things I am not sure to do correctly. I have an app with a login view controller, a tab bar view controller and a landscape view controller that should only be used when the first tab is in landscape mode. I have added those 3 controllers as attributes of the ...

PresentModalViewController or addsubview?

Hi I am writing an app in xcode 3.2.3. All I want to do is switch to another view but I am unsure of the best way to do this. I can do it either of these 2 ways... PreferencesViewController *screen = [[PreferencesViewController alloc]initWithNibName:nil bundle:nil]; screen.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [...

how to add my view controller nib file as a sub view of another rootview controller

i am having vie controller nib file with its classes .h and .m and i want to add this view as a sub view to my rootview controller innavigation controller how to add it.. i want a syntax to this .. please help me.... ...

How is the location of a subView set?

I am using the standard facebook connect button with the method FBLoginButton *loginButton = [[[FBLoginButton alloc] init] autorelease]; [self.view addSubview: loginButton]; and It places it where I dont want it. How can I set that subviews location? ...