ios

How would I reverse this equation?

I’m using this equation to convert steps to estimated calories lost. I now need to do the opposite and convert total calories to estimated steps. This is the equation I’m using for steps to calories: +(CGFloat) totalCalories:(NSUInteger)TotalStepsTaken weight:(CGFloat)PersonsWeight{ CGFloat TotalMinutesElapsed = (float)TotalStepsT...

Which event is called when I press on a part of the tab bar?

An example: Thanks in advance! Sagiftw ...

Is it still possible to develop for older iOS devices?

A few months ago I got an shocking email from Apple, telling that they will reject every app that is not built against iOS 4.x SDK. Now I wonder if: 1) is this a bad joke? 2) if not: does that mean that my app will only run on the very lates devices like iPhone4, iPod touch 4, or any device that has iOS 4.x installed? I downloaded the...

Get a list of all contacts on iOS

Hey I want to get a list of all contacts of an iPhone. I checked "Address Book" reference, I may missed something but I didn't see it provides a method to get a list of contacts. ...

How to get iDevices's Serial Number from NSURLRequest/NSURLConnections (which be sent by an iDevices) by PHP

I have an iOS app send an NSURLRequest/NSURLConnections to PHP Webserver. How can i detect iDevices's Serial Number which sent NSURLRequest/NSURLConnections to my PHP Webserver? Anybody can help me? :) ...

Can an universal application be rejected if it has no nib file?

hi i am creating an universal application(run on ipad and iphone).I want to know if i am not create nib file for iphone then is this possible that my application is rejected? ...

How to display NSTimer for a webrequest loading time in xcode?

i need to display a timer in the background for the webrequest loading time in the minutes:seconds format.When the webrequest is loaded successfully the timer has to stop.My code is here: @interface TimerWithWebrequestViewController : UIViewController { IBOutlet UIWebView *webView; IBOutlet UILabel *lbl; int mainInt; NST...

How to detect request come from what device using PHP?

I want to know a request which be sent to my PHP Webserver come from what device (iOS App, Web Browser...) and indentify of this device. Anybody can tell me to do it :) Thanks :) ...

How to use Client Certificate Authentication in iOS App.

I don't have a lot experience about Client Certificate Authentication. Anybody can tell me how to use it in iOS app? Thanks :) ...

Grab html code by entering username and password on a webpage on iPhone

Im trying to grab a HTML source code from a webpage which needs user to login with username and password, the code are all done in the back end, i can not use "?username=xx&pw=xxx" to get the html code. There are many apps that does this kind of things, such as getting usage from a phone provider or view bills. I would like to know how...

How do I convert a CGImage to CMSampleBufferRef?

Hello! I’d like to convert a CGImage to CMSampleBufferRef and append it to a AVAssetWriterInput using the appendSampleBuffer: method. I’ve managed to get the CMSampleBufferRef using the following code, but the appendSampleBuffer: simply returns NO when I supply the resulting CMSampleBufferRef. What am I doing wrong? - (void) appendCGIma...

How to make a tab bar application from scratch

How do you make a tab bar application from scratch, using Interface Builder? Is there a tutorial that shows how to do this? So far I've figured out that you need to start with a Windows-based application. Then do you open MainWindow.xib and add the tab bar controller there? ...

How to detect touches in status bar.

I have custom view in my application which can be scrolled by the user. This view, however, does not inherit from UIScrollView. Now I want the user to be able to scroll this view to the top, just as any other scrollable view allows. I figured that there is no direct way to do so. Google turned up one solution: http://cocoawithlove.com/2...

Make UIAlertView blocking

Hello, I need make UIAlertView blocking. Because i have function and i need to return UIAlertView choice. But problem is that after UIAlertView is shown my function code is executing further so i can't catch UIAlertView choice (i can do it in delegate methods, but i need to return function result). I tried to make UIAlertVIew blocking ...

UIWebView stringByEvaluatingJavaScriptFromString woes.

I have the following code in a view controller. "pageDisplay" is a UIWebView. When I run the app in simulator, the HTML page comes up as it appears before the JS runs. The element with id "myHeader", an <h1> tag, is unchanged. -(void) loadPageToView:(int)pageNumber{ NSString *path = [[NSBundle mainBundle] pathForResource:[NSString s...

sectionNameKeyPath through multiple relationships

Hello all, I am working on an app that uses Core Data and an NSFetchedResultsController. The model setup is like this: /-----------\ /-----------\ /-----------\ |Part | |Kit | |Source | |-----------| |-----------| |-----------| |name | |name | ...

iOS/iPhone SDK: initWithCoder and encodeWithCoder not being called

I'm trying to save an NSMutableArray called queueArray so it can be loaded again after the app has been quit. I used a few tutorials to get me going and this is the code I have come up with. The problem seems to be that "initWithCoder" and "encodeWithCoder" are not being called, shown by no NSLog calls and no stopping at breakpoints. ...

share my iphone app for testing

Hi, I'm writing a new iphone app and want to share it with a couple of friends for testing and general feedback and sign-off. Is there a way I can do that? They are located in a different state and they don't have a mac either. Any ideas on how I can go forward? Thanks, Kalyan ...

Iphone - Load image from camera roll to UIImageView without UIImagepicker

Hello. Is it possible to load the last photo from camera roll to UIImageView without using a UIImagepicker? I mean retrieve the path to the file or something like that. Thankz :D ...

iphone: coding a data compression or zipping agent ?

I'm creating a simple service for uploading photographs from an iphone to a web server. However, before the requests is sent, I want the app to compress the pictures (custom format or otherwise) in the background before sending it. Any pointers on how I could go about doing this? ...