occultImage.image = [UIImage imageNamed:[NSString stringWithFormat:@"glyph%d.gif", occult]];
seems pretty common.
To a C# programmer that just looks weird... and weird it is.
But it basically is just another way of calling methods. When you see some square brackets, you know you are calling a method on a particular class or object. Just take it as [object method:parameter].
In the above example we are calling a static method called imageNamed on the UIImage class. The parameter we are passing is the result of another call, stringWithFormat on NSString.
In C#, this would be something like :
occultImage.image = UIImage.imageNamed(NSString.stringWithFormat(@"glyph%d.gif", occult));
NSCalendarDate *startDate = [endDate dateByAddingYears:0 months:0 days:-60 hours:0 minutes:0 seconds:0];
No comments:
Post a Comment