Hello,
In my app, when a user selects a cell from a UITableView, I create a UIView programatically, add it to the window object, then create an UIWebView and a UIButton and add them as subviews to that view I created.
myView = programatically created view
webView = the UIWebView that is a subview of myView
button = the UIButton that...
I create a custom view in cocoa touch that is superclassed by UIView and in my main controller I initialize it and then add it as a subview to the main view, but when I add it to the main view it calls my initializer method again and causes an infinite loop. Am I going about creating my custom view wrong?
Here is the mainView
- (void)lo...
I want to have a NSDictionary that maps from UIViews to something else.
However, since UIViews do not implement the NSCopying protocol, I can't use them directly as dictionary keys.
...
Hi,
When an UITextField is firstResponder, I would like to bring to front an UIDatePicker (bottom part of the screen) without the "going down keyboard" (no call to UITextField resignFirstResponder).
The aim is to process like UIKeyboard of UITextField which pop-up on nearly everything when it becomeFirstResponder. modalViewController s...
Hi,
I have displayed UIButton on top of Playing Movie using this code.
NSArray *windows = [[UIApplication sharedApplication] windows];
if ([windows count] > 1)
{
// Locate the movie player window
UIWindow *moviePlayerWindow = [[UIApplication sharedApplication] keyWindow];
// Add our overlay view to the movie player's subview...
HI,
I have been trying to get the x/y coordinates from a touch on any iDevice.
When getting the touch locations, everything looks ok if the touch is in the middle of the screen. But if I drag my finger to the bottom of the screen, I can only get a y coordinate of 1015. It should be getting to 1023. Same thing for dragging my finger to ...
Hi
I have added UIButton,UITextView as subview to my view, programatically.
notesDescriptionView = [[UIView alloc]initWithFrame:CGRectMake(0,0,320,460)];
notesDescriptionView.backgroundColor=[UIColor redColor];
[self.view addSubview:notesDescriptionView];
textView = [[UITextView alloc] initWithFrame:CGRectMake(0,0,320,420)];
[self.vi...
I have a custom UIViewController and a corresponding view in a nib file. The view is added to the UIWindow directly.
[window addSubview:customViewController.view];
Sizes of the window and the view are default (480x320 and 460x320 correspondingly).
When I create CustomViewController inside the nib file and check "Resize View From NIB"...
Hi,
I have following View COntroller structure:
ScrollViewController
LandscapeViewController
PortraitViewController
Each with its own .nib
The app starts in landscape mode where many landscape views are added to a scrollview. Each landscape view has its specific portrait view, so I have to assign like ID's to each of this views. Can ...
I have a UIViewController that contains a UITabbarController which contains a UINavigationController.
When I am setting up my IB outlets, what should the File's Owner view outlet be set to?
...
HI
I am working with View Based application, i need some suggestions from you,
1) is it possible to push a view using navigationcontroller in view based application.
2)when should we need to use navigationbased application,viewbased application,windowbased application.
3)in viewbased application i know we can addsubview, but can we...
I have views that can be rotated, scaled and moved around the screen. I want the view to resize and be orthogonal when the user double tap's the view to edit the textview within.
The code is below.
Somewhere the transform is getting reset. The NSLog statement below prints the identity transform, but a print of the transform when the ...
I want to build up a sub-UIView in Interface Builder (contained within a UIScrollView) with some UILabels contained, I then want to programmatically "copy" this view adjust its left position (by multiples of its width) to achieve a "floating" left effect inside a UIScrollView. I then want to add this copied UIView back into the UIScrollV...
I have a UIView in the middle of a view that I am using as a game playing area (in a 2d cocoa view).
This image has a background image of the same size as the view.
Resizing the view I use animation to make it look smooth (and that works fine). However, when the animation starts, the background image immediately changes size, tiling or b...
So, I've searched quite a bit for this and can't seem to find a solution.
This code works:
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationDuration:5];
[c setCenter:CGPointMake(200, 200)];
[UIView commitAnimations];
This code doesn't:
CGContextRef context = UIGr...
Short version:
I'm alloc/init/retaining a new UIViewController in one UIViewControllers viewDidLoad method, adding the new View to self.view. This usually works, but it seems to mess up orientation change handling of my iPad app.
Longer version:
I'm building a fairly complex iPad application, involving a lot of views and viewcontrollers...
If I am loading a view from another NIB, how do I set the File's Owner view property? IB is not letting me hook it up to my View Controller which is loading the external NIB.
My NIB looks like this:
File's Owner - Identity is set to LBRootViewController
First Responder
LBTableViewController - Identity is set to LBTableViewController,...
I have an iPad app with a standard UIViewController/UIView setup - all rotations are allowed. The UIView draws some tiled image as background (the tile is 256*256 pixels):
- (void)drawRect:(CGRect)rect
{
[[UIImage imageNamed: @"Background.png"] drawAsPatternInRect: rect];
}
When I turn my iPad I can see that during the rotation th...
I want to get the bitmap that is drawn when a textview is displayed but without displaying the textview in the activity. something like this:
TextView t = new TextView(this);
t.forceToDrawItself();
Bitmap b=t.getViewBitmap();
how is this possible?
...
I'm diving into iPhone development and one of the core concepts im trying to get my head around is view controllers. If you look at the GLPaint example on the apple dev site, you'll see a project that has...
An app delegate class
A uiwindow subclass
And a uiview subclass
And the uiview subclass implements all the core graphics paint...