iphone

Loading image into OpenGL ES from c++ code in iPhone

Hi, I'm creating an iPhone game and I need to load an image from a PNG file into OpenGL (and bind it as a texture). I'm using function glTexImage2D to achieve this goal. I know how to load an image into OpenGL using UIImage (by converting it into CGImage and afterwards drawing into a context). How can I call my Objective-C code from w...

Weird Touch Point value returned when used with scroll view controller

My application attaches a list of UIView controllers to a scrollview controller. As a part of requirements, it is needed to make some of the elements in the individual view controllers clickable. But, if I use a touch point, I get weird cooridinate values like (0,12567234). Is there a way to obtain the actual touch point value? My code l...

Best Practices: What I should know before creating a web app API for an iPhone app?

I am getting started with iPhone application development and would like to create an application that involves pulling data from from a web application. I will be developing the API using PHP and the Zend Framework. I have never created a public API before, nor an iPhone app that works with public data. Here are some specific questions ...

iPhone: How to populate a table view from XML data?

Let's say I have XML data that I just downloaded from a web app api. How do I parse the data? How do I populate each cell of a table view with this data? ...

Not feasible to call NSInvocation from a SenTestCase derived class?

Is NSInvocation class not meant to be called via unit tests (for iPhone)? My intent is to call a class's method generically and since the method has more than 2 parameters, I can't use [myTestClass performSelector:withObject:withObject] Instead, I'm trying to use NSInvocation but as soon as I try to instantiate from NSInvocation class,...

Smooth transition to "full screen" when using UISearchDisplayController

To explain what I'm looking for I'll give an example: In the Contacts app, when you click the Search field in the first row of the table view it will smoothly take over the entire screen (minus the status bar) including the Navigation Controller's title bar. Edit: I've also realized that I'm pretty sure this is related to the UISearchDi...

Iphone SDK Sending Data using Carrier Data Network??

Could someone suggest a tutorial/sample on how an Iphone application can send data to a remote server using Carrier Data Network only? In other words is there a way an application can programmatically force to enable Carrier Data Network communication, use it to send its request to the remote server and switch it back to user specific co...

Problem with Save Data

Hi I'm doing an RSS reader application but I want the information that shows the iphone on a table can be saved in a DB or a file. Please can someone help me? ...

Creating a scrolling counter

I would like to create a scrolling counter and I'm wondering on how to implement this. Should I use for each digit a separate view and animate the view upwards or downwards to create the scrolling effect? Or is there a better way to do this ? ...

Help me to complete my UITableView to Navigation Controller [iPhone SDK]

I built an application. On the one my views I used TableView. So now I want to change this Table view to a navigation controller. 1- How can I change UITable view to Navigation Controller. I add navigation codes but I got some alert! [I know I must identify my navigation delegate, but HOW ?] Here is my Mapping Views! AppNameViewContr...

How to clear a dictionary?

I'm currently doing the following to clear out an NSMutableDictionary [myDictionary release]; myDictionary = [[NSMutableDictionary alloc] init]; The release line doesn't actually release any objects in the dictionary. I can still see all of them on the next line. It isn't until the alloc line is executed that the dictionary is zeroed...

Is it possible to cache web pages with a UIWebView?

I have an app that contains a UIWebView. I would like the user to be able to view webpages they've previously navigated to when off line. How should I go about making this work? Thanks! ...

Hiding TabBar within a UINavigation Screen Causes 20 Pixel Shift of the Screen in iPhone SDK 3.1

Gentlepeople, I'm a newbie to iPhone & Objective-C, coming from a long background of procedural language. I'm attempting to emulate the functionality of the Whole Foods' recipe search. In that app, the screen has a NavigationBar at the top, a TabBar at the bottom, and a grouping of three buttons toward the top of the screen. Selecting...

Implementing a UITabBar in my working Three20 application

I have a working application using Three20. It basically is a bunch of nested TTableView's. I would like to add a UITabBar to the bottom of my app, but am not sure how to start. I used the Three20 project templates available at Three20.info Thanks, John ...

Passing integer by reference

I have a class level int defined in my header file. In the .m file, I have a method that I'd like to take an int parameter, modify it and have the modified value reflected at the caller. For example: classLevelInt = 2; [self someMethod:classLevelInt]; //Here, I'd like classLevelInt to equal the value assigned to it in the method In...

UIProgressView doesn't change when 0.0 < progress < 0.03

I have a UIProgressView that I'm using to visually represent a one-minute timer. Its width is 280 pixels. I'm using NSTimer to gradually decrease the value of 'progress', starting at progress=1.0. 'Progress' gets updated once every tenth of a second. For all but the final two seconds, it does exactly what I want it to. Once the valu...

iPhone App Updgrade Query

Hi All, I'm developing iphone app which take pictures and store it in iphone (within app folder) and picture name and other information stored in sqllite database. If in future, I will release new version of iphone app then does it delete old pictures and update database? Thanks, Priya ...

UIScrollView and UIButton, UIButtons Disappearing

I have an UIScrollView where I create two buttons. The first button works as it should, however the second button disappears. It is still there and can accept clicks, and becomes visible when you click on the hidden button. Any idead on why the second button dis appears? cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellSty...

UIPickerView - Selects row too fast.

I am currently using a UIPIckerView in my app to allow a user to select from a list of options. The problem is that there isn't enough of a delay when the user stops spinning the wheel and it is selecting a value before the user has a chance to scroll further down the list. Is there a way to override the default behavior that selects t...

Why do I get an exception when pulling an image from UIImagePickerController?

i get image from uiimagepickerviewcontroller and set it in global file but when i try to retrieve it from global it will not display in uiimageview following is code of delegate method form which i get image -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *...