iphone

SentTestCase doesn't highlight UnitTest failures as errors in code

I have setup UnitTests for some of the logic of my iphone app, I followed apple's guide for UnitTests in XCode, however when some of the assertions fail - instead of highlighting the place directly in code like a regular compilation error - XCode just displays the number of errors in the bottom-right corner and I have to look up the erro...

How can I set the UITableView border with a grouped style

Does anyone know if it is possible to replace the grey border on grouped table view cells The opposite to this post: http://stackoverflow.com/questions/1408126/changing-border-color-in-iphone-uitableview-cells-non-grouped ...

iPhone: how to send image data to server using JSON?

Hi, I am newbie iphone developer, I am using JSON to send and retrieve data from server. But I used to work with text between iPhone and server. Now I would like to send image data from iPhone to server and vice versa, retrieve image data from server database to iphone. Can anyone show me how I can accomplish this? Thanks ...

Does Adobe Air apps work in iphone and ipad ?

Does Adobe Air apps work in iphone and ipad ? ...

Can you merge two sqlite databases on the iPhone?

Well the question says it all. Is there an easy way to merge two sqlite databases on the iPhone? Their structure is identical and the primary key is guaranteed to be unique across the two databases. I know you can do a INSERT INTO SELECT, but I was wondering if there is a more elegant solution. ...

How to search NSMutableDictionary

Hi Friends. I have a simple question. How can I search NSMutable Dictionary? For eg. I have a dictionary like this: A1: Apple B1: Banana C1: Cat D1: Dog A2: Aeroplane B2: Bottle A3: Android Now i want to search all the content (values) whose key starting with letter "A", means I want to sear...

How to find out if the back-button was tapped in the UINavigationBar?

Firstly I have tried to manage it with the viewWillDisapper-method, but this not detailed enough for me. Is their an other solution? Also tried the delegate: - (void)navigationBar:(UINavigationBar *)navigationBar didPushItem:(UINavigationItem *)item but nothing happens. ...

How to scale up an UIImage without smoothening anything?

I want to scale up an UIImage in such a way, that the user can see the pixels in the UIImage very sharp. When I put that to an UIImageView and scale the transform matrix up, the UIImage appears antialiased and smoothed. Is there a way to render in a bigger bitmap context by simply repeating every row and every column to get bigger pixel...

How to prevent screen capture on iPhone

Can I prevent the screen capture of an iPhone's display? I want to prevent the user from capturing the copyrighted image showed by my application. Thank you. ...

Base SDK & iOS Dev Target?

I have an application that was originally written using iOS 3.1 Last week I did an update to the application via iTunes Connect but mistakenly left the "Base SDK" and "iPhone OS Deployment Target" both set to 4.1 I now plan to resubmit the application using "Base SDK: 4.1" and "iPhone OS Deployment Target:3.1" My questions is: as its cu...

UISwitch's color

I can change UISwitch's color with below code but always color is yellow how to change color to another color? UISwitch *switch1=[[UISwitch alloc]initWithFrame:CGRectMake(70, 121, 94, 27)]; [switch1 setAlternateColors:YES]; ...

create login form in iphone

HI all, i am trying to create a login page in iphone, using sqlite. I need suggestions ,how to create login form with username /password authentication. for successfull login, user should navigate to next page, otherwise giving user a error message.login failed. can you guys suggest me some tutorial orsome guideline to create login fo...

How to get seconds elapsed from a Date String?

In objective-C, I want to determine the seconds elapsed from a date string such as: "Sat, 09 Oct 2010 06:14:50 +0000" How do I do this? I got lost in the convoluted descriptions of NSDateFormatter. ...

How to enable Data Detectors in a (sometimes-) editable UITextView

Does anyone know how the built-in Notes app manages to show data detectors and yet still have its UITextView editable? I've tried defaulting editable to NO (so the data detectors will work) then overriding UITextView's touches methods and setting it to YES, but it ends up scrolling to the bottom and I have to tap again to actually begin...

Adding a button to an iPhone prefs / settings bundle?

Just wondering if it's possible to add a button like the "Clear History", "Clear Cookies" etc buttons in the Safari preferences to your own app's settings bundle? Been digging through the dev docs and can't find any plist specifier for a button, so I'm wondering if this is an internal API for the Apple guys? After you hit the button, y...

Detecting changes to a specific attribute of NSManagedObject

How can I detect changes to a specific attribute of an NSManagedObject? In my Core Data data model, I have a Product entity that represents a product for sale. The Product entity has several attributes: price, sku, weight, numberInStock, etc. Whenever the price attribute of a Product changes, I need to perform a lengthy calculation. Cons...

How to have icons for ipad and iphone ?

Hi I dont get it :) I have an Icon.pn that is currently 57x57, but when I compile I get a warning that it needs to be 72x72. If I make it 72x72 it complains that it needs to be 57x57. I do understand the problem but I do not know how to solve it, how can I tell xcode which icon is for which device ? Thanks ...

how to detect uitextfield lenght

i am trying to get if a uitextfield is empty, and if it is to run the follwing code in an ibaction. float uu = ([u.text floatValue]); float ss = ([s.text floatValue ]); float aa = ([a.text floatValue ]); float x1float = sqrt((uu * uu) +(2*aa*ss)); v.text = [[NSString alloc]initWithFormat:@"%f", x1float]; where v.text is the text i...

iPad orientation problem when iPad is laying flat on desk.

Hey, I have the following code: -(void)viewWillAppear:(BOOL)animated { UIDeviceOrientation orientation = [[UIDevice currentDevice] UIInterface]; if(orientation==UIDeviceOrientationLandscapeLeft || orientation==UIDeviceOrientationLandscapeRight) { NSLog(@"Device Landscape"); } else { NSLog(@"Device Portrai...

Create a mask from difference between two images (iPhone).

How can I detect the difference between 2 images, creating a mask of the area that's different in order to process the area that's common to both images (gaussian blur for example)? Also, some code of this procedure would be very much appreciated. EDIT: I'm using this code (from this answer) to get the RGBA value of pixels: + (NSAr...