iphone

UIDatePicker: time mode: initialize the time (gotta be simple)

All, This seems like such a simple thing, but I cannot find* the right method to create a UIDatePicker, in time mode, and have it initialized to a specific time. I don't want date -- just time (think alarm clock). I have created a NSDate object: NSDate * date = [[NSDate alloc] initWithTimeIntervalSinceReferenceDate: (NSTimeInterval) ...

iPhone - View like SMS Contacts view

I'm trying to implement a view similar to contacts view in iPhone Message (SMS) app. When composing a message on iPhone, there will be "+" button to add contacts. On click of "+", it will show list of contacts and just by selecting a contact, it will add the contact name in "To" text field. I found following code to show contacts. But o...

-[UIWindow addEventMonitor:] crash on Iphone 3.1.3

Hi all, This is the crash I am gettin gwhile playing a video on 3.1.3. It works fine on 4.0. * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[UIWindow addEventMonitor:]: unrecognized selector sent to instance 0x127500' any answers would be ver helpful. Thanks, ...

Help on creating a Custom View

Hi, I am planning to write a custom view that will render some stuff using Quartz. After looking into some sample code in apple site, I decided to subclassing UIView to create my own view: @interface myView : UIView { } @end Now my question is, what would be the best way t bind my view with the viewController? While loading from NIB...

Getting UIView Type

I keep seeing examples that manually iterate through all of the subviews of a certain type in a UIView. For example, if you want a click outside of a keyboard to dismiss the keyboard regardless of which field is active, you might: -(IBAction)backgroundClick:(id)sender { [myTextField resignFirstResponder]; [myOtherTextField resi...

In-App Purchase using paypodd-iphone

Hi, I'm new to iphone development.Plz explain what is paypodd?and the purpose of paypodd? I want to prepare a application for in-app purchase.I red in stackoverflow that prepare an app using paypal means the apple going to reject the application.Then how can i do the payment transaction for selling the application within the another ap...

Loading animation for iphone OS 4

i just converted my old app(2.1.3) into new app(4.0).I got some error in loading animation. Can any one have the code which works on iphone OS 4.0? ...

creating CCTMXLayer dynamically

Hello everyone, I try to create my own tile map dynamically such as some buildings created with the help of database. I try to use CCSprite on object layers. However, when i scroll the map, also CCSprites' move too. I don't want to move all of the Sprites whenever player scrolls the map. (For performance issues) Then, I decided to creat...

How to access public instance variable in Objective C ??

I am having following condition: @interface MyClass:NSObject @public NSString *str; @end @implementation -(id)init{ } @end Now i want to access str variable outside MyClass in Other Class, (1) Using MyClass Object (2) without using MyClass Object, How can i achieve that ?? ...

How to control Network Activity Indicator on iPhone

I know that in order to show/hide the throbber on the status bar I can use [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; But my program sends comm requests from many threads, and I need a location to control whether the throbber should b...

Where can I find an efficient R-Tree implementation?

I'm looking for an R-Tree implementation, in C, Objective-c and even C++, which shall be efficient for searching the 2d rectangle in which a point falls ( memory efficiency would also be great, but I can sacrifice a bit more memory for time even while I am on an iPhone ). A good documentation will be appreciated too ...

NSMutableURLRequest setHTTPBody: crash.

Hello. I'm trying to send some data to a PHP script online to submit online scores for my iOS application. The script will require account credentials formatted with the proper escape characters for a HTTP request. It's the setHTTPBody method which cashes the application: [text_field removeFromSuperview]; text_field.tex...

Adding an UIImage to a UITableViewCell for "State Touched"

What's the best way of adding an image for the touch state in a UITableViewCell? I know how to set the cell.selectionStyle but I actually need to add an image (a different one for each row) just when the user is touching it (and it pushes the new view in) Like a "Button State Touched". What's the best way of achieving this? I tried wit...

Filtering UITableViewCells with animation - iPhone Development

This seems simple enough but as yet I am unable to find a solution. Basically I have a segmented control with two options. The first is the default (and is automatically displayed on load) and when selected displays all rows in a table view. The second is a filter limiting the rows displayed. This is the exact same set-up as used on the...

iPhone direction/compass not detectable

Hey, I'm having a hard time figuring out what I'm doing wrong. I want do read the direction my iPhone is facing to. Here's my code: self.man = [[CLLocationManager alloc] init] ; self.man.delegate = self; self.man.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; self.man.headingFilter = kCLHeadingFilterNone; if([self.man headingA...

Using UIWebView to create hyperlinks in UITableView Footer

Hey friends, I am trying to create a UIWebView in UITableView footer. The table is grouped. Actually I am trying to create a hyperlink using UIWebView. For example there should be some text like Hey folks Contact me Contact me should be a hyperlink and I want to place this text in UITableView footer. I am unable to figure out how to...

facebook-ios-sdk requestWithGraphPath:@"me/friends"

i can't find any basic documentation on this sdk (am i just being stupid or looking in the wrong place?). i can't work out what this method: - (void)request:(FBRequest*)request didLoad:(id)result actually returns in the case of a request like this: requestWithGraphPath:@"me/friends" or this: requestWithGraphPath:@"me" result see...

Seeing malloc allocating large chunks of memory - trying to track down why (iPhone)

I'm seeing my app being killed by iOS with an out of memory message, however, while tracing the progress of the app in the Allocations Instrument, I see lots of mallocs that seem to be occurring outside of the code I've written. I'm not seeing any leaks being caught, so I assume these allocations are supposed to be there. Thing is, beca...

iPad Modal view not rotating

hey there stackoverflow, So I have a modal view displaying in my app that has a little info for the user to fill out. The problem is that when the device is rotated, some animation occurs, but only in the frame. The form itself does not rotate. All the autorotate options are set to YES. I am displaying it when the user clicks on a f...

Encoding custom classes using yajl-objc

Summary. Based on some benchmarks, I chose yajl-objc for my iPhone JSON parser. I was testing it with an arbitrary custom class (one NSNumber and two NSString properties). If I created an NSDictionary with key-value pairs matching the class properties, I could encode the dictionary with [dictionary yajl_JSON]. When I tried directly encod...