iphone

UIButton of type UIButtonTypeCustom will not display Title (iPhone)

Hi I must have overlooked something completely obvious?? but my button displays its image and size correctly, but I simply can't get the Title to show up. I did a really simple test, the Title does not even show up when I do this: CGRect frameBtn = CGRectMake(160.0f, 150.0f, 144.0f, 42.0f); UIButton *button = [UIButton buttonW...

How to efficiently show many Images? (iPhone programming)

In my application I needed something like a particle system so I did the following: While the application initializes I load a UIImage laserImage = [UIImage imageNamed:@"laser.png"]; UIImage *laserImage is declared in the Interface of my Controller. Now every time I need a new particle this code makes one: // add new Laserimage ...

Corrupt iPhone App Name

I've done an adhoc build to test an application, but when I drag it into iTunes to add to my devices it is getting a corrupt name. It comes up with the name "Myapp Name <!DOCTYPE plist PUBLIC "-//APPLE//DTD PLIST 1.0//EN" http://www.apple.com/DTDs/PropertyList-1.0.dtd">" which continues with the whole plist I've tried the obvious, cle...

How to check existence of reference to an NSManagedObject?

I successfully stored and retrieved a reference to an NSManagedObject using the example found in this site http://cocoawithlove.com/2008/08/safely-fetching-nsmanagedobject-by-uri.html The problem is, the app crash whene triying to retrieve an NSManagedObject which has been deleted. I tried the method isFault on the object, but it alway...

Make circular joystick

How do I make a joystick like the one in i dig it, using UIImageView's that the smaller one can be used to move around, I just really would like to know how I would get the smaller UIImageView to stay inside the larger one, I just don't know how I would do this because they are both circular. I have an Image below: ...

Get EXEC_BAD_ACCESS when I get the NSFileModificationDate

Hi everyone, I try to get the last modification date of a file: NSFileManager *fm = [[NSFileManager alloc] init]; NSError *err; NSDate *lastModif = [[fm attributesOfItemAtPath:filename error:&err] objectForKey:NSFileModificationDate];//filename is ok ;-) if(err == nil) { [lastModif retain]; //I can put a NSLog of lastModif here...

iphone - getting the button id in a segmented control

I am trying to create something that uses the idea of the UIPopOverController, I mean, have that speech bubble anchor pointing to the button who triggered the method. The problem is that I am using a UISegmentedControl... How do I get the id of the button that was tapped on a UISegmentedControl, so I can determine its position and gene...

How to do Animation like Dock in Macintosh [iPhone]

In iPhone I want to do animation like Dock in Mac how can I do. please suggest me. thanks. ...

NSCurrentLocaleDidChangeNotification on iPhone OS

While the NSCurrentLocaleDidChangeNotification perfectly makes sense on Mac OS X, I don't see how you can possibly receive it on iPhone OS. In order to change the locale, you have to quit the running application, then change it in Settings → General → International → Region Format. At that point, your app is not running, so how could it ...

Why does my UIActivityIndicatorView only display once?

I'm developing an iPhone app that features a tab-bar based navigation with five tabs. Each tab contains a UITableView whose data is retrieved remotely. Ideally, I would like to use a single UIActivityIndicatorView (a subview of the window) that is started/stopped during this remote retrieval - once per tab. Here's how I set up the spi...

iPhone detect touch when screen is locked

Hi everyone! I know that apple knows when you touch the locked screen (iPod shortcut, call), but can I know somehow when user touches it. Thanks in Advance! ...

how to programatically set the current page for UIPageControl?

I have 3 "pages" (page 0, page 1, page 2) in a UIScrollView that are snapped to by finger swipes. There is a UIPageControl there too. The UIScrollView starts off presenting page 0. What I want to do is present page 3 FIRST sometimes. How can I do this programatically. Simply setting currentPage (of UIPageControl) to the page number doe...

how to make UIAlertView with custom font , height and width?

Hi All, I want to show pop up of question with it's options. Each question have 3 options. Currently the text is not fitting in the UIAlertView. My UIalertView is in landscape mode. my questions are, 1) How to change the font and font size of UIAlertView message and Button? 2) How to increase the height and width of UIAlertView? OR...

what is the difference between tar and gZ?

hi, when i compress the file "file.tar.gZ" in iphone SDK, it gives file.tar , but both tar and tar.gZ gives same size?any help please? ...

A NSMutableArray is destroying my life!

IET ANOTHER EDIT (to increase strangeness) EDITED to show the relevant part of the code Hi. There's a strange problem with an NSMutableArray which I'm just not understanding... Explaining: I have a NSMutableArray, defined as a property (nonatomic, retain), synthesized, and initialized with 29 elements. realSectionNames = [[NSMutableA...

iphone sdk - select a cell in a tableview, with code

hi guys I would like to select a cell in a tableview, except with code before any user interaction. Is this at all possible, a quick search through the sdk notes doesnt yield anything. Where should I look? Regards ...

How to programmatically change UIColor of view

Okay, this question comes through a friend so it might be lost in translation... Basically we need to change the color on a View. It appears to be stored in NSString format, but using a NSString to set the UIColor doesn't seem to do anything. In other words, if NSString color holds the value "redColor" then: self.view.backgroundColor =...

Orientation in a UIView added to a UIWindow

OK, bear with me. I have a UIView which is supposed to cover the whole device (UIWindow) to support an image zoom in/out effect I'm doing using core animation where a user taps a button on a UITableViewCell and I zoom the associated image. The zooming is performing flawlessly, what I haven't been able to figure out is why the subview i...

symbolicatecrash does not give me method names for my own functions

Hey all, Running into a weird issue using symbolicatecrash to debug crash logs. After I run symbolicatecrash with the .dSYM file of the build that crashed, it gives me function names for all of the Foundation classes, but not for my own app. Is there some setting in XCode that I may be missing? GENERATE DEBUG SYMBOLS is turned on to YES...

How to store short date format to db?

I use Core Data and I want to store this formatted date to db, field type is date, how can I do this? date formatted: 2010-10-31 I hope I explained my scenario. Sorry for my English. Greetings. ...