Convert int to string in Object-C with ARC?
I'm learning iPhone programming, and I was trying to get a random number, and display it in a UILabel. So to do that, I need to convert the int to a string. The problem is that I'm using the ARC which isn't liking it. It says "Implicit conversion of int to NSString is disallowed with ARC."
This is what I'm using:
int r = arc4random() % 101;
NSString *newValue = [[NSString alloc]initWithFormat:@"%d", r];
myNewValue.text = r;
See the guide here: http://stackoverflow.com/...bjective-c
- Would the police get involved for an expensive stolen object by a minor? My mom bought me glasses($400). They are "real" and the lenses are made to fit my eye vision. I'm in middle school and a high school boy who has a reputation for stealing things (ipods, iphones etc) stole my glasses while he was hanging out with me. Will the police be willing to get involved in this? I live in California. I really need them back, they're expensive and I can barely see anything during class… Or life
- Why can't I sign int my starbucks app? Okay so I tried entering in my starbucks account and it says "Error verify the date time and timezone for this are correct" Nothing is popping up for me to verify and I'm clueless as to what to do. I have an Iphone 5 so is there some place I'm suppose to go to? This is getting me mad.
- What object from home could represent the function of the nucleus? We're supposed to bring an object that represents the FUNCTION of the nucleus. I was thinking that I could use my iPhone and explain how it's is a smart phone and how it is the center of my life. If that wouldn't work what would
- What is the object of slender man for iPhone? I know there are different versions of this game like where you find the pages and stuff but for the iPhone app version I don't get what you are supposed to do.