View BCKCodeFunctions.m
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
NSUInteger BCKCodeMaxBarScaleThatFitsCodeInSize(BCKCode *code, CGSize size, NSDictionary *options) | |
{ | |
NSInteger retScale = 1; | |
NSMutableDictionary *mutableOptions = [NSMutableDictionary dictionaryWithDictionary:options]; | |
for (NSUInteger scale=1;;scale++) | |
{ | |
mutableOptions[BCKCodeDrawingBarScaleOption] = @(scale); | |
CGSize neededSize = [code sizeWithRenderOptions:mutableOptions]; | |
View gist:10758388
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
http://www.manning.com/drobnik/?a_aid=cocoanetics&a_bid=f92809ec |
View gist:739ecd7b2e1a89446f01
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
NSArray *filters = [CIFilter filterNamesInCategory:kCICategoryGenerator]; | |
NSLog(@"%@", filters); | |
result: | |
<__NSArrayI 0x7ffb63863520>( | |
CIAztecCodeGenerator, | |
CICheckerboardGenerator, | |
CICode128BarcodeGenerator, | |
CIConstantColorGenerator, |
View gist:82797fe7cb22b9774ae2
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
pod 'OBImagePicker', :git => 'https://github.com/openbakery/OBImagePicker.git', :branch => 'develop' |
View gist:54cf170eb36b211739ba
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
Summary: | |
If you install an extension via Extension Builder and modify something, the changes are ignored if you remove and reinstall the extension. | |
Steps to Reproduce: | |
1. Add the Reload.safariextension (from developer sample code) in Extension Builder | |
2. Click install | |
3. Note the shown Version to be 1.0. | |
4. Modify Bundle version, shown version and description | |
5. Click deinstall, then click install |
View gist:9c5ec3b54eedf254d916
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
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
// workaround for iPhone 6+ bug | |
if (self.traitCollection.displayScale==3) | |
{ | |
CGSize windowSize = [UIScreen mainScreen].bounds.size; | |
CGSize viewSize = self.view.bounds.size; | |
View PLYTableView.m
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
// | |
// PLYTableView.m | |
// ProdlyApp | |
// | |
// Created by Oliver Drobnik on 08/01/15. | |
// Copyright (c) 2015 ProductLayer. All rights reserved. | |
// | |
#import "PLYTableView.h" |
View gist:b2d80c4816d0de1cd207
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
- (void)testLoginButtonTapped | |
{ | |
// mock a Server | |
id serverMock = OCMClassMock([Server class]); | |
OCMStub([serverMock loginUserWithName:[OCMArg any] password:[OCMArg any]]).andReturn(YES); | |
_loginVC.serverToUse = serverMock; | |
// simulate input in name field | |
_loginVC.userTextField.text = @"foo"; |
View gist:2a2a7360c7ef1796a96a
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
- (void)testLoginButtonTapped | |
{ | |
// mock a Server | |
id serverMock = OCMClassMock([Server class]); | |
OCMStub([serverMock loginUserWithName:[OCMArg any] password:[OCMArg any]]).andReturn(YES); | |
_loginVC.serverToUse = serverMock; | |
// simulate input in name field | |
_loginVC.userTextField.text = @"foo"; |
View gist:f6759d3cabe67d947ffb
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
UINavigationController *nav = (UINavigationController *)self.window.rootViewController; | |
NotesListViewController *list = (NotesListViewController *)[nav topViewController]; | |
list.notesManager = [NotesManager new]; | |
// Override point for customization after application launch. | |
return YES; | |
} |
OlderNewer