iphone

NSFetchedResultsController on secondary UITableView - how to query data?

I am creating a core-data based Navigation iPhone app with multiple screens. Let's say it is a flash-card application. The data model is very simple, with only two entities: Language, and CardSet. There is a one-to-many relationship between the Language entity and the CardSet entities, so each Language may contain multiple CardSets. In o...

How to read file.xml from resources to NSString with format?

Actually I have such a code: NSString *path = [[NSBundle mainBundle] pathForResource: @"connect" ofType: @"xml"]; NSError *error = nil; NSString *data = [NSString stringWithContentsOfFile: path encoding: NSUTF8StringEncoding ...

iPhone SDK linking errors with static library

Hello all! I've built my own static library with components to be reused in my project, and recently had the need to update a bunch of classes. Specifically, some methods' signatures were changed due to the fact that some classes changed names. What happens now is that the library compiles fine on its own, but, when added to an app pro...

UITableView: Need a liveUpdate (Huge amount of cells)

Hey all, I have a UITableView which shows some information. The informations are from a XMLFile. The Xmlfile is pretty big, about 500 entries. I don't want that the user has to wait until the parsing has finished, i want to add cell by cell to the TableView. Here's my code: -(void) onFinishedPartDownload:(id)item { if(odvTableVie...

obj-c : iphone programming pickerview titleforrow method question

hi , i got a pickerView with 2 components, when i select for exemple the row 1 in the component 1 it will load an array list into the component 2. and if i select the row 2 in the component 1 it will load another array list in the component 2. It is possible? - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { re...

How to update Shark so that it shows the new edited source code?

I've tweaked my code in Xcode after Shark complained about some performance bottlenecks. However, Sharp seems to cache that code and keeps showing me old aged stuff. Even after several builds and re-tries. Probably I must activate some fancy function that says "never cache anything" like in web browsers? ...

from JS to iphone dev - what's the best language to start with?

I am a total beginner and would like to eventually learn to develop for the iphone. I have just done a beginner's CS course where the language we learned was JavaScript. We studied basic concepts like: variables, arrays, loops (for,while,if,if..else..), properties and functions. I'm wondering if I am starting in the right/wrong place b...

Core Audio on iPhone - any way to change the microphone gain (either for speakerphone mic or headphone mic)?

After much searching the answer seems to be no, but I thought I'd ask here before giving up. For a project I'm working on that includes recording sound, the input levels sound a little quiet both when the route is external mic + speaker and when it's headphone mic + headphones. Does anyone know definitively whether it is possible to pr...

iPhone Utility Application Convert to View Based Application

Hello everyone, I have a an utility application that was built for the iPhone SDK on Xcode. However, I need to incorporate the application code into my View Based Application. What I am trying to do is create a button on my View Based Application, that will initiate the code that was meant in the utility application. Somehow this all is...

EXC_BAD_ACCESS when calling avcodec_encode_video

I have an Objective-C class (although I don't believe this is anything Obj-C specific) that I am using to write a video out to disk from a series of CGImages. (The code I am using at the top to get the pixel data comes right from Apple: http://developer.apple.com/mac/library/qa/qa2007/qa1509.html). I successfully create the codec and con...

integrating camera and email

I want to develop an application that will automatically send an email as soon as an image is captured by the camera. can anybody suggest some ideas regarding this??? ...

Setting corelocation results to NSNumber object parameters

This is a weird one, y'all. - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { CLLocationCoordinate2D coordinate = newLocation.coordinate; self.mark.longitude = [NSNumber numberWithDouble:coordinate.longitude]; self.mark.latitude = [NSN...

NSString Backslash escaping

Hi, I am working on an iPhone OS application that sends an xml request to a webservice. In order to send the request, the xml is added to an NSString. When doing this I have experienced some trouble with quotation marks " and backslashes \ in the xml file, which have required escaping. Is there a complete list of characters that need to...

UIView shadow drawing wrong

Trying to draw a shadow using code from this question: http://stackoverflow.com/questions/805872/how-do-i-draw-a-shadow-under-a-uiview I implement it in a UIView subclass as discussed, but when I try and use it using UIView *shadow = [[ShadowView alloc]initWithFrame:CGRectMake(100,100,100,100)]; I get only a black square, rather than so...

Scroll immediately to row in table before view shows

A view with a table gets pushed onto the screen and I want it to scroll to a certain row in the table before the screen actually displays. I use this code within the final viewcontroller. NSIndexPath *scrollToPath = [NSIndexPath indexPathForRow:5 inSection:0]; [theTable scrollToRowAtIndexPath:scrollToPath atScrollPosition:UITableViewSc...

iPhone Simulator 3.x not listed after upgrading to XCode 3.2.3 Beta4 with OS 4.0

I've been having some problems, & since you guys are the smartest devs I thought I'd just ask you. When I last installed Xcode 3.2.3 Beta 2 (OS 4.0 support), it had all the iPhone Device & Simulator 3.x. Now, updated to Xcode 3.2.3 Beta 4 (OS 4.0 support), it no longer lists 3.x SDKs for either simulator or device in XCode. When I run ...

iPhone SDK - How is data shared in a universal app

Stack overflow I want to make a universal version of my app available, but I am wondering how is data managed between the iPad and the iPhone versions? -Are they completely independent? or if I have a plist in the iPad app, does it also appear in the iPhone app. If so, is there any syncing etc etc. I have a few months experience with ...

iPhone SDK moving a view and its subviews to back

I have an application with multiple views that contain subviews. I know that you can hide or make visible a view and its subviews by setting the hidden property to YES or NO. However with a number of views, to use the hidden property requires keeping track of what view is being displayed. I thought I could use sendSuBViewToBack: to hide ...

Why Is my UISlider Thumb Image Being Shown Multiple Times and Not Disappearing As They Should?

This slider is possessed: Whenever I enter "editing mode" for the tableview or leave "editing mode" a duplicate thumb image will appear where the thumb is. It is now behaving consistently in this way. If I switch back and forth from editing mode I'll get lots of thumb images like the screenshot shows. This is the code that I use to c...

UIButton not disabled when UITextField has focus

I have a UIButton - a submit button - that I set the enabled and disabled states and titles for. I use the submit button title to show status like @"Sending..." while my program is making an api call by disabling the button. It works fine until the edge case where someone enters a comment on a UITextField, but instead of dismissing the ...