iphone

NSMutableArray addObject: -[__NSArrayI addObject:]: unrecognized selector sent to instance

I have tried to initialize my NSMutableArray 100 ways from Sunday, and NOTHING is working for me. I tried setting it equal to a newly allocated and initialized NSMutableArray, just allocating, initializing the variable by itself, every combination I could think of and always the same result. Here's the code: Object.h NSMutableArray *a...

iPhone NSDateComponent wrong Date 1.1.2011 ?

I set a Date with 'DateFromComponents" and when I read it out... its wrong. I have to set the DAY to the 2nd or anything later so I get the right Year?!? I set year 2011 and when I read it out i get Year 2010 !! day = 1; month = 1; year = 2011; NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalen...

Ad hoc doesn't appear in iTunes

I've updated a 3.x app to sdk4. I have iOS4 installed on my phone. I drop the Ad Hoc version of the app into iTunes. It prompts to replace the provisioning profile and I click yes. Then I don't see the app in iTunes. I do have the iTunesArtwork file in the resources folder. Any ideas what I'm doing wrong? I'm running Xcode 3.2.3 ...

How do I get the cropping frame of the address book image data?

The AddressBook framework provides ABPersonCopyImageData for getting the contact image for each address book entry. This is great for the image data, but the user also sizes and crops the image for framing purposes. When I get the image data, I get the full image, and not the cropped image. How do I get the frame the user used to crop...

How do I make an array of SystemSoundID

I cannot seem to figure it out. I can play one sound with: - (void) initSounds { // Get the main bundle for the app CFBundleRef mainBundle; mainBundle = CFBundleGetMainBundle (); // Get the URL to the sound file to play soundFileURLRef = CFBundleCopyResourceURL (mainBundle,CFSTR ("1"),CFSTR ("wav"),NULL); // ...

How to add subview ontop of UITableView?

I have a UITableView that gets populated with data if there is a live network connection. When there is no connection I would like to add a view to the current view that will say No Internet Connection. Similar to the Photos app when there are no synced photos. I am not sure how I can accomplish this. ...

Writing to sqlite db using fmdb?

Ok so I understand that fmdb is totally outdated, and core data is where it's at, but for now, I just need to tweak an app I'm working on that uses fmdb to read from a sqlite db in the resources folder. I need to be able to write to my db. What is the best way to execute queries? I have tried doing the same thing that I do to read from...

Writing data in file

Hi, I do a iphone apps and I try to write in a file like this: data = [NSMutableData dataWithBytes:LogString length:[LogString length]]; file = [NSFileHandle fileHandleForUpdatingAtPath:filePath]; [file seekToEndOfFile]; [file writeData: data]; [file closeFile]; But the problem is that if I try to write the string "awf", the content o...

Calling pushViewController on a UINavigationController does nothing (no crash)

I have a UINavigationController as one of the views inside a tab bar control. It looks fine, and I have a UIBarButtonItem that is supposed to load a subview. I have the button wired up to an IBAction that calls pushViewController but when I do this nothing happens. It doesn't crash or anything.. it just doesn't do anything. I've tried: u...

Access Camera through iPhone Web App

Hi, I understand that it is not quite possible to access webcam through HTML. So how about on the iPhone? Is it possible? ...

adding background image to the nnavigation rootview

how to add image as background to my rootview in navigation controller programmatically... thanks for that answer for navigation bar hide,.... ...

Force the iPhone to simulate doing CPU-intensive tasks?

For a normal app, you'd never want to do this. But ... I'm making an educational app to show people exactly what happens with the different threading models on different iPhone hardware and OS level. OS 4 has radically changed the different models (IME: lots of existing code DOES NOT WORK when run on OS 4). I'm writing an interactive t...

Maintain aspect ratio when converting video? - ffmpeg

Hi folks, I'm trying to convert movies from .avi to an iphone readable format wherever I look, people suggest the following options for ffmpeg ffmpeg -s 320x240 -aspect 320:240 [...] This does not bode well for videos with a different aspect ratio! How can I keep the aspect ratio from changing? Is there a way to set the size dy...

retrieving grey color value of UIImage with colorSpace CGColorSpaceCreateDeviceGray

Hi, I have an UIImage with colorSpace CGColorSpaceCreateDeviceGray. Can anybody tell me, how I can access the grey color value for a specific x and y position. br, martin ...

cannot find Array Controller in Interface Builder

Hello, I'm just starting to use core data in my iphone app. I have created my Entity (measure) with 2 property (date, value). According to the tutos I'm reading, I then need to create an Array Controller in Interface Builder. The thing is... I cannot find it in IB. Is there something to configure to have this type of controller in the li...

UIWebView font is thinner in portrait than landscape

My app contains a UIWebView. When the app rotates from portrait to landscape or back, the font weight appears to slightly change. Both bold text and regular text get slightly bolder in landscape, and slightly thinner in portrait. This does not appear to be the case in Safari, only in my app. Here is an example image, taken as a screensh...

How do some AppStore browser apps implement features such as "Open in new tab" menu, loading progress, etc?

Hi, There are web browser apps in the store which do many things that seem like they use private API calls to me. Things such as: Override the context menu for a link to add a menu item for "Open in new tab" (http://stackoverflow.com/questions/2078039/how-to-add-an-option-to-the-popup-actionsheet-of-iphone-safari) Reporting loading pr...

NSTimer problem

So I am trying to set up a basic timer but I am failing miserably. Basically all I want is to start a 60 second timer when the user clicks a button, and to update a label with the time remaining(like a countdown). I created my label and button and connected them in IB. Next I created a IBAction for the button. Now when I tried to update ...

NSMutableArray object thinks it is an NSArray :(

So I have a property NSMutableArray *grades. At the only place where I set this property, I am doing this: NSMutableArray *array = [[NSMutableArray alloc] init]; self.grades = array; [array release]; [self.grades addObject:@"20"]; The last statement generates an exception: -[NSCFArray insertObject:atIndex:]: mutating method sent ...

moving table view in navigation controller programatically

i have a table view in my root view of navigation controller.. if iam hiding my navigation bar my table view gets moving top but i want to fix that position to old posotion or it should be fixed from beging... i have try with creating frame and moving but that does not solve my purpose... ...