iphone

How can I set the scrolling position of an UIScrollView?

I've seen the setContentOffset:animated: method. Is that going to scroll to a specific position, or what does that "offset" mean? ...

socketpair() does not seem to be working when iPhone goes to sleep mode

Hello, I am developing an iPhone application where I use socketpair() as a means of communications between different modules of the application. It works fine as long as the iPhone is active. Once it goes to sleep, after few minutes (say 10 mins) the data that arrives at one end of the socketpair does not seem to be delivered to the oth...

Why does my -scrollViewWillBeginDragging method of my UIScrollView delegate return such a strange contentOffset value?

PROBLEM SOLVED! STUPID TYPO IN MY CODE! That's my method of my UIScrollView delegate: - (void)scrollViewWillBeginDragging:(UIScrollView *)activeScrollView { NSLog(@"contentOffset: %f", activeScrollView.contentOffset); } Output in console is like: 2009-05-06 23:04:45.731 Demo[4851:20b] contentOffset: 21080643979530096233938944.00...

HTTP Authentication Headers for IIS windows authentication

Hi All, I have a web site hosted on IIS with windows authentication. I am trying to access it in one of my iPhone web application. Presently i am using this code, but it is not working. NSString *authString = [[[NSString stringWithFormat:@"%@:%@", @"myusername", @"mypassword"]dataUsingEncoding:NSUTF8StringEncoding] base64Encoding]; a...

iPhone application keyboard

Hi All, I want to add buttons like previous, next, done, Go when I am filling out some text fields in my iPhone application. Could you let me know how can I do that? Thanks. ...

How do I make an element scale down to nothing using a CSS transition on the iPhone?

I’m trying to use the proprietary iPhone Safari properties -webkit-transition and -webkit-transform to make an element disappear with a graceful animation. Code: <div id="right" style="font-size: 500%; text-align: center; background-color: #fdf; -webkit-transition-property: -webkit-transform; -webkit-transition-duration: 1s;">3</div> <...

Alternative for recursively making recurisve calculations in sqlite?

I am currently working on a project for the iPhone that requires accessing a large amount of hierarchical data stored in a local sqlite database. One of the more common operations is calculating a rollup status field. Right now, I'm doing that by recursing through all the descendants of that item (which can be anywhere from 1 to n levels...

Reinitialize a view controller - iPhone

I have a multi view application with individual UIViewControllers and xibs. I have one view that is the game view and every time I call it I want it to re-initialize, by that I mean restart at it's initial condition and not in the state I last left it in. Here is the code block I am using to load and remove views: -(void)loadStartVi...

Problem with NSString and NSMutableURLRequest

I am having issues with adding a header to NSMutableURlRequest, the problem is that when I add the header below "Authorization" it does not show up. However if I replace my instance variable "auth" below with a static string exp (@"asdadsadsadga") it the "Authorization" header will show up. I am pretty lost at this point. NSURL *url = [...

tagging photos in facebook-connect within iphone app

hello stacks! Im adding a fbConnect feature in my iphone app. Was wondering if there is a way to tag photos (names, i.e. John Smith) in the fbConnect api? all the best! ...

Mistake or confusion in Apple SDK documentation on NSURLConnection?

Hi everybody, I have recently been learning the Apple SDK (for iPhone, etc) and came across something I can't understand. In the docs for "Using NSURLConnection" from http://developer.apple.com/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html I found a strange piece of explanation and example code. Firs...

Problem with retreiving Array data stored in plist File

Hi, I have a problem, how can we retrieve the array data stored in plist file. The plist file and source code is as shown below, ------------------------plist File------------------------- <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;...

Get keyboard input without a text field/view

I'm making an iPhone application that has my own custom text view that can display multi-formatted text and I need to interact with the keyboard somehow. Right now I am using a hidden UITextField and the delegate method textField:shouldChangeCharactersInRange:replacementString: to get the typed characters. However this feels kludgy and I...

Are ViewControllers in Mainwindow.xib always loaded by default on launch ?

I am new to Iphone development and try to grasp the idea of ViewControllers. I have a XIB file MainWindow.xib... inside I have a viewcontroller and a view. I see that everytime my app launches, the ViewDidLoad gets called (I have NSLog Statements that fire in that function). What if I want to delay load that view controller in the XIB...

Programmatically Lock and unlock Screen of iPhone .

Hello Everyone. Hope you all are fine and of course are in your best of mood today. one question Ping my mind everyday I start my work with SDK and iPhone. Question is.... "How do i Programmatically lock and unlock main screen of an iPhone" mean by i want to Lock and unlock device not an application. since i newbie in iPhone, i don't...

iPhone No Saved Photo Album created on iPhone

Hi, I am using iPhone 2.0 SDK. I used the API UIImageWriteToSavedPhotosAlbum to save an image. A Saved Photos album gets created on the iPhone Simulator when I save an image but tested on the device the image gets added in the Camera Roll album. While debugging, no errors occur but the Saved Photos album is not created on the device. ...

How to detect iphone is on silent mode.

I am developing one application. In that I want to detect through coding that "is iphone on silent mode or not?". I am developing it by using cocoa with objective-c. If anyone knows it kindly reply. ...

Iphone Development: How bad is

Dear All, being a relative freshman in Cocoa development (I'm currently working on an iPhone app), I was wondering if an "Illegal Geometry" as reported by Interface Builder is actually harmful, or in any way hampering the functionality or performance of my application. I really try to avoid overlapping siblings as much as possible, but s...

UITabBarController is possible to select the tab via code?

is it UITabBarController possible to select the tab in code?like UINavigationController we can use popViewController pop back to rootViewController instead of press the back button, so how can this implement in tabbarcontroller? ...

Showing a alertview with a textbox in iPhone

Is it possible to show an alertview with a textbox inside like the AppStore app. It asks for password in such a dialog. I've seen atleast a couple of other third party apps using it. Is it a private API? ...