iphone

Detect Application States

Hello, I want to detect application states and send it to the server. In the new OS4, with multitasking there are some methods available to help detecting the states: application:didFinishLaunchingWithOptions: applicationDidBecomeActive: applicationWillResignActive: applicationDidEnterBackground: applicationWillEnterForeground: appli...

iPhone DropBox App Like implementation - flipping tab bar to reveal login screen

I am writing an application where you need to show login screen modally and the app has a tab bar. I have added tab bar directly to the UIWindow. To flip it to a new view (login view) I have overridden applicationDidFinishLaunching where I check if user has login credentials, then I do not show the login screen otherwise (assuming first...

iphone app approval question

I'm about to submit an app for approval and have a quick question: it's a simple app for drink recipes and i was wondering if it's ok to use brand names in the app, like 'Stoli Vodka' ? I've put the reg. trademark symbol next to the brand. thanks in advance. ...

Editing an image in iphone sdk?

Hey guys! So right now I'm making an app that takes the data of pixels (like rgb values) and I want to modify these values to smoothen out the image. I already have the getting the values done, now I just need to set them. How would I go about changing the rgb values on pixels in an image? Thanks in advance! ...

Got negative number on iPhone touch event

I use following code to detect touch event. - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint touchPoint = [touch locationInView:self]; NSInteger nData[MESSAGE_DATA_LENGTH]; [self generateTouchEvent:touches withEvent:event Data:nData]; KWApp_touchMove...

Countries to sell paid applications from in Android Market and Apple AppStore.

Paid applications in Android Market can be sold only from a handful of countries. Is it also true of Apple AppStore? From which countries can you sell apps on AppStore? Is there an authoritative list somewhere? Note: I'm not looking for list of countries in which iTunes is supported, but list of countries from which developer can sell u...

Determine the hardware for iPhone

How can I tell if the application is running on iPhone 4 or iPhone 3GS or an iPad? I want to determine if which hardware I'm using and then provide additional functionality if it's an iPhone 4 (such as using the video light or gyro-sensor). Any help would greatly be appreciated. Thanks PS: I'm looking to determine this programmatical...

How to Stop a Synchronous NSURLRequest in iPhone?

I used synchronous request to fetch data from server and insert those data in the database.This is working perfectly alright.Now the problem is that I want to stop the request in between the process is going on (means when the request is already send for data or during when the data are inserting in the database).So Is there any way tha...

How to unzip an AES encrypted zip file on the iPhone ?

In my current iPhone project I need to decrypt zip files which have been encrypted using AES 256 method either on a Mac with StuffIt Engine or on Windows with WinZip. I tried to use ZipArchive (based on MiniZip) but it doesn't work. Anyone knows how to do this ? ...

Problem with numberOfRowsInSection and dictionaries

Hi All, I have created a dictionary with a number of different bits of information all pulled from and xml feed. I now want to pull certain parts from the dictionary into areas to create my tableview. so far creating the section headers was fine, but having a problem with the numberofrowsinsection part: - (NSInteger)tableView:(UITable...

how to change the font size of UISegmentedControl text?

How can i reduce the font size for the each item? NSArray *btns = [NSArray arrayWithObjects:@"ANNEXET",@"HOVET",@"GLOBEN","ALL",nil]; toolbtn = [[UISegmentedControl alloc] initWithItems:btns]; [toolbtn addTarget:self action:@selector(segmentAction) forControlEvents:UIControlEventValueChanged]; //toolbtn.segmente...

An app used SMS functionality, how to publish the app to disallow ipod touch user download.

I used some code like below: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"sms://123"]]; what would happen if it runs in ipod touch how to target iphone user only when publish the app to the store. ...

How to achieve smooth animation when using single-step rotation / How do I get the new frame size at the start of rotation?

Hi all, I'm trying to switch from two-stage rotation to one-stage rotation (to avoid the console warning, and because Apple recommend doing so because one-stage is faster). However I can't figure out how to get the new size of my view (taking into account the navigation bar, status bar, etc) early enough to perform the update of my UI ...

Getting the scale factor from a CABasicAnimation

Hi there, I'm animating a shrinking object. At any point the user can hit a button to get the current scale factor of the object. (I start by scaling the object up using a CGAffineTransformMakeScale, so the scale factor should be 1 when it reaches its original size). I'm just not sure how to retrieve the current scale factor from the ani...

Jack/earpiece detection in iphone

Hi Anyone could tell me how to detect when a jack of an earpiece is plugged-in into an ipad or iphone? Thanks ...

Adding a animated view

I have a tableview and a normal view (let's say view 2) inside a normal view. All made in Interface builder. View 2 is above the tableview and needs to appear animated from above at the loading of the view. When pressing a button, the view disappears again. How can i do this? thanks ...

How can I callback as a CABasicAnimation is animating?

I have an animation I'm using to snap a rotatable UIView to a circular grid. As the view animates, I need to update another view based on the rotating views position. How can I go about getting the position of the rotating view as it animates into position? ...

access plist data

Hi, i have a plist which goes like this: <dict> <key>11231654</key> <array> <string>hello</string> <string>goodbye</string> </array> <key>78978976</key> <array> <string>ok</string> <string>cancel</string> </array> i've load the plist using this: NSString *path = [[NSBundle mainBundle] pa...

How to tell iPhone OS function to stop/cancel?

I have an action which begins when the user taps a button on the screen (e.g. "Import"). At the same time, a UIToolbar appears on the bottom of the screen which gives the user the option to cancel this action. How can I properly send a cancel message to the initial function? If the user hits "Cancel," I do not want the "Import" to contin...

remove UIView subview based on tag?

I am creating a view like this: UILabel *qty = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 20)]; qty.backgroundColor = [UIColor whiteColor]; qty.text =[NSString stringWithFormat:@" Qty: %@", currentQty]; qty.alpha = 0.5; [qty setTag:999]; [self.view addSubview:qty]; [qty release]; This can happen multiple times in this view c...