iphone

iphone app asks for location use confirmation twice

I have an app with a uiwebview loading a stored index.html file and inside I have a get my location code, when I am trying to get my location it works fine but it asks for confirmation two times, one the mplampla.app wants to use your location and one ../index.html wants to use your location, any suggestions? ...

iPhone memory leak help

I'm new to iPhone development, and I've just run my iPhone app throught the Intruments Leaks tool for the first time, and discovered a leak with my ListViewController dataArray method. When I click on the listing it shows the code, and a few lines have percentages next to them. Presumably they're the lines that are leaking memory. I've ...

Looking for good tutorials to help an ASP.NET guy learn iPhone development.

I'm looking to broaden my horizons and develop some apps for the iPhone. I have 15 years of software development experience, starting with C++ and then transitioning to C#. Nearly all of my experience is developing for Microsoft platforms (Windows, ASP.NET, etc), with a brief stint doing some Java/Oracle stuff. Does anyone have any sugg...

NSPredicate strings greater comparision

Hi, I am trying to compare if one NSString is "greater" than other NSString and I am stuck. Actually, my NSString contains a date and want to get all these objects that are greater than it. I know I should convert it to date, but I want to keep it as NSString. Thank You! ...

How to resize UIButton to fit UIImageView?

I have a UIButton over a UIImageView. I want the button to adjust its size to fit the imageview. I tried a few different ways but can't get it. Anyone know how to do this? ...

Tab bar covers UITableView's last cell

I'm developing an application based on the Tab Bar application preset. In one of the tabs I have a table view showing a lot of data, but half the last cell in the table view is covered by the tab bar when I've scrolled to the bottom. Anyone has a solution to this? ...

ASIHTTP Request failed in log, but requestFailed not getting called

I have -(void)requestFailed:(ASIHTTPRequest *)request { NSError *error = [request error]; NSLog(@"Request Failed Error: %@", error); } When I make my request I do //add data to the array NSString *json = [array JSONRepresentation]; [request appendPostData:[json dataUsingEncoding:NSUTF8StringEncoding]]; [request star...

Using Three20 with another library and conflicting linkage flags

I'm trying to add Three20 to my project, but the -ObjC and -all_load flags are messing with another library I'm using. The other library is ZXingWidget for barcode reading, but I don't think that part is relevant. I'm reasonably sure the answer is to use force_load instead of all_load and then point to my three20 libraries, but I can't ...

What are some great Quartz 2D drawing tutorials?

I'm searching for some great Quartz 2D drawing tutorials aimed at the iPhone. I'm new to Quartz and want to start off with something easy and then progress to more difficult stuff. Does anyone know of any Quartz 2D drawing tutorials that they would recommend? ...

Changing Image quality for the iPhone 4 users in an iPhone app

I want to display an image to my users which is larger than the screen area and will overscroll to let the users drag it around and zoom in. Do I need different images with different dpi for iPhone 4 users because of the higher resolution? Or can I just set the zoom level differently depending on device? ...

Time out with Synchronous NSURLConnection

I am writing an application that uses Synchronous NSURLConnection(s) and am finding that my application hangs if the url entered is incorrect. I tried to set a time out of .5 seconds but it does not seem to take. I read somewhere that it is not possible to set a time out on a Synchronous request (and yes it is very important to the appli...

ASIFormDataRequest- POST of file continues seems to continue after authentication fails

I'm posting some data to a http authenticated url with ASIFormDataRequest. When the authentication fails and the authentication dialog delegate is invoked the upload progress seems to still proceed fully. So in these cases: 1) The user's credentials are not yet stored in the keychain 2) The user's credentials which are stored in the k...

What needs to be covered in Three20 tutorials and documentation?

A few guidelines One topic per reponse Before submitting, please search for the topic below and vote-up instead of re-submitting. If you have seen a blog post or tutorial on a subject, you should post it as a comment to that answer. ...

RegexKitLite not matching square brackets

I'm trying to match usernames from a file. It's kind of like this: username=asd123 password123 and so on. I'm using the regular expression: username=(.*) password To get the username. But it doesn't match if the username would be say and[ers] or similar. It won't match the brackets. Any solution for this? ...

Restarting an action in cocos2D for the iPhone

If I am using an action that does not repeat in cocos2D how do I restart that action? I am using the code: CCAnimate* action = [CCAnimate actionWithAnimation:myAnimation]; [mySprite runAction: action]; The action runs fine once, but when an event is triggered I want to be able to run the action again as long as it is finished, so ...

How do I pass an object into a delegate?

I am creating a delegate view controller and presenting it to the user to perform an action but I would like to change a NSString on the delegate view controller based on the originating view controller. For example if the delegate view controller is a delegate of viewControllerA, then display Foo, but if its a delegate of viewControlle...

HTML button tag does not word-wrap on iPhone/iPad

I am having trouble getting the <button> element to render correctly on the iPhone/iPad. Here is the sample: <button type="button" style="width:150px; word-wrap:break-word;">some very long text to make it wrap and go to another line</button> The idea is to have a fixed width button and the text wraps as needed. In newest IE, FF, and ev...

How to download a file by using NSURLConnection?

Hi, everyone, I want to ask a question about the objective C. I want to download a .vcf file from a server (CardDav server) in iPhone application. After I read the API and library of the Apple Developer, I found that I should use the NSURLConnection Class. However, I don't know how to start the program. Therefore, I want to ask can any...

Searching for surrounding suburbs based on latitude & longitude using Objective C

I need to identify items of interest nearby to a particular latitude/longitude. I have two sets of objects stored in Core Data: PostalArea - latitude - longitude - postcode Store - name - latitude - longitude I need to be able to retrieve a record from the PostalArea table, and then find stores which are closeby. Most of the examp...

particle animation problem

I'm trying to draw several particles as we touch and moving. When user tilts the device, particles moves to the tilted side. I made this steps by using each particles on each Image View. But it's too slow when making like 100 image views. SoilView= [[UIImageView alloc] initWithFrame:CGRectMake(currentPoint.x + randomDist1, CurrentPoi...