autologin = TRUE
googleLogin = TRUE
- When version > 3.5:
FALSE
barName = Hello World!
foo = FALSE
# Get the already-processed Info.plist, which has our bundleId, etc. | |
processedInfoPlistFile=$TARGET_BUILD_DIR/$INFOPLIST_PATH | |
# Copy the bundle identifier from our processed Info.plist | |
bundleId=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$processedInfoPlistFile") | |
# Prefix it with "group." to make the application group container id | |
appGroupContainerId=group.$bundleId | |
# Get the already-copied Settings.bundle/Root.plist | |
appPackageFolder=$TARGET_BUILD_DIR/$EXECUTABLE_FOLDER_PATH | |
copiedSettingsBundlePlistFile=$appPackageFolder/Settings.bundle/Root.plist |
// Say this is in your app delegate | |
- (void) attemptAutologin | |
{ | |
NSURL *autologinURL = ...some..url..that..does..autologin..on..your..server | |
self.safariViewController = [[SFSafariViewController alloc] initWithURL:autologinURL]; | |
self.safariViewController.modalPresentationStyle = UIModalPresentationOverFullScreen; | |
self.safariViewController.view.alpha = 0.0; | |
[self.window.rootViewController presentViewController:self.safariViewController | |
animated:NO |
autologin = TRUE
googleLogin = TRUE
FALSE
barName = Hello World!
foo = FALSE
- (void) setImage:(UIImage *)image | |
{ | |
[super setImage:image]; | |
if (self.lk_heightConstrainedToAspectWidth && self.image) { | |
CGFloat imageAspectRatio = self.image.size.height / self.image.size.width; | |
// If we haven't constrained ourself, or the constraint needs updating | |
if (!self.aspectRatioHeightConstraint || self.aspectRatioHeightConstraint.multiplier != imageAspectRatio) { | |
[self setNeedsUpdateConstraints]; | |
} |
Core Animation's original name is Layer Kit
Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree
. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.
In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer
. The only major feature of UIView that isn’t handled by CALayer is user interaction.
There are four hierarchies, each performing a different role:
import Foundation | |
// Create a method that will be called instead of | |
// "bundleIdentifier()" that returns a non-empty | |
// bundle id, even for a CLI script | |
extension NSBundle { | |
func fakeBundleIdentifier() -> NSString { | |
if self == NSBundle.mainBundle() { | |
return "dont.mind.me.totally.a.normal.bundleid" | |
} else { |
import Foundation | |
// Create a method that will be called instead of | |
// "bundleIdentifier()" that returns a non-empty | |
// bundle id, even for a CLI script | |
extension NSBundle { | |
func fakeBundleIdentifier() -> NSString { | |
if self == NSBundle.mainBundle() { | |
return "dont.mind.me.totally.a.normal.bundleid" | |
} else { |