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
// We need only one method, no need to import all the framework headers | |
@interface PrivateApi_LSApplicationWorkspace | |
- (bool)openApplicationWithBundleID:(id)arg1; | |
@end | |
@implementation AppBackgroundUtil | |
+ (void)bringOtherAppToFront | |
{ | |
PrivateApi_LSApplicationWorkspace* _workspace; |
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 "LocationToggle.h" | |
#import <CoreLocation/CoreLocation.h> | |
@interface CLLocationManager (Toggle) | |
+ (void)setLocationServicesEnabled:(BOOL)enabled; | |
@end | |
@implementation LocationToggle | |
+ (void)toggleLocationServices:(BOOL)locationServicesEnabled |
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 <UIKit/UIKit.h> | |
@interface PageItemController : UIViewController | |
@property (nonatomic, weak) IBOutlet UIImageView *contentImageView; | |
@end |
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 UIKit | |
class PageItemController: UIViewController { | |
@IBOutlet var contentImageView: UIImageView? | |
} |
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 <UIKit/UIKit.h> | |
@interface PageItemController : UIViewController | |
// Item controller information | |
@property (nonatomic) NSUInteger itemIndex; // *** | |
@property (nonatomic, strong) NSString *imageName; // *** | |
// IBOutlets | |
@property (nonatomic, weak) IBOutlet UIImageView *contentImageView; |
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 UIKit | |
class PageItemController: UIViewController { | |
var itemIndex: Int = 0 // *** | |
var imageName: String = "" // *** | |
@IBOutlet var contentImageView: UIImageView? | |
} |
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 "PageItemController.h" | |
@implementation PageItemController | |
#pragma mark View Lifecycle | |
// *** | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; |
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 UIKit | |
class PageItemController: UIViewController { | |
// MARK: - Variables | |
// *** | |
var itemIndex: Int = 0 | |
// *** | |
var imageName: String = "" { |
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 "ViewController.h" | |
@interface ViewController () <UIPageViewControllerDataSource> | |
@property (nonatomic, strong) NSArray *contentImages; | |
@property (nonatomic, strong) UIPageViewController *pageViewController; | |
@end |
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 UIKit | |
class ViewController: UIViewController, UIPageViewControllerDataSource { | |
// MARK: - Variables | |
private var pageViewController: UIPageViewController? | |
// Initialize it right away here | |
private let contentImages = ["nature_pic_1", | |
"nature_pic_2", |
OlderNewer