Contents

lockFocusIfCanDraw()

Locks the focus to the view atomically if the canDraw method returns true and returns the value of canDraw.

Declaration

func lockFocusIfCanDraw() -> Bool

Discussion

Your thread will not be preempted by other threads between the canDraw method and the lock. This method fails to lock focus and returns false, when the view is hidden and the current context is drawing to the screen (as opposed to a printing context).

See Also

Methods