This file contains hidden or 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
# Run this as a post build script, immediately after you copy the sparkle bundle | |
LOCATION="${BUILT_PRODUCTS_DIR}"/"${FRAMEWORKS_FOLDER_PATH}" | |
IDENTITY="Idenitity" # Fill in with code sign identity | |
codesign --deep --verbose --force --sign "$IDENTITY" "$LOCATION/Sparkle.framework/Versions/A" |
This file contains hidden or 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
codesign --verify --verbose=4 <PATH_TO_APP> |
This file contains hidden or 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
- (IBAction)doSomething:(id)sender { | |
NSSegmentedControl *control = (NSSegmentedControl *)sender; | |
NSInteger selectedSeg = [control selectedSegment]; | |
// Do something! | |
} |
This file contains hidden or 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
// Numbers | |
NSNumber *x = @(3.14); | |
// Arrays | |
NSArray *a = @[@"a", @"b", @"c"]; | |
// Dictionary | |
NSDictionary *d = @{ @"key" : @"Loris", | |
@"name" : @"Joris", | |
@"n" : @"Boris" }; |
This file contains hidden or 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
[_myTextView scrollRangeToVisible:NSMakeRange([[_myTextView string] length], 0)]; |
This file contains hidden or 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
+ (NSColor *) staticColour { | |
__strong static NSColor* _sharedInstance = nil; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
_sharedInstance = [NSColor colorWithCalibratedRed:255.f green:255.f blue:255.f alpha:1.0]; | |
}); | |
return _sharedInstance; | |
} |
This file contains hidden or 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
-(void)clearAllSubviewsOfView :(NSView *)parent { | |
for (NSView *subview in [parent subviews]) { | |
[subview removeFromSuperview]; | |
} | |
} |
This file contains hidden or 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
window.titleVisibility = NSWindowTitleHidden; |
This file contains hidden or 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
NSView *themeFrame = [[mainWindow contentView] superview]; | |
NSRect c = [themeFrame frame]; | |
NSRect aV = [accessoryView frame]; | |
NSRect newFrame = NSMakeRect(c.size.width - aV.size.width, | |
c.size.height - aV.size.height, | |
aV.size.width, | |
aV.size.height); | |
[accessoryView setFrame:newFrame]; | |
[themeFrame addSubview:accessoryView]; |
This file contains hidden or 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
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.google.com"]]; |