I am learning Objective-C and iOS development. I think I have a handle on method syntax. Method Syntax in Objective C
If I am understanding correctly, this instance method called reset should return an IBAction object. But it just seems to be setting instance variables (which are UI text fields with those names). Why doesn't it have a return statement returning an IBAction object?
- (IBAction)reset { //why does it not have a return statement?
fahrenheit.text = @"32";
celsius.text = @"0";
kelvin.text = @"-273.15";
}
I am used to .NET code that would look like this (putting it in pseudocode for non-NET folks):
public function reset () returns IBAction
me.fahrenheit.text = "32";
me.celsius.text = "0"
me.kelvin.text = "-273.15"
return new IBAction //I would expect something like this in obj C, based on my experience with .NET languages
end function