Swift SDK Version

PictureView

publicfinalclassPictureView:UIView
A view to display a profile picture.
  • The aspect ratio of the source image of the profile picture.

    Declaration

    Swift
    publicvarpictureAspectRatio:UserProfile.PictureAspectRatio{getset}
  • The user id to show the picture for.

    Declaration

    Swift
    publicvaruserId:String{getset}
  • Create a new instance of UserProfilePictureView.

    Declaration

    Swift
    publicinit(frame:CGRect=.zero,profile:UserProfile?=nil)

    Parameters

    frame
    Optional frame rectangle for the view, measured in points.
    profile
    Optional profile to display a picture for. Default: UserProfile.current.
  • Create a new instance of UserProfilePictureView from an encoded interface file.

    Declaration

    Swift
    publicrequiredinit?(coderdecoder:NSCoder)

    Parameters

    decoder
    The coder to initialize from.
  • Explicitly marks the receiver as needing to update the image.
    This method is called whenever any properties that affect the source image are modified, but this can also be used to trigger a manual update of the image if it needs to be re-downloaded.

    Declaration

    Swift
    publicfuncsetNeedsImageUpdate()