iphone

Is it possible to access a UITableView's ScrollView In Code From A Nib?

Right now I am creating a UITableView in a FlipsideView nib. I don't seem to be able to change the background of the table view from within interface builder. I can fix this by creating an outlet and then setting the background. However, I want to give the scroll view rounded corners in order to create a look similar to the iPhone wea...

What is the state of non-Objective-C programming for iPhone?

After spending three weeks learning Objective-C and Cocoa programming for my work, I've been tasked with researching alternatives to it for iPhone development. I know of two existing alternatives, and one future possibility. C# MonoTouch is a C#.NET implementation with bindings for iPhone specific functionality such as touch screen a...

Resize UIImage with aspect ratio?

I'm using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:kCGBlendModePlusDarker alpha:1]; UIImage *tmpValue = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); Which is working g...

iPhone application lags after launching and dismissing MFMailComposeViewController

Hello, I have an application that uses a table view controller to display some items, after clicking on one of those items you may select to email this item. Once that happens I use the code provided by apple "MailComposer", and send the mail. However after this the scrolling in the table view is not as smooth as before. I checked wit...

Programmatically attaching event handlers

So, I'm trying to programmatically attach event handlers to widgets I've placed on my iphone application using: addTarget:action:forControlEvents I have added a UISegmentedControl in Interface Builder which is exposed through @property seg and in loadView, I have: - (void)loadView { [ super loadView ] ; //k after that attach o...

UITableView shows some gapped cells

Hi folks, During my iPhone app development, I saw this curious UITableView behavior which can be seen into this posted image: http://img690.imageshack.us/i/screenone.png/ It happens after adding more cells to the table by touching in a "More" cell button at the end. I can't figure out if the problem is the table data source or not? C...

Toolbar items in sub-nib

This question has probably been asked before, but my google-fu must be inferior to everybody else's, cause I can't figure this out. I'm playing around with the iPhone SDK, and I'm building a concept app I've been thinking about. If we have a look at the skeleton generated with a navigation based app, the MainWindow.xib contains a naviga...

iPhone: Draw rotated text?

I want to draw some text in a view, rotated 90°. I'm pretty new to iPhone development, and poking around the web reveals a number of different solutions. I've tried a few and usually end up with my text getting clipped. What's going on here? I am drawing in a fairly small space (a table view cell), but there has to be a "right" way to d...

Is there a bulk update operation for all entities in Core Data?

On the iPhone, Does Core Data have a way to bulk update a field for every instance of an entity that it's storing? Something like update some_entities set some_count = 0 where some_count > 0 Or do I just have to instantiate every entity, set the value, then save it? (And if that's the answer, how could I do that in a single transacti...

initWithNibName VS NSBundle's loadViewNamed

I've noticed that there are two different ways to load nib files: 1) via the UIView's initWithNibName:bundle: method and 2) NSBundle's loadNibNamed:owner:options: method. Can someone explain the differences between these two and when it is more appropriate to use one over the other and in what circumstances? For instance, if I'm loading...

iPhone UIImage overlap render bug.

I've come across a strange render bug on iPhone OS 3.0... I have two images. One is a non-transparent PNG that is predominately black with a white gradient fading upward. The second is a transparent PNG with translucent clouds. When I overlay the two using UIImageView, the intersection of the clouds and white gradient triggers a rende...

[iphone] MPMoviePlayerController stopped resizing

I've run into a strange behavior with MPMoviePlayerController recently (shock!) The controls to change the movie scaling - double-tapping the movie, or the movie scaling button in the top right corner - have stopped working at some point during development. The movie scaling simply doesn't change now. I can't pinpoint exactly when it s...

iPhone Music Library Access

Hello! I would like to develope an application for iPhone that classifies the user's music according to user-defined genres. The application should be able to have access to iPhone's Music Library and work on the files, this is, fetching an mp3 file, apply some DSP ( like MFCC coefficients ) and then save the results on the file itself. ...

What is the right choice between NSDecimal, NSDecimalNumber, CFNumber ?

I've read a lot about NSDecimal, NSNumber, NSNumberDecimal, CFNumber... and it begins to be a kind of jungle to me. Basically, I'm trying to create a simple model class that will handle simple computations, like this one: #import <Foundation/Foundation.h> @interface Test : NSObject { float rate; float amount; int duration...

Can you trigger functions on the iPhone when the user adjusts the ringer volume?

I would like to bring up the Camera in my app, and let the user take a photo by pressing the hardware volume buttons on the phone. Is this possible? Can I trigger a function when the users changes the volume, and can I then programatically trigger the camera in this function? A link or code snippet would be much appreciated. ...

NSNumber, Setting and Retrieving

Hey, I'm messing around with NSNumber for an iPhone app, and seeing what I can do with it. For most of my variables, I simple store them as "int" or "float" or whatnot. However, when I have to pass an object (Such as in a Dictionary) then I need them as an Object. I use NSNUmber. This is how I initialize the object. NSNumber *testN...

UITextview content moves up when textview is selected.

I am pretty new to this iPhone dev thing but so far I have built a pretty good app but I have stumbled into this problem that for the life of me I cannot seem to solve. Basically the app is a chat application for social site. Everything is working 100% except the input box which currently is a UITextbox. This works fine however I would ...

sqlite writing a date into an email

Hi, I am exporting a date value from sqlite and placing it into an email. The date appears like this 279498721.322872 I am using Objective C in an Iphone App. Does anyone know how to make this export out as a regular date whether it is all number like 2009-02-10 or anything legible? ...

Storing ints in a Dictionary

As I understand, in Objective-C you can only put Objects into dictionaries. So if I was to create a dictionary, it would have to have all objects. This means I need to put my ints in as NSNumber, right? SOo... NSNumber *testNum = [NSNumber numberWithInt:varMoney]; NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] i...

iPhone sdk: location aware app design

Location aware app design I am trying to design and app which does following flow: 1. App starts 2. User can do many different tasks (encapsulated in various view controllers), one of task adds a record to the db 3. I want newly added record in DB contain lat/long for the current location The problem is that current location may not...