iphone

retaining a list of all local push notifications in iOS 4

As part of an app I'm writing, it keeps a list of reminders and uses local notifications to display them at the required time. What I would like to determine is a list of these notifications so that I don't have to recreate the list upon each edit or new notification. Is there any documentation or examples/tutorials that demonstrate th...

GKSession won't send data to peers on second connection

I've got a peer to peer iPhone game working pretty well. I've created a table to display available peers and I can connect (so far) up to four devices and play a full round of a game from start to finish: But here's my problem... I create a GKSession on one device with GKSessionModeClient and the other with GKSessionModeServer. The c...

Can iPhone GPS give accurate speed for a running application?

I am considering building an iPhone GPS app to assist runners. It would need to get an accurate speed reading (within 1mph) every 10 seconds. Is the iPhone 3GS or the new iPhone 4 capable of giving a reading this accurate? ...

Whe webViewDidStartLoad was hit several times when loading one website?

Hi, I just found that when the WebView is loading www.abc.com, and webViewDidStartLoad were hit for several times. Why not only one? ...

using tableview for moving to a particular part of the page in uiwebview

hi, i have a uitableview which will load a uiwebview with a long page (static page inside the app). I want to know whether it is possible to move to the center of the page on clicking the cell in the uitableview. Something very similar to using hyperlinks to point to different location of same HTML page. ...

Sharing single class in all of ViewControllers and Views

I have 4-5 screen. created using UIViewControllers and many UIViews inside these viewcontrollers. I have a single class Properties. Every UIViewController and UIView needs it. Currently i am passing Properties into views and subviews and then back to parent views and so on. Is there any better option? Just initializing Properties at on...

Passing UIColor to a method and app crashing

see code, interface @interface ColorPreview : UIView { UIColor *backgroundColor; } @property (retain) UIColor *backgroundColor; -(void) reDrawPreviewWith:(UIColor *)bgColor; @end implementation @implementation ColorPreview @synthesize backgroundColor; - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:fr...

CABasicAnimation's call to drawInContext causes instance variables to reset to zero

This might be my lack of understanding of the call stack when using Core Animation, but something confuses me a little about who/what is calling drawInContext. Lets say I have @interface PlayerLayer : CALayer { int Foo; } and I initialize Foo in init to be something like -(void) init { if( self = [super init] ) { Foo =...

viewDidLoad & viewWillAppear conspiracy

I have a favorites plist file when I try to load it like this - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; NSString *path = [[NSBundle mainBundle] pathForResource:@"favorites" ofType:@"plist"]; NSMutableArray *array = [[NSMutableArray alloc] initWithContentsOfFile:path]; self.allFavorites = array; [array r...

What is a pool in in Foundation Kit?

Every time I write a new iPhone Application, I start with creating the Target, adding the frameworks, and writing this in a brand new main.m: NSAutoReleasePool *pool = [[NSAutoReleasePool alloc] init]; // etc... What is actually such a pool? What is it for? It surely doesn't protect the device when it falls in a swimming pool. But why...

web delegate problem

This use to work when i use in a viewbase app template But when i use a UITabBarNavigation with 2 views didn't work :S ?? -(void)viewDidLoad{ [self.infoweb loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.myserver.com/info.php"]]]; self.infoweb.delegate = self; } -(BOOL)infoweb:(UIWebView *)infoweb shoul...

UITable with UILabel or else ?

Following image is using UILable or else ? When I use UILabel , textcolor is black and text color is not change when I selected. So, I think, it's not UILabel. How to write like that ? Another question is how to write option table like following. ...

iphone facebook - how to share movie to wall using fbstreamdialog

Can some one suggest me a tutorial related to iphone code for sharing a mp4 file on facebook wall using Facebook API. I'm trying to use FBStreamDialog, but failed....... ...

iphone UIView subclass not initializing as requested

Hi I am new to objective-c and iPhone development but so far everything was going well til I tried to dig deeper (well not too deep). My problem is that I cannot initialize a specific UIView subclass with a specific coordinates for different orientations. The rotation is working great but the problem is when the app initializes. I was...

Accessing properties of object in an nsmutablearray iphone sdk

Hi all, In my aplication, I have an nsmutablearray which stores a number of types of objects. All these objects are having two similar properties: id, type. What I'm doing is I'm fetching the current working object in a 1-element array and accessing its properties id, type from within another class. This class is not aware which type o...

Move UIImage by touchmove in increment of 20 pixels X-coord or Y-coord.

Hi. I'm quite new to programming and i having a problem right now figuring out some methods on my program. anyways i cant figure out how to work out my touchmove event. I want to move a uiimage in x direction or y direction depending on the direction of the touchmove event but i want the movement to be in a grid type movement like by 20 ...

AudioQueue and iOS4?

The following code used to work for me in the past. I'm trying it now with iOS4 without luck. It is working in the simulator, but I don't hear anything on the device itself. I first try to record few samples into a NSMutableData variable, and then I try to play them back. I've tried the SpeakHere sample from Apple - which works (but it ...

How to make UITableView work within TTScrollView?

Hi there, I'm solving a problem how to make tableviews work within three20's TTScrollView. I have a project which I want to rebuild using three20 library. There is one module which allows user to flip through set of "pages", which contains table showing some list of data. My problem is that when I rebuilt this module to use three20's T...

How can I draw a series of lines using OpenGL ES on iPhone OS?

I have tried as follows (got through Google search)- static const GLfloat vertices[] = { 0.0, 0.0, 250.0, 280.0, 250.0, 280.0, 250.0, 500.0, 250.0, 500.0, 350.0, 500.0, 350.0, 500.0, 250.0, 280.0 }; static const GLubyte squareColors[] = { 255, 255, 255, 255, 255, 255, 255, 255 }; glD...

iPhone UI design...!!

Hi All, I have seen apps in App Store that have really attractive UI.When i make an app i use only the default set of control provided by Interface Builder and my app(even though good in functionality)does not have a UI that can attract people.Is there any ref or sample code that teaches us how to design good UIs for iPhone apps. Also...