iphone

How to scroll UITableView to a certain position?

I would like to scroll my UITableView 2 cells down when clicking on a button. The total height for the shift downwards is 100px. How can I accomplish this? ...

Memory management error, using cocos2d for iPhone

Hi, So I'm getting a EXC_BAD_ACCESS error in cocos2d. From what I've been searching so far it's mostly related to attempting to free an object which has already been released. I have encountered this error before, and its solution was simple and pretty much caused by freeing a released object. But now, using cocos2d (not sure if it's a ...

Best way loading HTTPS:// website into UIWebView?

Hi What is the best way to load a website into a webview by using https? Is there a easy way to do so? Thanks Philip ...

UITableView less than full screen from code?

I have a number of views that use UITableView. (I use UIViewController and implement UITableViewDelegate and UITableViewDataSource interfaces.) I'm having trouble creating a tableview that leaves room at the top for a toolbar. How to I size and layout the Tableview so that it is less than full screen? Is this an AutoResizing mask prob...

Wrong Editing Controls Displayed in UITableView

Hi all, I'm having a strange problem with UITableView. When the user taps the Edit button, the tableview (which is a grouped view with multiple sections) is supposed to show delete buttons for each row--except for the final row in each section, which has a green add button. When a user taps the green button, a new row is inserted, bu...

What is the proper way of hard-coding sections in a UITableView?

I have a UITableView with 3 sections that are hard coded. Everything is working fine, but I am not sure if I am doing it correctly. Define number of rows in section: - (NSInteger)tableView:(UITableView *)tblView numberOfRowsInSection:(NSInteger)section { NSInteger rows; //Bio Section if(section == 0){ r...

French characters in SQLite..how to display properly in iPhone app?

I am working on an iPhone app using a SQLite db. I have some French characters that are not rendering properly in the app - they are being displayed as squares. The character set client is: utf8. Is there an easy fix for this? ...

How to convert window coordinates relative to a specific view?

Example: I have a CGPoint in window coordinates: CGPoint windowPoint = CGPointMake(220.0f, 400.0f); There is aView which has a superview in a superview in a superview. Somewhere deep in the view hierarchy, probably even transformed a few times. When you get a UITouch, you can ask it for -locationInView: and it will return the coordin...

Using the system localizations on iPhone

I want to make a back button for a navigation controller with the title "Back" instead of the title of the previous controller. I'm using this code: UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Back", @"Back") style:UIBarButtonItemStyleBordered tar...

iPhone OS: making a switch statement that uses string literals as comparators instead of integers

So i'd like to do this: switch (keyPath) { case @"refreshCount": //do stuff case @"timesLaunched": //do other stuff } but apparently you can only use integers as the switch quantity. Is the only way to do this parse the string into an integer identifier and then run the switch statement? like this: nsinteger n...

Drawing formulas with Quartz 2d

In my iPhone App I'd like to draw a few formulas. How can I manage that with quartz 2d? Is there a way to build formulas like for example in latex? Or are there any existing frameworks? Thanks. ...

Recommended Reading for iPhone Core Animation

Can anyone here recommend any good books for getting my head around Core animation? I've been through the Apple docs and while I'm sure it's all there, I haven't been able to grok Core Animation yet... Is there an a good example I've missed? or some starting document I've overlooked? If not are there any good books out there on Core Anim...

How to get the day component out of an NSDate?

I have an NSDate object and need an integer of the day. i.e. if we have 25th May 2010, the int should be 25. Is there a simple way to do it? ...

setDelegate:self, how does it work?

I have a query regarding how delegates work. My understanding was that delegates take responsibility for doing certain tasks on behalf of another object. locationManager = [[CLLocationManager alloc] init]; [locationManager setDelegate:self]; [locationManager setDistanceFilter:kCLDistanceFilterNone]; [locationManager setDesiredAccuracy:...

Configuring an offscreen framebuffer fails the completeness test

I'm trying to create an offscreen framebuffer into which I can do some OpenGL drawing, and then pull the bits out manually. I'm following the instructions here, but in step 4, status is 0 instead of GL_FRAMEBUFFER_COMPLETE_OES. If I insert a call to glGetError() after every gl call, it returns 0 (GL_NO_ERROR) every time. But, the valu...

UIScrollView without paging but with touchesmoved

I have a UIScrollView that I use to display PDF pages in. I don't want to use paging (yet). I want to display content based on touchesmoved event (so after horizontal swipe). This works (sort of), but instead of catching a single swipe and showing 1 page, the swipe seems to gets broken into 100s of pieces and 1 swipe acts as if you're m...

Can C++ and C# be used for applications for iPhone

Hi all Can I write applications for iPhone in C++ or C#? Where can I find simulators for iPhone for testing my apps. How to write them? ...

Switching Between Subviews in iPhone App

So, in an iPhone app I am working on, I've decided that the best way to display all the contents to the user is to have the top part of the screen show some information, and the bottom of the screen show different information. However, the bottom part will change sometimes, so I was working on implementing that. Another app that does t...

Why are the default UI controls in my iPhone app blurred?

Why would the default iPhone interface elements, specifically the UISwitch (unmodified) and a UISegmentedControl appear slightly blurred? I have not changed them or called any private APIs. This blurring occurs when I run it both in the simulator and when I load it on my iPod Touch, so I don't think it's a one off drawing glitch. These e...

Dynamically resize a UIImage width within a UITableView Cell in Xcode

I am using the code below to put together my UITableView. The Cell height allows the first three rows to show in the table without scrolling. Everything is fine with those first three rows. But as soon as I scroll down past the original first three rows, the image in the myImage inherits the width of cells in the first three rows and doe...