I have a tableView with a list of items. When a selection is made, a new view controller is pushed on the tableView's navigationController viewController stack.
My question is this: one of the views in the view hierarchy associated with the pushed view controller requires the fetching of data from the network before it can render it's c...
Hi there,
I've got this slightly strange issue that I can't quite seem to figure out.
I'm following the example given by Apple to "flip" a view.
Now the "flipping" is working fine. I'm using an nib file containing two "views" showing "summary" and "detailed" information.
The "summary" page is a UIView. Whereas the "detailed" page is...
I have a problem to find the touch point.
I have a function loadView() where I set 16 tiles(16 UIImage View).
Then In function:
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
// Retrieve the touch point
UITouch *touch=[[event allTouches]anyObject];
CGPoint point= [touch locationInView:touch.view];
...
Hi im trying to add a button on the point where users tapped on the screen.
Here is the code in my UIView file
- (void)drawRect:(CGRect)rect {
// Drawing code
NSLog(@"drawRect, %i, %i", firstTouch.x, firstTouch.y);
[tagButton drawRect:CGRectMake(firstTouch.x, firstTouch.y, 100, 200)];
[self addSubview:tagButton];
}
- (...
I have a UITableView with a list of items. Selecting an item pushes a viewController that then proceeds to do the following. from method viewDidLoad I fire off a URLRequest for data that is required by on of my subviews - a UIView subclass with drawRect overridden. When the data arrives from the cloud I start building my view hierarchy. ...
I'm doing a bit of UIView wrangling and am stuck. It is straightforward changing the "z" order of sibling subviews. [mySuperview sendSubviewToBack:mySubview] places mySubview behind all it's siblings.
But how do I place a subview behind it's parent?
Thanks,
Doug
...
According to documents i read, they always show that I should define a subview in a class. Like this :
@interface PolygonView : UIView.
I have to inherit from UIView.
Could i define a variable with UIView type in a class which inherit from NSObject? After that, i make a connection from that variable to UIView which is defined in Inter...
This may seem like a stupid question, but i can't quite remember how to subclass a UIView. Can anyone point me in the right direction?
...
Hi guys,
I have a custom keyboard in my app and I'd like to have it look similar to the original iPhone keyboard (especially the buttons), just like it has been realized in Twitterrific, for example. Can you point me to a resource where I could find such code, either as a custom drawRect method or as a TTStyle pipeline?
Cheers
MrMage
...
I have a complex view which is composed of a base image overlaid with other images and 2D paths.
I wonder what difference will it make if a assemble the complex view by creating a different UIView for each element and adding them as children of the complex view or if I should instead create a a different CALayer for each element and ad...
I have a view which is similar to mail app. I have a scroll view and in that many other subviews. When the user clicks on any textview, it expands to show the text in it. e.g. "to" field in mail. I would want to resize the other subviews such that it starts below the expanded region. How can I do that.
I created the view through IB and...
I add a firstView in the AppDelegate :
#import "TestViewAppDelegate.h"
#import "MainViewController.h"
@implementation TestViewAppDelegate
@synthesize window;
@synthesize mainViewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
MainViewController *aController = [[MainViewController alloc] initWit...
Hello,
I would like to have a nested animation for my view.
I have one animation stop selector which gets called just fine:
[UIView setAnimationDidStopSelector:@selector(growAnimationDidStop1:finished:context:)];
However INSIDE of this selector I want to do more animation and when done yet another selector to be called:
(void)growAni...
Hi,
I'm returning YES in my view controller's shouldAutorotateToInterfaceOrientation function, and I can see using breakpoints that YES is being returned, however the willRotateToInterfaceOrientation method isn't being called, and nor is any other rotating method. It seems like after returning YES nothing happens!
Any ideas?
Mike
...
I have a parent UIView with a number of subviews. Periodically I need to remove a subview and completely remove it from the system. What is the correct way to do this? I tried this:
UIView *v = [self.containerView viewWithTag:[n integerValue]];
[v removeFromSuperview];
And got bizarre result. Previously present UIViews dissap...
I am doing a scientific visualization app for iPhone. Periodically a UIView subclass will receive some data from the network that it must render via its overridden drawRect: method.
My challenge is that there is no way to indicate to Cocoa-Touch that this data has arrived - or changed - other then [myView setNeedsDisplay] which is ignor...
I am apparently in some swirling UIView hell zone at the moment where up is down sibling is parent and my brain is completely fried.
Here's the deal. Really, really simple. I have a container view with N leaf node sibling subviews. No tricks here, dead simple. I do the following:
// occludedPageSet is the set of view tags correspondin...
Hello All:
What is the difference between addSubview and insertSubView methods when a view is added programmatically?
Thanks
Ashwani
...
Can someone please school me on the proper way to load a view hierarchy from a nib file. I am using the loaded view as a template to stamp out a family of views and the current approach I am using is subtly broken. I don't appear to be copy-ing or retain-ing when I should be. Here's the relevant code:
// pageSet is a list of view tag nu...
When designing/laying out a view in Interface Builder, sometimes it would be nice to be able to open that view in its own window, rather than along with all of its parents. Is there a way to do that?
A good example is when you have a long view with controls and labels and text fields, lets call this mycontent view, and this mycontent v...