objective-c

Save a text file in the Media folder of the IPhone.

Hey , I created a text file and I want save in the media folder not in the root folder. How I can do this? ...

what do the square brackets next to an NSDecimal object mean?

Im using core-plot for my graphing component of my iPhone app, and I have been using NSDecimal object a lot. One of the lines of their code that I have seen is like this: -(void)plotPoint:(NSDecimal *)plotPoint forPlotAreaViewPoint:(CGPoint)point { NSDecimal x; //do some calculations on x plotPoint[CPCoordinateX] = x; } W...

objective C on how to make connection of two .xib file

I have been wrote for two interface of .xib file. How to make connection between these two files? When I run the file, the first .xib will appear then after i click the button, the second .xib file will appear and on the top of first .xib file. Thus, i want use the second .xib function to make control of the first .xib file. Thus, there ...

Core Data, MOCs, and multi-threading

A conceptual question: I have data stored hierarchically via Core Data SQLite for an iPhone app. I wish both to draw AND to perform calculations based upon properties of each object in the entire hierarchical arrangement of objects. Both drawing and calculating tasks access the same exact properties. Simple enough. However, I anticipate...

cannot display the navigation title in the table on iPhone application

Hi, everyone, I want to ask a question about the iPhone application. I write a program which will display a table. However, I don't know why I cannot display the navigation title in the table. The following is my code // code - (void)viewDidLoad { [super viewDidLoad]; // control flow, call another user define function and ad...

How can I measure the level of ambient light from an image?

I am looking at making an app that uses a camera to measure the amount of light present when an image is taken. Some conditional behavior would take place based on how much light was present - ie display a message saying "Looks like bedtime" if it looks like it is dark. I understand that this will be a pretty poor measure of the actual ...

Keeping keyboard visible while scrolling through searchable UITableView

Hi, I have a search bar that filters through contacts in a plist. The entries that match are listed in a table view in between the search bar and keyboard. When a user scrolls through the matches, the keyboard disappears leaving only the table view and search bar visible. How can I set up the keyboard so that it remains visible while a ...

MKCircleview Radius

i have a MKmapview with two circles. MKCircleView is using for one circle and MKOverlayView for other circle. In MKOverlayView, CGContextAddArc is using for drawing circle. Both circle having same radius ie: 1000, but the circles showing different radius in MKMapview that means MKOverlayView circle is smaller than MKCircleView circle. Wh...

Objective-C : Just another retain count question

When I create a NSString with initWithFormat , I get an retain count of 1 -(NSString *)description { NSString *descr = [[NSString alloc] initWithFormat:@"I am the description."]; NSLog(@"Count: %lu",[descr retainCount]); return [descr autorelease]; } If I use initWithString instead I get a count of 2147483647 NSString *descr = ...

How to use the 'setMyViewController' in iPhone'?

Hi, everyone, I want to ask a question about the iPhone application. In my program, there are several controller class. However, I dont' know how to handle them and switch the control right between different view controller classes. I read some code from the apple website. Can anyone explain to me? Thank you very much. // I create a v...

IKImageBrowserView appears to not bind properly

Hello, my question relates to Interface Builder and an IKImageBrowserView not implementing bindings as I would expect. I have a fairly long key path to get to an NSArrayController, the contents of which I want to display in the IKImageBrowserView. This is the key path I am binding an NSTextField's Display Pattern binding to: currentOrd...

How to parse PDF in Objective C for iPad

Hi Folks, I am stack with parsing a PDF file. Please guide me how to do this. Header file. //PDFViewer.h @interface PDFViewer : UIView { CGPDFDocumentRef pdf; } -(void)drawInContext:(CGContextRef)context; @end Implementation file //PDFViewer.m @implementation PDFViewer - (id)initWithFrame:(CGRect)frame { if ((self = [super...

In App Tutorial for iPhone

Hello, guys. Do you know some resource (url, pdf, ...) that can help me to do a in app tutorial? Let me explain better: the first time that the user uses my iPhone app, I want to put bubble messages pointing/describing each part of the interface. The problem is that I don't know where to start. :D Any help will be appreciated. Thanks...

UIPageControl is not Displayed

Hi, I use the following to display scrollview and pagecontrol scrollView=[[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 179)]; pageControl=[[UIPageControl alloc] initWithFrame:CGRectMake(0, 179, 320, 20)]; scrollView.delegate = self; [scrollView setBackgroundColor:[UIColor blackColor]]; [scrollView setCanCanc...

UITableView No Data Screen

My UITableView get data off the internet. Sometimes it doesn't receive any (cell) data. It just shows a blank table. How can I show a message/cell to the user that no data records have been found? ...

Objective C Callbacks and Notifications

I'm new to Objective-C and not a full time programmer. I'm beginning to understand the Model-View-Controller design pattern for differentiating the UI from the model. So the user takes an action and the view controller sends a message to the delegate (model). But I'm not sure what the best way to send actions from the delegate back to th...

set ipad app background programmatically?

Does anyone know how I can set the background of my webView to the textured background that came with the iPad SDK programatically? ...

Why do I have a memory leak here?

Hi, I do not understand why Instruments/Leaks tells me that there is a memory leak in my viewDidLoad. I do release both objects in dealoc and set them to nil in viewDidUnload. Can someone give me a clue here? Link to screen-dump from Instruments: http://i26.tinypic.com/28227iw.png BR //Christoffer ...

sqlite3_prepare_v2 problem

Hello, I'm getting the following error: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* +[NSString stringWithUTF8String:]: NULL cString' on the line of code below: NSString *aName = [NSString stringWithUTF8String(char*)sqlite3_column_text(compiledStatement, 1)]; I'm not sure whats going on here,...

detect movements of objects on iphone by blowing air

hi all. I was just finding something on web I come to know that we can provide movements to different objects by blowing air on iphone from mouth. I tried but could not get how to do such things. so do any one know that how to move objects by blowing air from mouth. If any one do have any idea please tell me. If I am now wrong then...