This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Uses Cartography for layout, but you should be able to translate it to NSLayoutConstraint pretty easily | |
import Cartography | |
/// Render a single page of a PDF, non-interactive, at an arbitrary size. | |
/// Adds its own constraint to maintain its correct aspect ratio. | |
class PDFPageView: UIView { | |
var displayBox: PDFDisplayBox = .artBox | |
var majorAxisLength: CGFloat = 2048 | |
var page: PDFPage? { didSet { applyState() } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on alfred_script(q) | |
tell application "System Events" to set FrontAppName to name of first process where frontmost is true | |
if FrontAppName is "Xcode" then | |
tell app "Simulator" to activate | |
else | |
tell app "Xcode" to activate | |
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* add to your userChrome.css */ | |
#TabsToolbar { | |
visibility: collapse; | |
overflow: visible; | |
} | |
#TabsToolbar > * { | |
visibility: collapse; | |
} |