iphone

Android equivalent to NSNotificationCenter

In the process of porting an iPhone application over to android, I am looking for the best way to communicate within the app. Intents seem to be the way to go, is this the best (only) option? NSUserDefaults seems much lighter weight than Intents do in both performance and coding. I should also add I have an application subclass for stat...

Objective C: Properties error

Im getting some kind of error when setting a value to a NSArray property of my code. I will send you de code and the debugger output. @interface RootViewController : UITableViewController { @private NSArray* regioesArray; // NSString *str; // NSArray *ar; } @property(nonatomic, retain) NSArray *regioesArray; @implementation RootV...

When is the right time to release properties?

Hey guys, I have a couple of properties declared in my header file, and just wondering when they have to be released. I'm currently doing them in my "dealloc" method, but getting the EXC_BAD_ACCESS error when doing so. Here's my code @property (nonatomic, retain) NSTimer *timer; @property (nonatomic, retain) NSString *closeimage; @pr...

Proper way to represent time of day for alarms

I'm trying to code part of a program that allows users to set up one or more alarms that will remind them to launch the application and do something at certain times of day. I basically understand that I need to use local notifications, but I'm having a hard time coming up with the best way to represent a time of day in my application s...

OpenGL ES 3d rotation causes unintentional translation?

I'm working on an iphone project where I need both a horizontal and a vertical layout. I've got it working in 2D perfectly well, using the following setup to my projection matrix: if(isHoriz()){ glRotatef(90.0f,0.0f,0.0f,1.0f); SOrtho(0, 480, 0, 320, -1, 1); } else SOrtho(0, 320, 0, 480, -1, 1); The problem lies when ...

Getting co-ordinates of UIPopoverController

I want to use the UIPopoverController for a floating toolbar, as it does well at displaying in the best possible location. However it looks really ugly, with that thick black bar around it (and also the logic of using it for a toolbar is a bit hairy). So I am going to have a custom view for the toolbar. But I don't want to reinvent all ...

Delete LocalNotification

I set a local notification with key "notify" and know that i can delete it with below code but don't know how to declare 'notification' for key "notify" to delete it [[UIApplication sharedApplication] cancelLocalNotification:notification]; ...

Errors Compiling Prefix.pch file, Causing bigger problems

Update 2 I discovered that if I change the "Base SDK" to "iOS Simulator 3.2" (iPad ???) it does not give me this error when doing Build & Analyze... But this is supposed to be an iPhone App. I am running XCode 3.2.4... am I missing something when I create the Project? I am choosing iPhone as the target device, not sure what's going on. ...

iPhone, label at end of compound statement

I'm trying to add a label I think thats what they are called... .. just like I've done several times before to exit a function without processing some code and I'm getting the error 'label at end of compound statement' why ? what do i need to do instead ? ...

iOS - How to add display a string on a UIImageView

How can I show a string on a UIImage View? Ok Ive got this currently: - (void)viewDidLoad { [super viewDidLoad]; playerPositions = [[NSArray alloc] initWithObjects:box1,box2,box3,box4,nil]; [box3 drawRect:box3.frame]; } - (void)drawRect:(CGRect)rect { [super drawRect:rect]; CGContextRef context = UIGraphicsGetCurrentContext...

FBConnect on iPhone - get wall contents of a user without the login dialog

Hi I have an app in which I'd like to show the user my company's status updates. Is it possible to get status updates of an account without the user having to login to FB? Or even if they have to login, can I get the public stream of the company's account and show to the user even if they are not in the friend list? If yes, how? Thank...

Problem with singleton from xml parser. afternavigation.

after parse xml. xml attributes data i stored in NSMutableArray *anArray; which is in MyAppDelegate. I used anArray in MyAppDelegate. For my xml i do have One root Tag and N number Child tag. my xml example: <root> <child name1="",name2="",name3=""/> <child name1="",name2="",name3=""/> <child name1="",name2="",name3="...

remove all sub image views of a tableview

i am using a table view and adding small images(cross arrow an accept arrow images) to right side of each cell based on if the option is correct or not.... ....Now my table reloaded many times....due to which the images are repeated on every single cell.... i mean if cell_1 has that accept image..after table reload if the value of cell...

iPhone, Are these analyzer warings due to goto statements ?

I'm getting these analyzer warnings, are they due to goto statements ? --- snip --- ...

Keep UITableViewCell color when move UITableView rows

Hello everyone I have an UITableView, I set the color of the first row as Green. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row=[indexPath row]; NSInteger section=[indexPath section]; static NSString *SimpleTableIdentifier1 = @"CellTableIdentifier"; UI...

How to add a slide-up view with multiple buttons? Is there any ready-to-use component in Objective-c?

I want to add to my application a new view with buttons for sharing content or saving it to disk. I know how to do sharing itself (save, email), but I wonder if this layer should be created as frame or there is any ready-to-use class displaying modal ![alt text][1]layer for half screen? I prefer to ask before doing it manually. I'm not ...

UIButton events

Hi, using iphone SDK 4.0. I have some UIButtons in a viewcontroller which when touched should play a tone, and when released stop playing the tone. This is done so that the tone length depends on how long the button is held down. I use the Touch down event for when i call [toneplay start] and the TouchUpInside event for when i call [to...

iPhone, why and how do i correct these anlyzer warnings while retaining a view controller ?

I've struggled to get a login / startup view to show before my mainWindow nav controllers and its finally working, but I'm now getting these analyzer warnings. If I release the navigation controller, the release in the dismiss button with cause an error. what should I do here ? ...

passing float variable as parameter

Hi, I am trying to write a method with float parameter and call it using performselector but i am getting error in doing this. Following is my code: [sender performSelector:selector withObject:progress/total]; here progress and total both are float variabal. I am trying to call following method in different class -(void) updateProgr...

Developign x-platform mobile apps on ubuntu

Hi all, I'm a junior iphone developer and got familiar with developing on xcode on top of Mac OS. I wanna build some Cross-Platform apps in the near future and wanna Use Ubuntu as my Operating system. I found many solutions that run only on Mac OS or need mac to build apps for iphone but this is not what i need . i need something which c...