iphone

It's possible to get a attribute from NSEntityDescription using a NSString?

Hello There! Im getting the value of an attribute using NSEntityDescription.attributeName, like this: NSEntityDescription *edCurrentRecord = [maListRecords objectAtIndex:indexPath.row]; UILabel *lblCell = [[UILabel alloc] initWithFrame:CGRectMake(5.0, 10.0, 280, 20.0)]; [lblCell setText:edCurrentRecord.name]; There is another way to ...

How to code smooth scrolling for "flick" gesture on iPhone

I have horizontal list for which I'm implementing my own scrolling logic. I have the "touch and drag" scrolling working great, but I'm having trouble with the "flick" gesture. All the built in scrollable views have the feature that if you "flick" the view it scrolls faster or slower based on the intensity of the flick. Does anyone has a...

UIGetScreenImage

Is UIGetScreenImage returning an image of whatever is on the screen or is it limited to the screen shown when a camera view is displayed? ...

Where can I get the original images for the Accessory buttons in a UITableView?

I want to create a custom accessory icon to go to the right of my cell in a UITableView and want it to match the blue >, I have tried creating from scratch and it looks good on its own but when put next to a cell with the blue > it looks messy where the two icons look similar but not of the same style. Does anyone know where I can get h...

UILabel subview in UITableViewCell isn't showing up. (iPhone Dev)

I have a cell in a table view that has a UILabel as a subview, when I set the text of the label, it is never shown on the cell. I'm somewhat a noob in iPhone development and am not sure what I'm doing wrong... I am creating and returning the following cell in my table view's cellForRowAtIndexPath delegate: cell = [[[ActivityCell allo...

NSArray of UIBarButtonItem Tag (i.e. NSInteger)

Is it true that you can't have an NSMutableArray of NSIntegers? When I try to add the values to the array and then print them out they're huge numbers (when if I print out the tag to NSLog they're 0,1,2,3 etc.). I'm trying to create an array of my UITabBarItem's tags so I can save the order and retrieve it later. Am I forced to do some ...

Audio Queue Services on iPhone only playing the first enqueued buffer?

Hey all, I've been up all night trying to figure this one out. My code is basically the same as Apple's example here. However, the device plays only the FIRST buffer placed in the queue (I hear the contents of the first buffer when the app starts). After that, no sound will come from the device at all. The playback is still running...

iPhone - How do you make a resizable rectangle for cropping images?

Hi everyone, I'm having a trouble making a re-sizable rectangle for cropping my images. I'm trying to achieve something like this picture: http://img192.imageshack.us/img192/8930/customcropbox.jpg Well, the only problem is I have no clue where to actually start. I need some advice to how I can achieve this effect of cropping. What docu...

NSNumberFormatter and rounding percentage value

here is my code snip, i dont know how to round double numbers. double m = [tmpProduct.msrp doubleValue] ; double d = [tmpProduct.discountPrice doubleValue]; double p = (d * 100 ) / m; here tmpProduct.msrp and mpProduct.discountPrice are (NSDecimalNUmber *) from the operation above I got p = 44.995757 i want to convert it to (45%) ,...

iPhone UITextField controlling background color

Greetings, I am unable to control the background color of a UITextField with a borderStyle= UITextBorderStyleRoundedRect. With this border style the backgroundColor property only seems to control a very narrow line along the inner edge of the rounded rectangle. The rest of the field remains white. However, if the borderStyle is set t...

View contents of my documents directory

Hello, I need to verify the correct function of an application I am working with, and can see that the files are being written properly to the users documents directory in the simulator. I need to verify airplane mode, so either I need to be able to see into the documents directory on the phone or put the simulator in airplane mode. I...

Values of passed in variables don't retain

I'd like to split up executing a query. The myprepare function below opens the database connection and runs the sqlite3_prepare_v2 function. Once sqlite3_open is executed within the scope of the myprepare, selectstmt and database have valid addresses assigned to them. However, once I come out of myprepare, their addresses are wiped t...

Sync Volume rocker with a UISlider

I am trying to get a UISlider to sync with the volume rocker. I have successfully used the slider to change the system/ringer volume, but I need the slider to move when the rocker moves. any suggestions on how to get the current volume value? I am using the code below to monnitor the volume change: - (void)volumeChanged:(NSNotification ...

Retain count of navigationcontroller and window is 3

I am developing an iPhone application which is navigation based. Whenever the application quits, the retain count of the navigation controller and the window is 3. Can somebody explain me how to overcome this issue? The dealloc method, as a result, is not getting called. ...

How do I generate a new public / private keypair for iPhone development?

Creating a simple public/private keypair, such as through ssh-keygen does not create a file I can import into Keychain Access. Does anyone know how to create a new keypair for iPhone development? ...

Detect whether iPhone is displaying time in 12-Hour or 24-Hour Mode?

How can you detect whether iPhone is displaying time in 12-Hour or 24-Hour Mode? I currently monitor the current region for changes, however that's not the only setting that affects how times are displayed. The 24-hour toggle in the date & time settings overrides the current regions settings. Is there any way to detect this 12/14 hour ...

UITableView from plist dictionary KEYS iPhone

I am attempting to get the name of the custom ringtones in the itunes directory on the iPhone. I can successfully list the custom ringtones, but they re displayed as HWYH1.m4r, which is what iTunes renames the file, but I know theres a way to decipher the actualy name of the song, for example: UHHEN2.m4r = TheSongName. NSMutableDict...

Awkward: encodeObject with Array causes EXC_BAD_ACCESS error, desperate

I have a custom object which conforms to NSCoding, since the object should be writable to disk on terminate. In this class I have various properties holding Cocoa object types such as NSStrings, NSArrays, NSDictionaries. One particular property is this one: @property (readwrite, copy) NSArray *artistReleases; It's actually an Array w...

Enabling the NSCopying protocol in a class

I have a class that has been derived from NSObject. How can copy be enabled like [object copy]? This is for an iPhone application. ...

How do I format text within a UITableView?

In the iPhone Address Book app, the last names/companies are all in bold text. I'd like to do some simple text formatting within a cell. I've seen some mentions of using UIWebView, but this seems like a very heavy solution. Additionally, it's complicated because one has to either fix the cell size or do some special handling to get ...