iphone

Disclosure button for displaying more text in a table view

Hi all ! So i have created a custom cell with IB and source files associated which is put in my table view. The cell in my table view display text which doesn't fit entirely. What i want is to add a disclosure button in my cells which when is touch up display the rest of the text of the cell in for example two lines or by adjusting the...

Generating alert to User when didReceiveMemoryWarning is called

I've seen some apps that generate a warning when low memory is detected. I tried to do this in my app but ran into a problem. Using the simulator to simulate a memory warning, the alert generated pops up twice before I can hit "ok" and pops up 9 more times after that times before it finally goes away. Is it a bad idea to generate an ...

Which is faster/easier to work with in an iPhone app: XML or JSON?

I am starting to create an iPhone application that will interact with a public API. My question is, which will be faster and/or easier to work with: XML or JSON? ...

Simple Sprite Animation on iPhone

Hi, I am trying to do a simple animation on the iPhone and then have it stop once it is finished. The code I am currently using is: NSArray *imageArray = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"init_lay1.png"], [UIImage imageNamed:@"init_lay2.png"], ...

how to access a shared folder on a windows machine with iphone SDK?

Hello, I was wondering if anyone could help point me in the right direction if I am trying to write the contents of a file from a shared folder on a windows machine to an array on the iphone over a wifi connection. could I do it with initWithContentsOfURL?? thanks for the help ...

Implementing the 'next' option in the keyboard for iPhone SDK

I am having an awful hard time trying to implement the task of when the user selects the 'next' button in the keyboard, the user is then sent to the next text field to start editing. In my example I have three text fields. Here is what I've done, hopefully you can fill me in on where I am going wrong. Keep in mind I just picked up SDK a ...

Generate a random number with a random numberlength in Objective-C

Hello, always when I try to generate a random number with Int = arc4random % MAXNUM the length of the number is as long as the MAXNUM number length -1. So if I set arc4random % 1000000 the number is between 100000-999999. How can I get different numbers like 78, 476 or 4842? Here a sample: int number = arc4random() % 1000000; outputLa...

Change UITextField background when editing begins

I'd like to change the background image of a UITextField when it becomes the firstResponder to show the user that it has focus, similar to the :active or :focus pseudo-classes in CSS. I'm guessing that I may need to do this programmatically; so any help is greatly appreciated. -Giles ...

How can I temporary disable "low battery" UIAlertView on iPhone?

I'm developing something like a stopwatch, so I have to turn off that below 20% battery alert view somehow during a time measuring session (I will inform the user about battery percentage elsehow). I just couldn't google for any answer. ...

what is the differences of purchase in app and create your own link to pro version?

I want to create two version apps: lite and pro. I look through purchase in app guide , but it is not allowed to change the lite version code to add functionality. you can just pop up an store UI to link the user to pro version, right? But in this way, we can do it ourself, we copy the link of pro version in the appstore ,then pop up a d...

iPhone UIButton buttonType always evaluates to 0?

Whenever I execute the code below I always get button type = 0 no matter what I specify for buttonWithType. Does anyone know an explanation for this behavior? I'm trying to distinguish button based on their type obviously without success since the buttonType property appears to be broken (or useless). As always thanks very much for an...

iPhone Currency input using NSDecimal instead of float

Hello, iPhone/Objective-C/Cocoa newbie here. Based on a number of posts on stackoverflow, I have cobbled together an IBAction that I'm using in a basic iPhone calculator app that I'm building. The IBAction works with the numeric keypad to allow entry of decimal numbers without having to enter a decimal point. I am trying very hard to ...

Swip from one view to the next view

Hello, I have an app with two views and ViewControllers. How can I let the user swip from one view to the next view like in the homescreen or the weatherapp. I know that there is a page control in the Interface Builder, but it is just an Indicator on what page the user is. Thanks and sorry for my bad english! ...

How do I add labels to CPBarPlot barplots?

Hello! I'm completely new to Core Plot and have a working bar graph, but the visual is kind of useless for me unless I know which object is represented in each bar. I have seen that there is a method called 'fieldIdentifiers' but do not know how to implement it, nor can I find any documentation (if this even the correct method). Can yo...

iPhone: core data error: +entityForName: could not locate an NSManagedObjectModel for entity name 'Name'

See title ^ Code causing this: NSManagedObjectContext *context = [fetchedResultsController managedObjectContext]; Name *name = (Name *)[NSEntityDescription insertNewObjectForEntityForName:@"Name" inManagedObjectContext:context]; Feature *feature = (Features *)[NSEntityDescription insertNewObjectForEntityForName:@"thing" inMan...

Measuring velocity via iPhone SDK

I need to implement a native iPhone app to measure the velocity of the phone (basically a speedometer). I know that you can do so via the CoreLocation API fairly easily, but I am concerned about battery consumption since this is to be a real-time measurement that could be used for up to a couple of hours at a time. My understanding is ...

Is it possible to save the voice data recorded from an iPhone?

What would be a good way to transport the voice data recorded on the iPhone? I am building some sort of online cloud system where the user is able to record a clip and save it online to be retrieved later on from our server. What format should I save the voice data and how should it best be stored (as a file etc)? ...

How to set up Navigation Controller -> Root View in code (iPhone SDK)

I need the ability to bypass the default RootViewController you get when you pick a navigation controller project type in XCode. I need this because I want to go down a different path depending on whether the app has been configured (sign up/login screens if not). Could someone point me to an example where in the AppDelegate the Naviga...

Monitoring UINavigation stack

Is there a way to monitor what view controller the navigation controller had before it pushed on the current view controller. also the opposite, what view controller it popped off the stack before getting to the current view controller? Thank you in advance ...

Basic route information with Cloudmade

Hi, I am trying to use CloudMade's route-me service in my application. All I need from the service is driving distance between two locations, I don't want to display it in a map. There doesn't seem to be any tutorial in CloudMade's website that handles this. I mailed to the support address they have provided. Nothing back from them so ...