subview

iphone/ipad - parent UIView is blocking touches from getting to subviews - why???

I have a UIView which has a bunch of subviews. The subviews should be able to receive touch events, but for some reason the parent UIView takes the touch and does not pass it on. I have created it in a very standard way like I always create views: UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0,0,1024,768)]; self.mainVi...

addsubview issue at window

hi, i want to add two subviews to window in my AppDelegateController. both in landscape mode. when i add the first view, it is in landscape (that's fine), but when adding the second, it is automatically in portrait mode. any advice? thanks + regards that's in my AppDelegate.m [window addSubview:viewController.view]; CGRect frame = s...

Access Subview in another ViewController?

hi, how can i access a subview i added in another view controller? Like DummyViewController: - Subview 1 - Subview 2 TestViewController: - Subview 3 Now I want to access the properties of Subview 1 (DummyViewController) in Subview 3 (TestViewController). Thank + Regards ...

iphone - determine if touch occurred in subview of a uiview

In a subclass of UIView I have this: -(BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { if(touch occurred in a subview){ return YES; } return NO; } What can I put in the if statement? I want to detect if a touch occurred in a subview, regardless of whether or not it lies within th...

How to Resize View so That Its Subviews Get Resized Too

My window adds a subview (my root ViewController's view). Such subview is superview of several other subviews. I have just finished an app, and now I want to add an ad. Here's some code: [window addSubview:viewController.view]; viewController.view.frame=CGRectMake(0,0,320,480-48); viewController.clipToBounds=YES; Ad *ad=[Ad alloc] in...

How to get UINavigationController child view

Hello guys, I have one detail view controller in splitView - SearchDeatilViewController. But that view controller is attached to navigation controller. How can I get that subview to take controll of him? I tried like this, to reload sub view tableView: SearchDetailViewController *detail1 = (SearchDetailViewController *)[self.viewContr...

How to remove a SubView from a NSSplitView in cocoa?

I'm loading two different views with this IBActions - (IBAction)showFirstView:(id)sender{ theDetailViewController = [DetailViewController new]; [theDetailViewController initWithNibName:@"DetailView" bundle:nil]; NSView *splitRightView = [[theSplitView subviews] objectAtIndex:1]; NSView *aDetailView = [theDetailViewCont...

Toolbar floats over the Movie launched with MPMoviePlayerViewController

Hi All, I am trying to launch a movie from within a subview of a toolbar view. The movie plays but the problem is that toolbar floats on top of the movie. I believe the MPMoviePlayerViewController is supposed to take care of this for us because it opens as a modal view. But I am not sure why this is case for me... Any help to this ...

When changing UIWindow subviews, orientation is not set

If a view is added to the window, orientation is set as portrait even if the device is in landscape. If the view is added in the app delegate, application:didFinishLaunchingWithOptions: method, then it works correctly. But if the view is added later it does not. As an example, I have a routine to switch views. Simplest form is: - (void...

How to properly switch UIViews

I want to have multiple views in my application that I switch between. What is the proper way to switch between UIViews that also supports UISplitViewController? Is there a support way to switch or are Apple's controller classes designed to be root and root only? I've tried having one root view and root controller and swap subviews in ...

Iphone SDK: Use the same UIImageView at different places in a UIIView?

Hi guys I got a problem. I would add the same UIImageView at different places to my View. So I could make 10 UIImageViews with the same image but with other names. But i got ca. 50 UIImageViews... I make my UIImageView with this code: Code: CGRect dragRect = CGRectMake(0.0f, 0.0f, 70.0, 70.0); dragRect.origin = CGPointMake(10, 300);...

My NIB subview throws NSUnkwownKeyException when connecting IBOutlets

I have used IB to create a NIB that will be loaded as a subview into my apps main view. That main view is a UIImagePickerController (its called visorViewController) and does not have a nib of it's own - it is complex it and was coded by hand. My subview is its own class - newSuperBlob.m/.h/.xib, and it is a subclass of UIView. Using a v...

Editable, customizable UITextView in UIAlertView

EDIT: Not really a problem, I did a typo. It actually works just fine :) Original question: Hey. I'm trying to place a UITextView in or on top of an UIAlertView. I know that the UIAlertView automatically uses a UITextView if message of the alert is too long, but I want it to always be an UITextView, and I want it to be editable and ...

Adding subview to a subview from another method

Let me start off by describing my situation. I have a main view that I wish to place a smaller scrollview subview in. Then later in code (in another method), I like to add some subviews (images and textviews) to that scrollview subview. And maybe even remove the image- and text-subviews later (in yet another method). So the image- and te...

Problem with UIButton on subview of a cell

Okay, a short breif of my app before i explain the problem. My app has two views for it's custom TableViewCell, one frontview, and one backview(which is revealed once you swipe your finger across the cell, much like the twitter-app). Anywho, i wanted to have some buttons on the backview. I did this in the cellForRowAtIndexPath-method T...

Adding and switching between subviews

I have a View which I want to have a label and 2 buttons on the top in a panel. This area wouldnt change. Instead of new view and Xib files and setting their position to below the main view, I would like to know how one can add a subview to the main view so that the subview can change and be modified. Or is it better to go with separa...

UITableViewCell's detaiTextLabel overlaps with custom subviews

I want to customize UITableViewCell by adding UILabel and two UIButton as its subview. The cell style will be UITableViewCellStyleSubtitle and these three items would have to next (on the left) of detailTextLabel.But when i do this, detailTextLabel overlaps with these items and display clipped or partial subviews. Any way to handle out ...

Adding UIView subview to single table view controller in navigation stack

I'm working on an app that has three table view controllers in a navigation stack. The root view controller and the second VC have toolbars, but I want to add a subview to the second view controller like this. (The color is just there for visualization.) I want to add the view programmatically, since I haven't been able to do it with I...

remove all sub image views of a tableview

i am using a table view and adding small images(cross arrow an accept arrow images) to right side of each cell based on if the option is correct or not.... ....Now my table reloaded many times....due to which the images are repeated on every single cell.... i mean if cell_1 has that accept image..after table reload if the value of cell...

Zooming multiple subviews in an UIScrollView

How would I go about zooming multiple subviews of an UIScrollView simultaneously? I have a UIScrollView inside another UIScrollView (with paging enabled) and inside the inner scrollview I have four UIImageViews. I would like for the zoom to persist when I scroll to the next page, thus displaying the next image. Relevant code follows: -...