Class MCBrowserViewController

  • All Implemented Interfaces:
    NSCoding, NSExtensionRequestHandling, MCNearbyServiceBrowserDelegate, NSObject, UIAppearanceContainer, UIContentContainer, UIFocusEnvironment, UIPasteConfigurationSupporting, UIResponderStandardEditActions, UIStateRestoring, UITraitEnvironment, UIUserActivityRestoring

    public class MCBrowserViewController
    extends UIViewController
    implements MCNearbyServiceBrowserDelegate
    MCBrowserViewController The MCBrowserViewController class manages the system-supplied user interface for choosing peers to connect with for multipeer sessions. MCBrowserViewController manages presentation of nearby peers and the invite process for you. The invite process is driven by the user and handled by the peer picker and the MCNearbyServiceBrowser object it holds. MCBrowserViewController must be initialized with a MCNearbyServiceBrowser object and a MCSession object at init time. If the browser object's delegate is nil, the browser view controller will set itself as the browser's delegate. The session object will be used by the browser view controller during the invite process. A delegate that conforms to the MCBrowserViewControllerDelegate protocol must also be provided. The delegate is notified to decide whether to present a peer, when the user taps the done button, or when the users taps the cancel button. No assumption should be made as to which queue the callbacks are called on. When presented, the browser view controller looks for nearby peers, and allows the user to connect up to the specified maximum number of peers. When the user taps on a nearby peer, the browser view controller will send an invitation to it. When the browser view controller is dismissed, it will stop looking for nearby peers.
    • Constructor Detail

      • MCBrowserViewController

        protected MCBrowserViewController​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • attemptRotationToDeviceOrientation

        public static void attemptRotationToDeviceOrientation()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • clearTextInputContextIdentifier

        public static void clearTextInputContextIdentifier​(java.lang.String identifier)
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • prepareInterstitialAds

        public static void prepareInterstitialAds()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • initWithNibNameBundle

        public MCBrowserViewController initWithNibNameBundle​(java.lang.String nibNameOrNil,
                                                             NSBundle nibBundleOrNil)
        Description copied from class: UIViewController
        The designated initializer. If you subclass UIViewController, you must call the super implementation of this method, even if you aren't using a NIB. (As a convenience, the default init method will do this for you, and specify nil for both of this methods arguments.) In the specified NIB, the File's Owner proxy should have its class set to your view controller subclass, with the view outlet connected to the main view. If you invoke this method with a nil nib name, then this class' -loadView method will attempt to load a NIB whose name is the same as your view controller's class. If no such NIB in fact exists then you must either call -setView: before -view is invoked, or override the -loadView method to set up your views programatically.
        Overrides:
        initWithNibNameBundle in class UIViewController
      • initWithServiceTypeSession

        public MCBrowserViewController initWithServiceTypeSession​(java.lang.String serviceType,
                                                                  MCSession session)
        Create a browser view controller with a service type and a session.
      • maximumNumberOfPeers

        public long maximumNumberOfPeers()
        The maximum number of peers the session should expect.
      • minimumNumberOfPeers

        public long minimumNumberOfPeers()
        The minimum number of peers the session should expect.
      • setMaximumNumberOfPeers

        public void setMaximumNumberOfPeers​(long value)
        The maximum number of peers the session should expect.
      • setMinimumNumberOfPeers

        public void setMinimumNumberOfPeers​(long value)
        The minimum number of peers the session should expect.