How to access enum through all classes. Let me explain:
enum
{
BottomBackButtonNav = 0,
BottomNextButtonNav,
BottomSliderIncreaseNav,
BottomSliderDcreaseNav,
PageSwipeLeftNav,
PageSwipeRightNav,
NavFromThumbnailView,
NavFromTOCView,
} NavigationType;
This enum is defined in my MainViewController's head开发者_如何学Pythoner and want to use it to all my views. How to do this, please guide.
Regards.
You can define it in an header file (.h) and import it in each module you need
You can also create a header file that holds all your enums and then import this header file in your projects .pch
file (usually located in your Supporting Files
folder).
This Prefix header
uses the contents of this file and includes them on every source file. So it pretty much imports whatever headers that are set in the #ifdef __OBJC__
section to every file during compile time.
精彩评论