How to get arc4Sin() output into label/NSString
Posted
by Moshe
on Stack Overflow
See other posts from Stack Overflow
or by Moshe
Published on 2010-03-16T05:46:01Z
Indexed on
2010/03/16
5:56 UTC
Read the original article
Hit count: 259
I'm trying to take the output of arc4sin and put it into a label.
(EDIT: You can ignore this and just post sample code, if this is too irrelevant.)
I've tried:
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
NSString *number = [[NSString alloc] stringWithFormat: @"%@", arc4random() % 9];
label.text = number;
}
I've created an IBOutlet for "label" and connected it. What's wrong here?
© Stack Overflow or respective owner