uiview

Adding subview then releasing it: "modifying view that is being finalized"

I've got a UIButton called tagButton and a UIScrollView called tagsView. Inside my -(void)renderTags method, I do [[self.tagsView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; ...to clear the decks, then I walk through a pair of arrays called allTags and activeTags, alternately creating "lit" and "unlit" butto...

UIView underneath Status Bar

Hi i have a strange issue after adding my UIViewController.view to my Application Window. I created a window based app and added my view in my appDelegates didFinishLaunchingWithOptions method. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { overviewViewController ...

iphone app webview link action

Is there a way to make the action of clicking a link in a html of a UIWebView to load another UIView and pass the value of the url to that view, instead of loading that html page in the same UIWebView. So basically, modify the default action of clicking a link in a UIWebView. Is this possible? ...

UIView ipad rotation.

Hi all. I see a few questions about this here, but I can't really understand what exactly I should do to implement rotation of UIViews. I have two Default pngs for Landscape and Portrait mode, but how the view knows that at a particular time it has to rotate his own content? What methods I should implement, and what allows me to change...

Convert a UIView origin point to its Window coordinate system

Hi, I want to get the origin of scrollView in the window coordinate system. For Example, presently, scollView origin is (0,51). But in window coordinate system it should be 51 + 44(navigation bar height)+20(status bar height) = 115. Means in window coordinate system the scrollView.frame.origin should be (0,115). I tried with convertPoint...

Dismissing Modal View Controllers

View Controller A presents View Controller B modally, which has a button to present View Controller C modally. Here is my flow: A presents B which presents C When B presents C, I want B to be dismissed, so my only view controllers are A and C. I am not sure where to call: [self dismissModalViewControllerAnimated:NO]; in order to d...

UITextView text is pixelated when loaded from my XIB file

Ok, I've got a XIB class called MenuItemView with 3 sub views, a UIImage, a UILabel, and a UITextView. I'm dynamically loading instances of MenuItemView as pages in a UIScrollView. It creates a similar effect of scrolling through food items in the Chipotle app. My problem is, the text in both the UILabel and UITextView are becoming...

Return Inputs to UITextfield with custom inputView

i created a UITextField and a custom View. after that i added this custom view as "inputView" to my UITextField. amountKeyboardViewController *amountKeyboard = [[amountKeyboardViewController alloc] initWithNibName:@"amountKeyboardViewController" bundle:nil]; amountTextField.inputView = amountKeyboard.view; [amountTextField becomeFirs...

Add a subview to a window, along with a specific key to toggle visibility?

I've figured out how to create a new UI element where I touch and add it using [self.view addSubview:[uilabel reference]]. However, if I tap in the same place, it'll simply add another subview on top of the current one. I am able to create a unique key for each part of the grid I'm making (and thus placing subviews). Is there any way I ...

Show/Hide Toolbars in iPhone app on user touch

How can I make the main content view of my app full screen, and show the toolbar only when the user touches the screen and one more touch will hide the toolbar? kind of like the ibooks app? also how do I make a toolbar transparent? ...

How to get data for UITableViewController in an iphone app

I have a main View that has a table which has it's own controller. How can I pass an array from the main controller to the table controller? (I use interface builder maybe i need to init the view programatically?) ...

Rescaling a UITableView for the iPad?

Recently, I have begun porting my iPhone app to the iPad and I have a view with a UITableView subview. Is there any way to rescale the table? The autoresizing masks don't blow up the font and I basically just want a rescaled, crisp, larger version of the table for the iPad. Is there an easy way to go about doing this? ...

How to properly transform a UIView with a custom drawRect method

Hi I've written a UIView subclass which adds a nice soft shadow underneath a png image. I'm overriding the drawRect method to draw the image and add the shadow. Now, when I try to do a scale/rotate-affine transform on the UIView (by calling the .transform method), I'm not getting the result I'm looking for due to the initial "flattenin...

How can we check which class an object belongs to?

I have a lot of object of different classes in a scrollView. While doing some operations, I want to print the the parent class of each objects. How can I do it? ...

How to correctly switch view ?

Hi, i know its already allot of info about that in internet, but i'm new to programming and little confused, i need little help please... for example i have 10 views controllers and switching between it with a buttons for example i switching with -(IBAction)goToSecondView:(id)sender { SecondViewController *secondView = [[SecondVie...

Layers of UIViews, innermost view, UISwitch has trouble

I have a UIScrollView containing a UIView (blue grid), containing another UIView (orange bordered 'part'), containing the UISwitch (shown mid-run). The blue grid can scroll around with the finger, and the part can also drag around. I implement this with a pan gesture recognizer. My main problem seems to be trying to get the swipe gestur...

Zoom in out a view to a specific point iphone sdk?

Hello all, I want to zoom in and out a UIVIew on to specific point something similer effect to focus + zoom in. I don't want to use UISCrollView. What is the right approach to do this if anyone could suggest. Thanks ...

Subviews counted in root CALayer's sublayers?

I noticed today, when adding 1 CALayer and 2 subviews to my view, when I run the following code in my UIView instance: [self.layer.sublayers count] This returns 3. Does this mean that a subview is also considered a sublayer? If I only wanted the CALayers that I've drawn in my sublayers call, how would i do that? ...

iphone opengl backing becomes w=0 h=0 after MFMessageComposeViewController

I have an opengl game for iPhone/iPad (universal). I added the ability to send an SMS message using MFMessageComposeViewController. Testing in a real iPhone. The SMS composer sheet animates up over my view, I can send the message or not, didFinishWithResult gets called, and when I [self dismissModalViewControllerAnimated:YES] it goes aw...

Views, View Controllers, Windows.. Huh?

Starting from the base OpenGL ES iPhone project in XCode, I am creating an app which is nearly completed. What I don't understand is the use of views, view controllers, and windows which I apparently need to implement to use iAds (for the iPhone) and AdMob (for the iPad). I was able to follow the AdMob tutorial using the Interface Buil...