uikit

How do I implement a sprite-sheet in OpenGLES for iPhone?

I am working from the GLSprite sample code example. What I want to know is what do I need to do to the code to have it treat my texture as a sprite-sheet? The only modification I have done so far is to create a 256 x 256 png of 16 smaller images to be my frames. I have never worked with sprite-sheets before. Thanks for your help. ...

Calling a function from another UIViewController

Hi guys, I'm a beginner programmmer, this is for xcode - iPhone. although i made alot of my iPhone app but i seem to lack some understanding of how a simple communication might work. Specially when I've got 2 ViewControllers. And I wana call one function of a ViewController from another ViewController. Both are under a tabbarControlle...

How to implement a virtual D-Pad on iPhone?

I'm having trouble implementing a virtual D-pad in an EAGLView (OpenGL ES). I thought this would be simple but it is not. It is not so straightforward to determine whether a touch is on a certain portion of the D-Pad at any given time. Does anyone know of some good (relevant, please) resources online or could maybe post some source? ...

draw a line using core graphics when touch moves in iphone?

how do i draw line when moving finger across screen in iphone using core graphics. ...

How to get Transparent Accessory View in UITableViewCell? (w/ Screenshot)

I use a custom UITableViewCell from a nib. The accessory view is a Detail Disclosure Indicator . The problem is that the background color of the UITableViewCell behind the accessory view is not getting rendered (see image / source below). Any clues? Also, here are some things that I tried but did NOT work: Things that DID NOT work: - Se...

makeKeyAndVisible & makeKeyWindow - uiwindow in iphone

In every application, there is always written as [window makeKeyAndVisible]; What is mean by makeKey? ...

If a method is called at the exact same time twice, how to only execute it once?

We have a method in the iPhone SDK that is a delegate method. Problem is, the OS calls this method twice at the exact same time. This method does some heavy lifting so I don't want to execute the logic twice. What is a good way to detect this and prevent one of the two from running? Forgot to mention that, it is called from different ...

Link with File's Owner problem

I created a nib file "WebViewController.xib". And try to link the UIView with File's Owner. But it doesn't work. Also sometimes with other nib files, I deleted a connection from View Connections->Referencing Outlet, then tried to connect again, but it can't link with File's Owner anymore. How to fix this? Thank you. ...

iPhone activity modal badge

When turning off mail / calendars from an Exchange or MobileMe account in Settings, you will see a "Turning off mail..." badge appear over all view elements while the process is occurring. The badge intercepts all touch events while it's visible. I've seen this replicated a couple of times in other apps and was wondering if anyone had a...

Why isn't -stringWithContentsOfURL returning my php echo?

My app accesses a simple php file on my server that does a simple echo "YES"; for testing purposes. I try to get the contents of the echo into an NSString object as below but my string is ALWAYS returning (null). Whats wrong? NSString *theString = [NSString stringWithContentsOfURL:aURLThatEchos]; NSLog(@"Value is: %@", theString); //...

UIScrollView and zooming with a subview....

I have a UIScrollView that has another UIView inside it. The inner UIView handles touchesBegan/Moved/Ended, and is expected to do things based on that when the view is fully zoomed out in the scroll view, and this works just fine UNTIL I allow the UIScrollView to zoom the content. Once I do this, and allow it to scroll around the conte...

iPhone Dev: Views not fitting in my UINavigation Controller

I don't use IB much for creating my views, so I usually do everything programatically. I'm bascially pushing a viewController to a navigation controller and it seems the top part of the viewController is under the navigation bar. I'm trying to make the view fit correctly. Here is my code: navigationController = [[UINavigationControlle...

Having trouble with switch button

The Switch button by default is in the OFF state. When the user selects the ON state a modal view will display. This is what I have to invoke the process but its not working. Please help. I have this set up in a nib but I can also do it programatically just want the darn thing to work...Thanks! MyViewController.h - (IBAction)offSwitchC...

Saving position in view hierarchy in Core Data iPhone app

Hi, how would you go about saving a state in a tableview-drilldown, when using core data? So next time you start the app, the drill down level you where at when you exit the app will be loaded in. I looked at apples drilldownsave sample code, but couldn't figure our how to change to code to work with core data. Any help would be ve...

Fading out an UIButton when touched

Hi guys, I've got a Selected-state and a Normal-state for an UIButton that both are UIImages. When a button is touched, I'd like it to hit the selected-state and then animate back to the normal-state over the period of one second. I've set the following animation when the UIButton* btn is pressed, but it just switches right back to dese...

How is iPhone Contact app's detail View implemented

I would like to implement a view similar to the detail view of Apple's own Contacts app where it displays the name, phone number, note, etc. and its Edit mode. Can you dissect how the whole view is done? Is that view done with a UITableView or a UIScrollView? ...

iPhone SDK System Provided Buttons and Icons

Where can the System-Provided Buttons and Icons mentioned in the following link to the iPhone Developer Human Interface Guidelines be found in the SDK? http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/SystemProvided/SystemProvided.html I expected them to show up in Interface Builder somewhere,...

Showing a landscape UIViewController in a portrait UITabBarController/UINavigationController

I understand that this question (or variations of it) has been asked quite a few times, however it's still how to best approach this problem without delving into kludgy hacks. I have an application with the following layout: UITabBarController ↳ UINavigationController ↳ PortraitViewController ↳ LandscapeViewController...

iPhone Memory Leaks in Apple's Code

I'm running leaks through Instruments on my iPhone app and I'm seeing a lot of leaks that don't appear to be coming from my code. For example: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:operation]; operation.urlConnection = conn...

How can i know which button is clicked? Objective C

I am doing Presence1 in Assignment which require me builds a multiple screens application. I have two ViewController, vc1 and vc2. In vc1, i have two buttons. I use a same method for them and the title of them are same. My question is How can i know which button is clicked in vc1 when i change to vc2? There are a topic show me that I ...