Class Name Rules and Subclasses

Is it mandatory to have class name in Upper Case e.g. Marks/Student or can we use marks/student as class name.

Can someone explain this - UIButton is subclass of UIControl or UIresponder.

It’s not mandatory but it is considered best practice. Starting type names with an uppercase letter and instance names with a lowercase makes it easier for a person reading your code to understand what is going on. Honestly, I can’t really see a reason not to do so.

UIButton is a subclass of UIControl which is a subclass of UIView which is a subclass of UIResponder. A tip for figuring this stuff out: Go to Apple’s documentation page for a class and check the Relationships section, where you can see what the class inherits from and can click through to follow it up through the inheritance chain. For instance, here’s UIButton.