iphone

Uiimage won't be shown upon uiscrollview

Hello, i've created a tabbar application. Within the app i have a tab item containing a uinavigation controller.My problem is to display a uiimage upon a uiscrollview i pushed. Instead only the UIScrollview will be shown. My nib file of the pushed view looks like this: +UIView +UIScrollview -UILabel +UIImage(with shadow)...

Can [[UIApplication sharedApplication] setApplicationIconBadgeNumber:int] be used multiple times in an application

Hi! Can I use this API multiple times using the lifetime. When I try to do that, this does not update the application badge. Anything I might be missing. Regards Nitin ...

Decrease time in objective-c

Hi all, I have a number of hours and a number of minutes, and I want a reduce the time of 1 second. So, I think I must create a nsdate object with my time, and after find the method to decrease the time. I looked in the apple documentation but I don't find how to do this. thanks Alex ...

help with a useful implementation of keychain on an iphone app

Users have requested a "lock" on my iphone app, which makes good sense as it contains private information. I believe encryption of the data goes above and beyond what people expect on a phone, so my goal is simply to prevent unintended access to the app. My plan is to use keychain to store the password using my app name as the ServiceNa...

setHidden and removeFromSuperview leaves size of element

Hi! I want to hide a label if the labels text value is empty. I have no trouble checking this but if I use [label setHidden:YES] it still leaves the space. I'm adding this label in Interface Builder by the way. I have tried using [label setFrame: CGRectZero], but the label keeps taking up space! What shall I do? ...

Designing view in Interface Builder, but with some logic defined in code

I want to create a simple "control" that will have 4 UILabels defined in it. On one hand I'd like to use Interface Builder to layout my design but on the other hand i'd like to expose some properties that will define contents of each label - is it possible? @interface CompositeView : UIView{ int numberOne; int numberTwo; } @property(n...

UITabBar+UITableviewController in navigation based applications

Hi, I am trying to put a UITabBar on a Rootviewcontroller.xib to a Navigation based Application. I know that we used navigation based applicaitons for Tableviews and by default those .xib consists of a tableview. I tried to put a UITabBar in the bottom of rootview but it is not setting over there. I saw that if we used viewbased applic...

"An error has occurred" message when Location Services is turned off.

In the iOS simulator, I am prompted to turn on my location when the app attempts to pinpoint my location. However, on an iphone running 4.1, I get a generic "An error has occurred" without any type of prompt. I checked my project's NSLogs/Alerts and none of them have a generic "An error has occurred." Is anyone aware of why this happens?...

Reading an async socket continuously

I have already read other similar question about that problem, but that don't work for me. I'm building an iPhone app that talks with a TCP server (windows, but never mind) and I'm using AsyncSocket from cocoaasyncsocket (googlecode). It's a very useful class, but I can't use that at all. In my code I create a "connector" which I all...

Is it possible to develop for iPhone/iPod Touch with Windows or Linux and without one of the devices?

I know this topic is a bit of mouthful. Here's what I'm looking to do: I would like to develop an application for iPhone's and iPod Touch devices and place it on Cydia. I do not have a MAC OS but I do have Windows and Linux OSs at my disposable. Lastly I do not personally own an iPhone or iPod Touch but I have many friends that would ...

How to change the UIStatus bar color?

Hello all, I am trying to change the status bar color to Black translucent. I have changed my Info.plist UIStatusBarStyle UIStatusBarStyleBlackTranslucent And I have added these lines of code also to applicationDidFinishLaunching:() [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:NO]; ...

Is using the UIKEYBOARD class legal?

Hello all, I just added a done button on my number keyboard and read that using the keyboard class directly is illegal but some people said that their app was successfully submitted to the app store? Does anyone know if it is legal or not?I have been googling around for 1hr and I keep getting yes and nos.. anyone knows for certain if thi...

Format integer to 2 places.

Hello, I'm trying to format integer to 2 characters, i.e. 01, 02, 03 instead of 1, 2, 3, 4. I've done a few google searches but could not find anything. Can @"%d" be changed to reflect 2 characters ? timeArray = [[NSMutableArray alloc] init]; for (int i = 0; i < 25; i++){ NSString *timeValue = [NSString stringWithFormat:@"%d", i]; ...

Zombie Messaged In For Loop

I have an ivar, keys which is an NSMutableArray containing 50 strings. When my view loads, i am getting a zombie messaged error in Instruments, and it is directing me to this line of code: for (int row = 0; row < r; row++) { for (int column = 0; column < c; column++){ otherArray[column][row] = [[[keys objectAtIndex:0] retain...

How to keep an iPhone app running on background fully operational.

Hi, first of all, I know there is only support for voip, audio and location apps to run in background and that they will run just while the audio is been played or while using location services, etc. What I want to know is if there is a way to keep my app running on background fully operational, doesn't matter the impact on battery's li...

Is this memory safe?

[NSTimer scheduledTimerWithTimeInterval:0.033 target:self selector:@selector(gameLoop) userInfo:nil repeats:YES]; I don't do anything to dealloc or kill this timer after starting it. Is it safe? Or will it cause me to leak memory? ...

Is tree a tree control for the iphone?

Hello, Is there a Tree control available for the iphone? I need to represent a tree with sub nodes in a tree, how can I do it? Thanks ...

iPhone Development - multiple views in one window.

Hey, I want to have a UIView at the top half of my app, and a UITable at the bottom half. If I create a basic window application I can do this using IB. My main problem is that I seem to be only to do this in the delegate file which I would like to avoid. I repeat the exact same steps I did in delegate in a separate controller and all ...

iphone - programmatically rotate system keyboard to landscape when device is in portrait orientation

I would like to do this because the keyboard buttons are slightly bigger in landscape mode than portrait and I will have older users using my app. Does anybody know a way to do it?? Thanks. ...

How to animate the background color of a UILabel?

This looks like it should work, but doesn't. The color turns green at once. self.labelCorrection.backgroundColor = [UIColor whiteColor]; [UIView animateWithDuration:2.0 animations:^{ self.labelCorrection.backgroundColor = [UIColor greenColor]; }]; ...