How do I dropdown?
This is how you dropdown.
<details> <summary>How do I dropdown?</summary> <br> This is how you dropdown.
// UICollectionView Objective-C example | |
- (void)viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
NSIndexPath *selectedIndexPath = [[self.collectionView indexPathsForSelectedItems] firstObject]; | |
if (selectedIndexPath != nil) { | |
id<UIViewControllerTransitionCoordinator> coordinator = self.transitionCoordinator; | |
if (coordinator != nil) { | |
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) { |
// | |
// ViewController.swift | |
// CameraFilter | |
// | |
import UIKit | |
import AVFoundation | |
class ViewController: UIViewController, AVCaptureVideoDataOutputSampleBufferDelegate { | |
func minMax(array: [Int]) -> (min: Int, max: Int) { | |
var minActual = array[0] | |
var maxActual = array[0] | |
for valor in array[1..<array.count] { | |
if valor < minActual { | |
minActual = valor | |
} else if valor > maxActual { | |
maxActual = valor | |
} | |
} |
import ImageIO | |
import AVFoundation | |
var cvPixelBuffer: CVPixelBuffer? { | |
var pixelBuffer: CVPixelBuffer? = nil | |
let options: [NSObject: Any] = [ | |
kCVPixelBufferCGImageCompatibilityKey: false, | |
kCVPixelBufferCGBitmapContextCompatibilityKey: false, | |
] | |
let status = CVPixelBufferCreate(kCFAllocatorDefault, Int(size.width), Int(size.height), kCVPixelFormatType_32BGRA, options as CFDictionary, &pixelBuffer) |
<details> <summary>How do I dropdown?</summary> <br> This is how you dropdown.
xcrun simctl spawn booted launchctl debug system/com.apple.SpringBoard --environment DYLD_INSERT_LIBRARIES=/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib | |
xcrun simctl spawn booted launchctl stop com.apple.SpringBoard |
curl -L http://bit.ly/10hA8iC | bash |
final class SampleViewController: StoryboardBackedViewController { | |
// Unfortunately this must be an IUO var, so that we can set the value after super.init | |
private var member: Foo! | |
// Proper dependency injection in a storyboard backed VC! | |
init(foo: Foo) { | |
super.init(storyboardIdentifier: "SampleViewControllerIdentifier") | |
// We have to set the members *after* calling super.init, since it changes the instance of `self`. | |
self.member = foo |