Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mhmtkrgz's full-sized avatar

Mehmet Karagöz mhmtkrgz

View GitHub Profile
/*
Place following code in your info.plist file.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>hostApplicationURLScheme</string>
</array>
*/
#import <StoreKit/StoreKit.h>
@mhmtkrgz
mhmtkrgz / CodeGenerator.h
Created May 20, 2019 13:54
QRCode&Barcode
#import <UIKit/UIKit.h>
@interface CodeGenerator : NSObject
+ (UIImage *)qrCodeForString:(NSString *)string;
+ (UIImage *)barCodeForString:(NSString *)string;
@end
@mhmtkrgz
mhmtkrgz / os_version.m
Created April 18, 2019 08:52
Check OS Version
if (@available(iOS 11.0, *)) {}
@mhmtkrgz
mhmtkrgz / delegate.h
Created March 8, 2019 13:06
Delegate
#import <UIKit/UIKit.h>
@class SomeViewController;
@protocol SomeViewControllerDelegate <NSObject>
-(void)delegateMethodName:(SomeViewController *)controller;
@end
@interface SomeViewController : UIViewController
@property (nonatomic, weak) id<SomeViewControllerDelegate> delegate;
@mhmtkrgz
mhmtkrgz / target_macros.m
Last active March 8, 2019 12:55
TargetConditionals
Macros from TargetConditionals.h.
iOS 9+ only.
TARGET_OS_WIN32 - Generated code will run under 32-bit Windows
TARGET_OS_UNIX - Generated code will run under some Unix (not OSX)
TARGET_OS_MAC - Generated code will run under Mac OS X variant
TARGET_OS_OSX - Generated code will run under OS X devices
TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator
TARGET_OS_IOS - Generated code will run under iOS
TARGET_OS_TV - Generated code will run under Apple TV OS