subview

Add a view/activity on top of a ListView [Android]

Hi everybody, I want to have a view with several choices when I click an element of my ListView. I was thinking of implementing an AlertDialog but as I need more than 3 options it is not possible... I also thought of putting my ListView in a FrameLayout and have an view with a gone visibility that I would turn visible at the click and u...

Subview position issue after UIOrientation (rotation) change

I have a viewController and have added a subview in it programatically. secondView.autoresizingMask = UIViewAutoresizingFlexibleWidth; [self.view addSubview:secondView]; I guess when the device rotates, my mainViewController knows that orientation changed, but the subview (secondView) inside the mainViewController does ...

Processing a method after the view has loaded..

Hi ! I have implemented a subview which is supposed to load immediately when I click a button in the parent view. After loading the subview(which is basically holding an activityindicator), the program is supposed to process a method(which gets data from a server, so takes time) in it. However, I am unable to do it. What happens now i...

Android ListView - Slide Subview in from Right?

I have a ListView. When I select an item in the ListView, I would like to have a Subview slide in from the right, the way that it does in many Apps. I have been searching for tutorials on this topic but am spinning my wheels. Maybe Android uses a term different than "Subview" ? Here's what I ended up doing: Create a New Class for t...

Android - Passing Value from ListView to a new Activity?

I have a ListView that shows a list of names. When you select a name, I want to pass the selected person' ID to the next view (Profile) and retreieve their data based on their ID. I am able to load the Profile View, but do not know how to pass the ID from the ListView to the Profile. Here is how I am loading the Profile: lv.setOnIt...

How do I create custom subviews from a UINavigationController in xcode?

I am definitely the NOOB here, so let me pre-apologogize for asking how to write this application. In a nutshell, this is what I am trying to do. I will have a main View Controller. There will be 3 buttons. 1 for information, 1 for Food Menu items (TableView), and 1 for Common greetings. I am stuck on creating a tableview that will h...

I need a way to not rotate a subview when the parent view rotates

Hello, I have a situation where I have a view, and several subviews, and the view and all but one of its subviews are expected to rotate. The one subview that I don't want to rotate is a UIImageView and the image gets distorted when I rotate so I need it to simply not rotate when the rest of the views components rotate. Does anybody...

Cocoa - subviews not showing after being added

Im trying to add some subviews to a container (container is a NSView derived class, and subviews are some NSImageView objects). Since the code is messy right now due to trying different stuff, i wont paste it all for the time being. This is the part where i add the subviews: NSImage *tileImage; tileImage = [[NSImage alloc] initWithCont...

iPhone addSubview - subView doesn't scroll with UITableView

I am using the following code to add a "Spinner" on top of my UITableView: spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; [spinner setCenter:CGPointMake(120,162)]; [self.view addSubview:spinner]; spinner.backgroundColor = [UIColor lightGrayColor]; spinner.hidesWhenStopped = ...

Difference between adding a subview and presentModalViewController method

I know this might be very simple but what is the difference between these two pieces of code? I know that the second method adds a subview, and that the second code loads the BlueViewController on load and then it does a lazy load with the YellowViewController class (if it's not loaded on the RootViewController). What are the advantages...

Accessing a Top Navigation Controller from a Subview Navigation Controller

Hello, 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 o...

How to query subview of UIView with tag ?

i insert 2 UIImageView with tag 1 and 100 to UIView, how to access to UIView and check how many subview on it or select tag 1 to be the top of view ? ...

How do I put a SuperView on top of a SubView?

I want to put a SuperView (with a transparent background) on top of my SubView. Is there a way of doing that? Thanks in advance! ...

View is not landscape if addsubview is done in landscape? iPhone SDK...

Hi I have a problem when adding a subview when my app is in landscape. When the view gets loaded it is in portrait mode so part of the view is missing and I can see the main view on the right hand side. If I load the subview in portrait mode then rotate the iPhone it rotates to landscape no problem. I have googled this lots and it seems ...

Changing subview frames within UIScrollView on rotate

I have rows of subviews within a UIScrollView that I want to rearrange after rotating to landscape mode. Ideally, I want to have 5 buttons per row with the total number of rows determined by the button height and how many buttons there are total (plus some padding). The problem I am having is how to iterate through subviews while als...

don't allow subviews to scale vwith view?

hi all i am scaling UIView using [UIView setTransform:CGAffineTransformMakeScale(2.0*scale.value, 2.0*scale.value)]; its works fine for me but all subviews are also scale with the UIView, but i don't want to scale all subviews of that UIView. i tried following this to stop scale subviews. [UIView setAutoresizesSubviews:NO]; UIVi...

Creating a view with draggable text elements

Hi all, I am trying to create a view for a kind of brainstorming application like, for example, OmniGraffle, with elements that contain textviews and can be dragged around. (Also, the should be connectable with arrows, but that is not (yet) the problem) I did my homework and searched via google and read books about cocoa, but there see...

UIPicker as Subview

Hello, I'm trying to add a UIPicker as a subview, but can't quite figure it out. I've added a second UIView control with a UIPickerview to my nib (NewWorkoutViewController.xib). My code is as follows: -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView { return 1; } -(NSInteger)pickerView:(UIPickerView *)theP...

iPhone: How to remove all objects from a UIScrollView

Basically I want to remove all objects from a UIScrollView and I haven't yet found a solution to it because a simple "removeAllObjects" command doesn't work. Does anyone have an idea how to do it? ...

Making view to autoresize

in controller scrollView.autoresizesSubviews = YES; in viewDidLoad of controller I load view object from Nib and [scrollView addSubview:presentationController.view]; At this point scrollView itself has correct adjusted sizes(which is within tab view controller). The problem is that the layout of newly loaded view object is not upda...