C# 클래스 MessageBar.MessageBarManager

상속: NSObject, IStyleSheetProvider
파일 보기 프로젝트 열기: prashantvc/Xamarin.iOS-MessageBar 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DismissMessage void
DismissMessage void
GetMessageBarViewController MessageBarViewController
GetNextMessage MessageView
InvokeDismissEvent void
IsEqualLastMessage bool
MessageBarManager System
MessageTapped void
ShowNextMessage void

공개 메소드들

메소드 설명
HideAll ( ) : void

Hides all currently-displayed messages, and discards the Message queue.

ShowMessage ( string title, string description, MessageType type, System.TimeSpan duration = null, System.Action onTapped = null, System.Action onDismiss = null ) : void

Shows the message.

Adds a new message to the queue, and shows it when all previous messages has finished showing. If no messages exists in the queue, will (obviously) be displayed instantly.

StyleSheetForMessageView ( MessageView messageView ) : MessageBarStyleSheet

Stylesheet for message view.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Releases the resources used by the NSObject object.

This Dispose method releases the resources used by the NSObject class.

This method is called by both the Dispose() method and the object finalizer (Finalize). When invoked by the Dispose method, the parameter disposing disposing is set to and any managed object references that this object holds are also disposed or released; when invoked by the object finalizer, on the finalizer thread the value is set to .

Calling the Dispose method when you are finished using the NSObject ensures that all external resources used by this managed object are released as soon as possible. Once you have invoked the Dispose method, the object is no longer useful and you should no longer make any calls to it.

For more information on how to override this method and on the Dispose/IDisposable pattern, read the ``Implementing a Dispose Method'' document at http://msdn.microsoft.com/en-us/library/fs2xkftw.aspx

비공개 메소드들

메소드 설명
DismissMessage ( MessageView messageView, bool dismissedByTap ) : void

Dismisses the message.

DismissMessage ( object messageView ) : void

Invoked when the message is dismissed by the timer.

GetMessageBarViewController ( ) : MessageBarViewController

Gets the message bar view controller.

GetNextMessage ( ) : MessageView

Gets the next message.

InvokeDismissEvent ( MessageView messageView, bool dismissedByTap ) : void

Invokes the correct dismiss event, depending on the dismissedByTap value.

IsEqualLastMessage ( MessageView message ) : bool

Determines whether the specified message is equal to the last message handled.

MessageBarManager ( ) : System

Prevents a default instance of the MessageBarManager class from being created.

An init message is coupled with an alloc (or allocWithZone:) message in the same line of code:

An object isn’t ready to be used until it has been initialized. The init method defined in the NSObject class does no initialization; it simply returns self.

In a custom implementation of this method, you must invoke super’s designated initializer then initialize and return the new object. If the new object can’t be initialized, the method should return nil. For example, a hypothetical BuiltInCamera class might return nil from its init method if run on a device that has no camera.

In some cases, an init method might return a substitute object. You must therefore always use the object returned by init, and not the one returned by alloc or allocWithZone:, in subsequent code.

MessageTapped ( UIGestureRecognizer recognizer ) : void

Invoked when the message is Tapped.

ShowNextMessage ( ) : void

Attempts to retrieve the next message, and if successful, shows it. If no message is found, does nothing.

메소드 상세

Dispose() 보호된 메소드

Releases the resources used by the NSObject object.

This Dispose method releases the resources used by the NSObject class.

This method is called by both the Dispose() method and the object finalizer (Finalize). When invoked by the Dispose method, the parameter disposing disposing is set to and any managed object references that this object holds are also disposed or released; when invoked by the object finalizer, on the finalizer thread the value is set to .

Calling the Dispose method when you are finished using the NSObject ensures that all external resources used by this managed object are released as soon as possible. Once you have invoked the Dispose method, the object is no longer useful and you should no longer make any calls to it.

For more information on how to override this method and on the Dispose/IDisposable pattern, read the ``Implementing a Dispose Method'' document at http://msdn.microsoft.com/en-us/library/fs2xkftw.aspx

protected Dispose ( bool disposing ) : void
disposing bool /// If set to , the method is invoked directly and will dispose manage and /// unmanaged resources; If set to the method is being called by the garbage collector /// finalizer and should only release unmanaged resources. ///
리턴 void

HideAll() 공개 메소드

Hides all currently-displayed messages, and discards the Message queue.
public HideAll ( ) : void
리턴 void

ShowMessage() 공개 메소드

Shows the message.

Adds a new message to the queue, and shows it when all previous messages has finished showing. If no messages exists in the queue, will (obviously) be displayed instantly.

public ShowMessage ( string title, string description, MessageType type, System.TimeSpan duration = null, System.Action onTapped = null, System.Action onDismiss = null ) : void
title string /// Message Bar title ///
description string /// Message Bar description ///
type MessageType /// Message type ///
duration System.TimeSpan /// The duration. Default (null) is 3 Seconds. ///
onTapped System.Action /// OnTapped callback. ///
onDismiss System.Action /// OnDismiss callback ///
리턴 void

StyleSheetForMessageView() 공개 메소드

Stylesheet for message view.
public StyleSheetForMessageView ( MessageView messageView ) : MessageBarStyleSheet
messageView MessageView /// Message view. ///
리턴 MessageBarStyleSheet