iphone

GL_TEXTURE_RECTANGLE_ARB on iPhone/iPad

I can't find any support for GL_TEXTURE_RECTANGLE_ARB in OpenGL ES. Is there any extension specific for iPhone or iPad which can render arbitrary sprites (non power of two)? Thanks for help. ...

Add a button to navigation item in code

How do i add a button to the right of a navigation item in a view controller? ...

iPhone 4.0 Beta compile for 3.1.3

I downloaded the iPhone 4.0 Beta. But for my projects I need to compile for 3.1.3 to be able to still submit my projects to the App Store. If I run an old project that isn't a problem I can see all the versions, but when I start a new project I can only pick the 4.0 beta, how can I fix this? ...

Iterating 'Active' View Controllers

Ola Folks, In an iPhone application I am displaying different views by using the addSubView:SomeViewController.view method. I want to be able to, at the very least, log the view controllers that are in the view hierarchy that is being displayed. I would prefer to be able to get a handle to a specific view controller. I know how to ite...

How can I render an in-memory UIViewController's view Landscape?

I'm trying to render an in-memory (but not in hierarchy, yet) UIViewController's view into an in-memory image buffer so I can do some interesting transition animations. However, when I render the UIViewController's view into that buffer, it is always rendering as though the controller is in Portrait orientation, no matter the orientation...

animating adding/removing layers on iPhone

On the iPhone, when you add a sub layer to a visible view's layer, using either -addSublayer: or -removeFromSuperlayer, shouldn't that sub layer appear or disappear in an animated manner (ie. fade in or fade out gradually)? My program animates using layers (not views). When I change a property of a layer like position or image content, t...

Lightning effect in opengl es

Is there a way to create a lightning effect on the iPhone using opengl?(like this app) Right now I have modified the glpaint sample to draw random points around a line (between two points that the user touches) and then connecting them, but the result is a zigzag line that constantly jumps around and lags horribly on the actual device....

How to use Git properly with XCode?

I have been an iphone developer for a while, and I have recently been including git in my workflow. I have used git settings found on http://shanesbrain.net/2008/7/9/using-xcode-with-git for my workflow so far. Those settings tell git to exclude *.pbxproj from merges? Is there a real reason for doing this? For example, when I add a f...

CAFF creation on Windows (or Linux)

On OS X I use this command to convert a sound file to CAFF for iPhone. afconvert -f caff -d LEI16@44100 file.wav file.caf I need to do the same on a Windows box. Any clues? I'd even settle for a Linux version. ...

Best way to handle enable/disable of UIButtons on iPhone

I have an increase button and a decrease button, both of which affect a variable. The variable has a minimum and the decrease button will be disabled once that minimum is reached. Likewise for the maximum value of the variable. In my controller, I have two IBActions for both the increase and decrease actions, and two IBOutlets, in ord...

iPhone & iPad versions of same app?

I have an iPhone app and would like to create iPad version of it. What is the best way to setup the project when you want an iPhone and iPad version of the app? I don't see that I'm able to use the same code base since the iPad version will have features in it that the iPhone version doesn't. It seems as though maintenance is going to...

Why is UIControlTouchUpInside UNDEFINED?

I've got a simple question but it has got me confounded. The code below gets an UNDEFINED error for UIControlTouchUpInside. What do I need to include or import? If I comment out the line, it works. So that means forState:UIControlStateNormal is defined. I'm new so hope you can help. UIButton * button = [UIButton buttonWithType:UIButtonT...

How to restrict html body width when not displayed on iPhone?

I have set up a web page to look good on the small screen of an iPhone, but when viewed on the desktop, and going right across the width of the browser, it looks terrible. Is there a way I can restrict the width to say, 480px when viewed on a big screen? I tried body { margin-left:auto; margin-right:auto; ...

slide-in uitoolbar

I would like to add a uitoolbar able to slide -in from the top of the screen when some button is pushed. With all the research done this week-end I am still stuck. Please help. ...

Groupted table view cells not loading.

Hi, I'm working on creating a grouped table view. The data is being loaded alright, but in the grouped view there are a lot of white empty spaces. They get populated after I scroll up and down a few times. Help? Here's my getCellForRowIndexAtPath method: static NSString *Id= @"CustomDiagChargeID"; CustomCellDiagCharges *cell = (Custom...

How can I put an image inline with an NSString on the iPhone?

I know you can do it on Mac OS X with NSAttributedString but I haven't had much luck with that on the iPhone. I'm trying to basically do a string like "$200" except the dollar sign is replaced by a custom symbol. ...

Hide/ change width/ change position of UIButton based on device type

I'm using the new in-app SMS features in my iPhone app, but obviously iPod Touches aren't able to send and receive SMS without support of a third party app. I know all well how to detect the device and how to hide a UIButton, but what I do not know is how to change the width of the others. Above are the three icons. The one on the far ...

objective-c converting strings to usable numbers

I have strings that look about like this: stringA = @"29.88"; stringB = @"2564"; stringC = @"12"; stringD = @"-2"; what is the best way to convert them so they can all be used in the same mathmatical formula?? that includes add, subtract.multiply,divide etc ...

Detect ANY touch in a view (iPhone SDK)

Hello, I'm currently using ... - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { to detect swipes. I've got everything working. The only problem is if the user touches on top of someth...

objective-c setting NSDate to current UTC

is there an easy way to init an NSDate with the current UTC date/time? ...