subview

Accessing a Top Navigation Controller from a Subview Navigation Controller

丶灬走出姿态 提交于 2019-12-20 10:33:15
问题 I have a my views and controllers set up like so. A Tab/Bar controller Within 1. is a root view controller within 2. is a programmatically created navigation controller, that is displayed as a subview in the root view controller. What I am trying to do is access the top tab bar/navigation controller so that i can push a view onto it. I tried parentViewController but all it did was push the view onto the programmed nav controller. any suggestions? This is how i set up my root view controller:

What's the best way to update an image in my tableview image subview?

萝らか妹 提交于 2019-12-20 07:17:43
问题 Specifically, how do you get the image subview from a uitableview cell? My table view gets data from the web asynchronously. When I created the image view the first time, I added the view by: [imageView setImage:image]; [cell addSubview:imageView]; in tableView:cellForRowAtIndexPath: . After new data is retrieved, I call reloadData to refresh the table view. But to update the image, I'd like to get a handle of this imageView (if it exist) and update the image. My question is: Given the cell,

Objective-c Adding subViews in my controller

我与影子孤独终老i 提交于 2019-12-20 05:19:14
问题 I have an aplication with the delegate, the controller and some other things. The thing is that i initzialize everything in the controller with init. This init creates 3 UIVIews (openGL, imagepickerview and a MKMapView) and I want these views to be added in the window, so they are on top of the other. However, somehow it only paints one of the 3, the imagePickerView. Here is the delegate: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *

Subview displays wrong

冷暖自知 提交于 2019-12-20 04:49:28
问题 I've made a project and implemented the folder project and now I've set up a subview which is displayed aboce the folder like on the picture. On the popup there's a image and I would like to do it like this that if I tap the image a new controller with the whole image will displayed. I've set up all correctly...However, I tried to change the subview etc. THIS Navigationcontroller never appears at the top of all "layers". it appears in the folderviewcontroller. By the way, the Navcontroller is

iPhone: “unrecognized selector sent to instance”

拥有回忆 提交于 2019-12-20 04:23:56
问题 I try to set two different views into a subview, according to the state of a SegmentSwitcher: if ([sender selectedSegmentIndex] == gameIndex) { if (self.gameView.view == nil) { GameView *gameV = [[UIViewController alloc] initWithNibName:@"GameView" bundle:nil]; self.gameView = gameV; [gameV release]; } [tableView.view removeFromSuperview]; [subView insertSubview:gameView.view atIndex:0]; } else { if (self.tableView.view == nil) { TableView *tableV = [[UIViewController alloc] initWithNibName:@

Table Cell SubView Iteration Not Finding TextField

回眸只為那壹抹淺笑 提交于 2019-12-19 11:52:07
问题 I've created a table where each cell holds both a text label and a text field. I'm adding the textfields as such [cell addSubview:passwordField]; and from a visual perspective they appear and are editable, etc.... The problem arises when I attempt to retrieve the entered values from the textfields. I iterate over the cells and try to grab the subview (IE the textfield), however, my iteration only discovers the text label. Here is the code I'm using to search: for(NSInteger i =0; i <

How can a superview interecept a touch sequence before any of its subviews?

六月ゝ 毕业季﹏ 提交于 2019-12-19 10:18:19
问题 I have a view hierarchy that is layed out as follows: parentView scrollView contentViewA containerView contentViewB contentViewC I want contentViewB to respond to touches. Unfortunately scrollView makes this almost impossible because it tries to ingest the touches itself making touch response of contentViewB spotty. So, instead, I want to intercept all touches in the parentView, manipulate contentViewB directly, and then pass the touches on to scrollView so it can do its thing. Can someone

how to use addChildViewController in subview

馋奶兔 提交于 2019-12-19 10:12:17
问题 I want to use addChildViewController in View (one view fro subviews array) but I don't know about that. this is my code : for (UIView *subview in self.view.subviews) { if (subview.tag == 1) { CartView *cart = [[CartView alloc]init]; [cart willMoveToParentViewController:????];/* (UIViewController*) from subview*/ [cart.view setFrame:CGRectMake(0.0f,CGRectGetHeight(self.view.frame),CGRectGetWidth(self.view.frame),CGRectGetHeight(self.view.frame))]; [UIView beginAnimations:nil context:nil];

Scrollview with embedded tableview

心不动则不痛 提交于 2019-12-18 12:28:06
问题 I'm building an iOS app in swift with Xcode 6. I'm trying to embed a view controller with a table view in a scrollview. When the user drags in the table view, it is suppose to move the table, not the the scrollview that it is embedded in. I've made this illustration, to clearify my view and view controller hierachy: The red area is the content size area of the scrollview . The green and blue areas are different view controllers , embedded in the scrollview. The yellow area is a Text field in

UIWebview won't zoom even after setting scalesPageToFit to YES

你离开我真会死。 提交于 2019-12-18 11:33:33
问题 I have a UIWebview that is loaded as a subview when a user selects a tab on a UISegmentedControl . For some reason, I can not get it to allow pinch/zooming . I set the following code in the viewDidLoad: method, so it should work. self.myWebView = [[[UIWebView alloc] initWithFrame:self.view.frame] autorelease]; self.myWebView.backgroundColor = [UIColor whiteColor]; self.myWebView.scalesPageToFit = YES; self.myWebView.autoresizingMask = (UIViewAutoresizingFlexibleWidth |