iphone

Sending push notification to all clients?

Hi, i configured my app push notification enabled. should u collect the devicetoken id to my database? i dont send any particular message to some clients. i will inform all clients (push notification is accepted on device). should i save the devietokenid in didRegisterForRemoteNotificationsWithDeviceToken event? is it possible to send...

UIView Animation Misbehaves when iPad orientation is changed

I am using this code for UIView transition effect [UIView beginAnimations: nil context: nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationBeginsFromCurrentState:YES]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; [UIView commitAnimations]; Now the problem is that when i rotated...

[self navigationController] returning null inside tableview delegate

HI I am working on UITablview based project. i like to load a new view when ever a cell got click. i am using following code in didselectRowAtIndexPath delegate method. The below coding is not showing any error but new view not get load and [self navigationController] is returning null. inside Viewdidload function [self navigationcontr...

code or tutorial for how to make call from iphone application without quitting the application in iphone 4

Hi, How can i make a call from iphone application with out quitting the application in iphone 4? ...

How to make UITextView "Done" button resignFirstResponder?

I am trying to make my editable UITextView resign the keyboard (resignFirstResponder) when the user taps "Done." Using a UITextField, I have been able to do this with the following code: - (IBAction)doneEditing:(id)sender { [sender resignFirstResponder]; } ... and then to attach it to the relevant UITextField in Interface Builder ...

Getting a table to redraw

Hi guys, I have a view which is a big table. This table is populated from my array of data. This is all working well. The table drawing perfect. I pop up another small overlay view where you can set some filters. The filter does its thing and the array of data that gets changed and the array changes in size so that there is more or les...

Is there any way to create a UIButton which is not autoreleased, and still set it's UIButtonType?

UIButton has a single initializer buttonWithType. But this is a factory method and will create an autoreleased object. Of course we can do something like: UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(10, 10, 50, 30)]; But in this case i will not be able to set the button's type as buttonType is a read only property. ...

iPhone/iPad stretchy, resizable buttons - subclassing UIButton

I want to be able to make custom buttons which have an image background using a scale9 type background image meaning the width of the button can be dynamic. I have seen example on the web of people doing this on a per button basis but it seems to me that wouldn't it be better to create a new object which subclasses UIButton which you can...

UIWebView Youtube embed sound plays but no video shows in iOS 3.2 (iPad)

Hi I'm using a UIWebView to display YouTube videos. It works fine on iOS 4+ but doesn't work on the iPad (iOS 3.2). The UIWebView loads as expected and displays the thumbnail of the video. When I tap on the thumbnail I see a gray quicktime icon and can hear sound but no video appears. This is the code I'm using: UIWebView* webView = [...

Custom activity indicator popup

Hi, This may be a simple question but i would like some help to find out how to make it. I want to make a custom "loading" popup for my ipad app. Just like this app: http://www.youtube.com/watch?v=ZY31Bn5slv0 you see the black loading popup at +- 30sec,40sec,56sec,... I remember that i had a sample of this, but can't find it back. C...

How to add Primary Key from Existing table in SQLite?

Hi friends, Now i am working in SQLite database. I want to add primary key from my existing table. But i couldn't add the primary key in existing table and i have deleted all the records in the old table. So how can i add the primary key from existing table in SQLite? Here my query is, alter table studetails add constraint pk ...

ASIFormDataRequest .NET WebService

Hi! I have a form in my iPhone application which contains three textFields and a post-button, of course. I have built two WebMethods in a WebService, I have tried both from my local PC. They works perfectly. The methods are: TestAddData - no parameters AddObject(string name, string address, string phoneNumber) I know wond...

PDF calculate Glyph sizes

I (think) have every values for Text-Rendering in a PDF. * Position (Text Matrix) * FontDescriptor with Widths Array * FontBBox * StemV/StemH * FontName * Descent * Ascent * CapHeight * XHeight * ItalicAngle My problem is I don't know what to do with these values. I went through the PDF Spec 1.7 a couple of times and cannot find a for...

iPhone - detecting motion with gyroscope/accelerometer

Hey all, I'm trying to detect a swinging motion with an iPhone 4 using the gyro/accelerometer. I searched for some posts on SO about this, but couldn't find anything specific to my issues. Do I need to do any sort of calibration for data from the gyroscope/accelerometer? Anyone think of how I would measure a swinging motion? Thanks!...

NSString is not appearing properly

I have the following NSString: NSString* searchURL = [NSString stringWithFormat:@"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22%@%22)%0A%09%09&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env&callback=",symbol]; NSLog(@"URL IS: %@", searchURL...

Will this code leak memory?

I am calling in applicationDidFinishLaunching: [self performSelectorInBackground:@selector(performReachabilityCheck) withObject:nil]; Here is the performReachabilityCheck -(void)performReachabilityCheck{ internetReach = [[Reachability reachabilityForInternetConnection] retain]; [internetReach startNotifer]; [self updateInt...

l[20]ve: invalid chunk type?

Hi there I don't know why I'm getting this error. I'm also getting an EXC_BAD_ACCESS issue from the following code. Any ideas why? Running breakpoints on the didRecieveResponse and didRecieveData and didFinishLoading shows the first two get run and mid way through recieving data the program crashes. - (void)connection:(NSURLConnection...

Is it possible to have a self-updating iPhone application?

Is it possible to have a self-updating iPhone application? I believe the answer is no, but I am not sure. I have a database driven app that is in effect a catalogue of products. I want the database to be on the users iPhone so the catalog is fast to use. However, periodically the content in the database changes. I could create a push ...

iOS API detect wireless networks

Is there an API in CocoaTouch/iOS for detecting wireless networks? I want to write an app that saves a list of networks the phone can see at a given moment. ...

Deselecting the table view row when returning

I followed Luke Redpath's suggestion here - http://stackoverflow.com/questions/2803061/selected-uitableviewcell-staying-blue-when-selected - to deselect the row when returning to the original table view, but I can't get it working. In fact the method doesn't get triggered. - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:an...