User Tag List

  1. viperfan91's Avatar
    I am looking to check

    -(BOOL)isAnyPageLoaded;

    It is in the BrowserController of MobileSafari. I have found a related answer on this forum, funny enough, by googling around:

    umm look in SBMediaController.h
    - (BOOL)isPlaying;

    Code:
    BOOL playing = [[SBMediaController sharedInstance] isPlaying];
    However, when I plug in my own needs into it..

    Code:
    BOOL anythingOpen = [[BrowserController sharedInstance] isAnyPageLoaded];
    I simple get:

    Code:
    Tweak.xm:6: warning: no ‘+sharedInstance’ method found
    Tweak.xm:6: warning: (Messages without a matching method signature
    Tweak.xm:6: warning: will be assumed to return ‘id’ and accept
    Tweak.xm:6: warning: ‘...’ as arguments.)
    Tweak.xm:6: warning: no ‘-isAnyPageLoaded’ method found
    How do I accomplish this? At this point and time I am simply trying to display and AlertView if isAnyPageLoaded == NO.

    Any help appreciated.
    2012-07-28 07:11 AM
  2. mobostudio's Avatar
    You need to sharedInstance method to your BrowserController class - it's simply singleton :

    Implementing a Singleton in Objective-C / iOS | Dr John Wordsworth
    2012-07-31 10:20 AM
LINK TO POST COPIED TO CLIPBOARD