cocoa-touch

What is the fastest way to generate a new UIImage from transforms applied to an existing UIImage?

I am attempting to take an image captured from the rear camera, apply a scaling transformation to it and then output a new image with the same size of the original but scaled up. What I have below works ... BUT it is slow (especially the code in between the UIGraphicsBeginImageContext(size); and UIGraphicsEndImageContext();) Is there a...

initWithNibName is not getting called

I need to put it some custom logic into my iPhone app so that depending on what iOS version you are running, choose a different XIB file (i.e. iPhone or iPad will show different XIB files). I had built the whole iPhone app from day one and its all good, using a tabbarcontroller and the standard navigation controllers in each tab. So I ...

NSFileHandle fileHandleForWritingAtPath: return null!!

Hi, my iPad app has a small download facility, for which I want to append the data using an NSFileHandle. The problem is the creation call only returns null file handles. What could be the problem? Here is the three lines of code that are supposed to create my file handle: NSString *applicationDocumentsDirectory = [NSSearchPathForDirec...

iPhone Cocoa Touch: Adding additional view or sub view to views.

Dear All, From What I understand based on what I read, most of the time we will be dealing with view when creating apps for the iPhone. Adding sub view to table view, adding table view to a UIView....etc So my question is how do I go about mix and match all the views? Let say I start off by using a template in Xcode (Tab Bar Applicatio...

Export SMS from Iphone in a Data/file format and Import that file data into another format

Hi All I want to take backup of sms from Iphone using cocoa touch(Iphone App) in a file format and then import that file to other iphone How we take backup of all sms using cocoa touch Thanks Amit Battan ...

Why is the rowHeight datasource method not being called.

It is my fervent dream to have a UITableView with different row sizes, determined programmatically. I have read the UITableViewDataSource documentation, and I implement these methods: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; - (NSInteger)tableView:(UITableView *)table numberOfRowsIn...

how can i process the ipod library audio file raw data while it playing

After i get the audio file's URL in ipod library with the MPMediaPickerController. Now the question is i want process the file's raw data before it's played. what shoud i do ?? N.B. In the MPMediaPickerController Reference have a fowllow addtion explain. The URL has the custom scheme of ipod-library. For example, a URL might look like ...

UILocalNotification on Fri and Sat

How do you set a UILocalNotification to fire every Fri and Sat at 8pm? Thanks ...

show default calendar in my app

Hi, is there an way to push the default calendar of the iPhone on one of my views (= can I call the default calendar to show up)? Than I could use the Event Kit Framework to add some events. Cheers ...

Touch Duration in UITableviewCell

Hi all, Is there a way to get the touch duration of a UITableViewCell without subclassing? The reason being I want to display a modal view controller when the user holds a cell and display a detail view when the user taps a cell. I already have a working app using default UITableViewCells (but recently found a need for the hold event) w...

Need help fast -- CoreData error

Hello, need help desperately ahead of a demo in a few hours... App was working on my test device fine last night. Added some data (as I always do) this morning and now I get this error during a save operation: Serious application error. Exception was caught during Core Data change processing: *** -[NSCFDictionary setObjec...

Measuring NSString lines, words, etc

Hi, I am trying to calculate the closest text position in a string (text of UITextView) from a CGPoint. I wonder if some methods in NSString are useful for this? I would appreciate a good explanation of the following methods. Because I think they are useful here. I read the docs but I don't really understand what they do ;( NSString i...

EXC_BAD_ACCESS when scrolling TableView

Hi, In my program I'm creating a couple of custom UIViewCells loaded from a nib file: [[NSBundle mainBundle] loadNibNamed:@"CustomCells" owner:self options:nil]; Once they're loaded i set them up and return from the function: if (indexpath.row == 1) { [nibTextInputer setupWithName:@"notes" ...]; return nibTextInputer; } else ...

Adjust UIPopoverController position after resize

I have a UIPopoverController containing a UITableView. The popover is resized in its view controller's -viewDidAppear function to fit the contents of the table. While the popover resizes properly, its arrow is usually no longer pointing at the original CGRect. Is there a way to force the popover to reposition itself after a resize so ...

Cocoa Touch - Custom UILabel

I am trying to create a custom UILabel which sets the background colour to clearColor (with added functionality further down the line). This way, I don't have to specify the exact properties for each label as they will be inherent in every instance of the label. I have tried several variations on a them but with no success, what am I do...

Sync Random Number Generators On Two Machines

Is it possible to "synchronize" (for lack of a better word) random number generators on two different machines? Context: I have a card game for iOS with network multiplayer. Both peers need to be able to access the card deck. When the deck gets shuffled, I can serialize my card deck object with NSCoding and ship it over to the other pee...

memory management with outlets and properties in view controllers

Hey guys, sorry for beating the memory management (dead)horse again. I know this question has been asked several times on SO, but I feel all the threads out there is still lacking two pieces of information. Let me put forth what I DO know to save everyone some time. 1) When you create an IBOutlet, your view controller automatically reta...

How can I create my own methods which take a block as an argument and which I can call later?

How can I create my own methods which take a block as an argument and which I can call later? I have tried following things. #import <UIKit/UIKit.h> typedef void (^viewCreator)(void); @interface blocks2ViewController : UIViewController { } -(void)createButtonUsingBlocks:(viewCreator *)block; @end - (void)viewDidLoad { [super view...

Unable to get SQLite for iPhone to use the database file which I supply and instead it creates a new one under Macintosh HD.

I am creating a SQLite3 database project in Xcode for Iphone. I am using the Simulator 3.1.2. Although I have attached the database file in the Resources group of the project and passing the name alright in the Appdelegate file and also creating a local editable copy using: // Copy the database from the package to the user's filesystem...

Unhide the keyboard in iphone

Hi In my application what is want is when user clicks on button next view is pushed and default keyboard should be open in the pushed view . Thanks in advance ...