iphone

How to enumerate CFProperyList / CFDictionary keys

I would like to iterate through a CFDictionary (CFPropertyList) and get all values on a specific level. This would be my dictionary / property-list: root A foo 0 bar 0 B foo 10 bar 100 C foo 20 bar 500 Using ObjC it would look something like this: //dict is loaded wit...

What header should I include for memcpy & realloc in a C++ iPhone program?

Hello, I am porting a project to the iPhone and it uses realloc and memcpy which are not found. What is the header to include? it's a projet mixing objc and c++ and I am starting to be lost. Thanks in advance for your help! ...

c++ templates in an iPhone project

Hello, I am porting a project to the iPhone system and I am facing the following problem: I have an header containing c++ templates If I rename it to .mm, it does not compile (because it should be an header) and if I keep it as .h, it is interpreted as an objective C header Do you have a workaround to fix this issue? Thanks in advance...

Animation issue when hiding iPhone toolbar

I have a toolbar in my RootViewController and I then hide the toolbar in a SubViewController using the following code: RootViewController - (void)viewDidLoad { ... [self.navigationController setToolbarHidden:FALSE animated:FALSE]; ... } - (void)viewDidAppear:(BOOL)animated { [self.navigationController setToolbarHidde...

Would it be ok to make an X in the upper right hand corner of a UIView to cancel out of the view?

I have a UIView that I don't want to have a navigation bar. It is a modal view. Would it be ok for me to make an custom UIButton shaped like an X to get out of it? Would Apple care? Is there a better way? ...

Updating imageView on UIButton within UITableViewCell

I have custom UITableViewCells (created in interface builder) which are used for a static UITableView which for the sake of argument I will call the AddUserTableViewController (i.e. I do not use autoreleased cells as I only have 5 rows). In the top cell (used for the user name) I have embedded a UIButton which I use to open an UIActionS...

Email setup in my own iphone app

I am new to iphone app development, i have created my own app, i want to know whether we can setup the email address for our own app or we have to use only the email that was setup in the iphone. If we can please give me an idea of how to do it. Thanks in Advance Akhil ...

Freaky UISwitch/UILabel.hidden/UIImageView.hidden Problem!

Hi Everyone! Sorry for the constant questions, but in my app, you are able to toggle if 3 UILabels and 1 UIImageview's hidden property is YES or NO via UISwitchs on another page (The settings page). The weird part is, one of the UILabels is hidden, even when it is declared that it is not to be hidden. Here is my code on the settings p...

iPhone: Do I have to (and how) release the subviews of a custom table view cell?

I have got custom TableViewCell-s where I assign several UIImageView-s and UILabel-s to the cell's contentview, like this: [cell.contentView addSubview:iconFileView]; [iconFileView release]; [cell.contentView addSubview:areaLabel]; [areaLabel release]; [cell.contentView addSubview:placeLabel]; [placeLabel release]; As I understand the...

Terminating app due to uncaught exception 'NSInvalidArgumentException

Ok here is an interesting one... I am receiving the warning: Characters may not respond to 'addHeroType:atX:atY:fromMobTable' although I have the functions defined properly as far as I can see so how about another pair of eyes? Here is the definition in Characters.h -(void) addHeroType:(int)newMobType atX:(int)x atY:(int)y fromMobTab...

[How-to] Create a Delegate for iphone (in a separate file)

Hey guys, I have been looking for hours and didn't find anything so I decided to give up and ask for your precious knowledge ;) In order to make my code cleaner, I would like to implement the delegate methods of NSXMLParser in another file ... but I couldn't find any tutorials ... Could someone explain me briefly how to do that ? Ch...

UIImage setting value from filename in database

Hi All I have a SQLite database containing several items of data and in there i have included a column with the file names of the images i want to use in my app. I know how to pull this data out but i dont know the correct syntax to use to set that filename to the uiimage. Here is an example of what i thought it would look like. UIIma...

is it possible to custom commitEditingStyle?

Hello iPhone gurus, Quick question here. I'm implementing a UITableView with cells, some of the cells contain links. I would like to use something like the commitEditingStyle so when a user swipe a specific row, it will show a custom message instead of Delete or Insert, i want it to be Mail so i'll be able to mail a link to someone. I...

Blank simulator screen due to file name or name change or neither?

hi; i have a problem, clearly. when i started the project i had stupidly named my [AppName]ViewController just [AppName]Controller. As i went along i could never get iphone simulator to display more than a blank white screen. upon having made all the connections in interface builder and still facing the same problem, i decided my blank ...

IPHONE - fade in and fade out of a UIImageView with different times

Hi, I would like to do a fade in and out of a UIImageView using different times, let's say, using the following parameters: t = 0 ... UIImageView's alpha = 0 t = 0.5s ... UIImageView's alpha = 0.7 t = 0.7s ... UIImageView's alpha = 0 Is this possible to do with CAAnimation or other method? How can that be done? thanks for any...

Installing more then one iPhone SDK

I was wondering how I would go about keeping Apple's SDK 3.2.1 installed, while also installing the new beta. I am sure this is simple, but wanted to ask before creating a potential problem. Also SKD 2.0 is it possible to get back, like from the Apple site or not? I am wondering what most programmers are doing to test multiple versions ...

Is there a way I can show a short movie intro clip when my iphone app starts?

Is there a way I can show a short movie intro clip when my iphone app starts? There are many apps that have movie intro clip in app store. ...

How to know when a Core Animation has finished?

say I have... [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; CGPoint position = myObject.center; position.x = position.x - 10; myObject.center = position; [UIView commitAnimations]; Core animation happens on a separate thread is there a way to know when an animation has finished? i.e., maybe there's...

NSDate initializer problem on the iPhone

I am trying to do some basic operations with Dates on the iPhone. I want to take a string like "2010-02-19" and turn it into a string like "Friday, Feb 19." The strings I will be receiving will always be in 2010-02-19. Right now, I am running the following code that works, but it produces a warning that says "NSDate may not respond to...

UITableView has a custom section header view which disappears

The tableview, custom table header, and custom section headers are loaded from a NIB. The tableview is grouped. When the view loads, the first section header doesn't show up. If I scroll down, the other section headers will appear at first, but will disappear as soon as the section above them touches the top of the screen. If I scroll...