subview

iPhone subview flip between 2 views

iPhone / Objective-C On my view a little "hover" view appears after a user clicks on a button on the main view. When the user clicks this subview I want the subview to FlipFromRight to another view (same size). The main view underneath should stay. viewHot and viewCold are the subviews viewMain is the main one. Is this possible? ...

UIWebview won't zoom even after setting scalesPageToFit to YES

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.backgroundColo...

iPhone cellForRowAtIndexPath returns cached cell

Hi, When i add a label to a cell using: - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; [cell addSubView:someLabel]; } It adds the label to multple cells, because it adds the label to a cached cel...

iphone ViewDidAppear in SubViews?

I have a View "A", which loads a subview "B" which loads a subview "C" Why does the ViewDidAppear event fire for "A" but not for "B" or "C" ViewDidLoad does fire for A,B,C ...

iPhone subview with shadow

I have added a subview onto my main view and wish it to have a small shadow, feathered. Is there a way? ...

How to use generic (NSObject) controller with subviews of a UIViewController?

I have a UIViewController that is loading several subviews at different times based on user interaction. I originally built all of these subviews in code, with no nib files. Now I am moving to nib files with custom UIView subclasses. Some of these subviews display static data, and I am using loadNibNamed:owner:options: to load them int...

UIScrollView. How do I fix sluggish response for touch-enabled sub-views?

My scrollView has a drag/zoom -able containerView. The containerView is parent to a UIView subclass of my own design that can respond to tap and drag. My problem: scroll/zoom of the containerView is now total crap, with scroll/zoom sometimes just ignoring swipe attempts entirely. It feels as if touches are now confused as to who is runni...

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. ...

removing Views from SubView

Hi, I have a App that uses the In App feature. -(void) completeTransaction: (skPaymenttransaction *)transaction{ } When the above method gets called i want to remove all subviews and go back to my main menu window (the first view in my App). Can anyone suggest to cleanest and best way to do this? Cheers ...

How to manage a complex subview on the iPhone

Hi all, I have a view controller that manage a view with a table view, a toolbar, a navigation bar and so on. Inside the toolbar, I have a GPS signal indicator. It is composed of a number of bars with different heights, different colors, and so on depending on signal quality. The GPS signal indicator is a complex (sub)view that I want...

Animate programmatically added subviews

Hey, I've setup an own class(custom UIView). I'am adding two of these customViews to my UIView as subviews. So now the question araises: How do I animate the subviews? myCustomView *myCustomViewInstance = [[myCustomView alloc] initWithText:@"myText"]]; [self.viewContainer addSubview:myCustomViewInstance]; myCustomView *myCustomVie...

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...

how to get access subview of UIView?

according to this code if i want to access imageView1 and imageView2 how can i access to it? please show me some example example cell.accessoryView.subviews ? UIImageView *imageView1 = [[[UIImageView alloc] init] autorelease]; UIImageView *imageView2 = [[[UIImageView alloc] init] autorelease]; imageView2.alpha = 0; [cell.accessoryView ...

How to remove subviews to release more memory

I have UIScrollView with number of subviews. Each subview is custom UIButton with UIImage. When I load more and more subviews, more and more memory is used. But I remove invisible subviews by removeFromSuperView method. Subviews are removed and stay invisible, but Im afraid that no memory is released. UIImage is image downloaded from int...

UIViewController shows two UITableView

Hi, I have a weird problem. I'm subclassing UIViewController and adding a tableView property in which I load a UITableView. Now I'm adding this UITableView to the parent's subviews. Works fine but I get TWO TableViews. One standard styled TableView and one the way I wanted it to be on top of the standard one. Both contain the correct d...

UIActionSheet positioning problem

I need to display a pop with a UISwitch and a Done button when user taps on a button and save the state of the switch when the done button in the pop up is tapped. So I use UIActionSheet to do this - sheet = [[UIActionSheet alloc] initWithTitle:@"Switch Setting" delegate:self ...

Adding a UINavigationController as a subview of UIView

I'm trying to display a UILabel on top of a UINavigationController. The problem is that when I add the UILabel as a subview of UIWindow it will not automatically rotate since it is not a subview of UIViewController (UIViewController automatically handles updating subviews during rotations). This is the hierarchy I was using: UIWindow ...

How to remove view from window?

I am using Cocos2D for my main framework. In some cases, I want Cocos2D to load a nib file and have that be the view: window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; TargetPlayerViewController *myController = [[TargetPlayerViewController alloc]initWithNibName:@"TargetPlayerViewController" bundle:nil]; [window ...

How do I check to see if my subview is being touched?

I went through this tutorial about how to animate sprites: http://icodeblog.com/2009/07/24/iphone-programming-tutorial-animating-a-game-sprite/ I've been attempting to expand on the tutorial by trying to make Ryu animate only when he is touched. However, the touch is not even being registered and I believe it has something to do with i...

What is the best way to handle autorotation with multiple subview?

I am learning and programing an application. I do this project based on what I learned from the book Beginning iphone 3 development. I have two main questions here: I would like to create a multi utility application so I need multiple-view. I have a main view controller which will control switching between views. In this example I have...