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
#import "CustomTextField.h" | |
@interface CustomTextField() | |
@property (nonatomic, strong) NSAttributedString *originalAttribtuedPlaceholder; | |
@end | |
@implementation CustomTextField |
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
tell application "System Events" to tell application process "Safari" | |
try | |
get properties of window 1 | |
set position of window 1 to {438, 22} | |
set size of window 1 to {1669, 1418} | |
on error errmess | |
log errmess | |
-- no window open | |
end try | |
end tell |
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
- (CGSize)intrinsicContentSize { | |
CGSize boundingSize = CGSizeMake(self.titleLabel.preferredMaxLayoutWidth - self.titleEdgeInsets.left - self.titleEdgeInsets.right, CGFLOAT_MAX); | |
NSAttributedString *attributedTitle = [self attributedTitleForState:self.state]; | |
CGRect boundingRect; | |
if(attributedTitle) { | |
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
// | |
// Original Objective C version: https://gist.github.com/bobmoff/7110052 | |
// | |
// Fix SpriteKit's SKNode bug on iOS 7 & 8: nodes capture touch events | |
// even when userInteractionEnabled is false and the nodes are hidden. | |
// | |
// Details: | |
// http://stackoverflow.com/questions/19511334/sprite-with-userinteractionenabled-set-to-yes-does-not-receive-touches-when-cove | |
// | |
// How to use: |