- Joined
- Jun 3, 2011
- Messages
- 54
- Reaction score
- 0
- Points
- 6
Dear All!
In my very first iPhone App< i am trying to create one button(through code and not using IB) and then clicking that button, will read some file (file name is hard coded in the program) from local machine and will display the content on the iPhone.
I created button as:
- (void)loadView
{
UIView *contentView = [[UIView alloc] initWithFrame[UIScreen mainScreen] applicationFrame]];
self.view = contentView;
contentView.backgroundColor = [UIColor whiteColor];
contentView.multipleTouchEnabled= TRUE;
[contentView release];
// Add an action button
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]
initWithTitle"Browse"
style:UIBarButtonItemStylePlain
target:self
actionselector(presentSheet)] autorelease];
}
where "presentsheet" is a function that will include file opening and reading code.
Am I doing right? How to proceed in "presentsheet"?
Thnx in advance
In my very first iPhone App< i am trying to create one button(through code and not using IB) and then clicking that button, will read some file (file name is hard coded in the program) from local machine and will display the content on the iPhone.
I created button as:
- (void)loadView
{
UIView *contentView = [[UIView alloc] initWithFrame[UIScreen mainScreen] applicationFrame]];
self.view = contentView;
contentView.backgroundColor = [UIColor whiteColor];
contentView.multipleTouchEnabled= TRUE;
[contentView release];
// Add an action button
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]
initWithTitle"Browse"
style:UIBarButtonItemStylePlain
target:self
actionselector(presentSheet)] autorelease];
}
where "presentsheet" is a function that will include file opening and reading code.
Am I doing right? How to proceed in "presentsheet"?
Thnx in advance