Okay so I have defined my DSNavigationManager class and it has a property called DSNavigationManagerStyle managerStyle
:
typedef enum {
DSNavigationManagerStyleNone = 0,
DSNavigationManagerStyleDefaultNavigationBar = 1 << 0,
DSNavigationManagerStyleDefaultToolBar = 1 << 1,
DSNavigationManagerStyleDefault =
DSNavigationManagerStyleDefaultNavigationBar +
DSNavigationManagerStyleDefaultToolBar,
DSNavigationManagerStyleInteractiveNavigationBar = 1 << 2,
DSNavigationManagerStyleInteractiveToolBar = 1 << 3,
DSNavigationManagerStyleInteractiveWithDarkPanel = 1 << 4,
DSNavigationManagerStyleInteractiveWithBackButton = 1 << 5,
DSNavigationManagerStyleInteractiveWithTitleBar = 1 << 6,
DSNavigationManagerStyleInteractiveDefault =
DSNavigationManagerStyleInteractiveNavigationBar +
DSNavigationManagerStyleInteractiveToolBar +
DSNavigationManagerStyleInteractiveWithDarkPanel +
DSNavigationManagerStyleInteractiveWithBackButton +
DSNavigationManagerStyleInteractiveWithTitleBar,
} DSNavigationManagerStyle;
I just learned how to use bit-wise shifting but I don't know how to receive this information. I want to do something a little like:
DSNavigationManagerStyle managerStyle = DSNavigationManagerStyleDefault;
if(managerStyle "Has The DefaultNavigationBar bit or the DefaultToolBarBit") {
// Implement
}
else {
if(managerStyle "Has the InteractiveNavigationBar bit") {
// Implement
}
if(managerStyle "Has the InteractiveToolBar bit") {
// Implement
}
//.... and so on so that technically the object can implement all
// styles, no styles, or any number of styles in between
}
Thanks in advance for any help! :)