A complete gdb to lldb command map.
- Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
- p - Print primitive type
- (void)layoutSubviews { | |
[super layoutSubviews]; | |
void objc_msgSend(); | |
NSLog(@"%@", ((id(*)(id,SEL))objc_msgSend)(self, @selector(recursiveDescription))); | |
NSLog(@"hcons: %@", [self constraintsAffectingLayoutForAxis:UILayoutConstraintAxisHorizontal]); | |
NSLog(@"vcons: %@", [self constraintsAffectingLayoutForAxis:UILayoutConstraintAxisVertical]); | |
} |
A complete gdb to lldb command map.
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
class Regex { | |
let pattern: String | |
let options: NSRegularExpressionOptions! | |
private var matcher: NSRegularExpression { | |
return NSRegularExpression(pattern: self.pattern, options: nil, error: nil) | |
} | |
required init(pattern: String, options: NSRegularExpressionOptions = nil) { | |
self.pattern = pattern |
import Foundation | |
/** | |
* CGAffineTransform | |
* | |
* var a = CGAffineTransformMakeRotation(45.0 * M_PI / 180.0) | |
* var b = CGPointMake(30.0, 43.3) | |
*/ | |
/** |
import Darwin | |
let isLittleEndian = Int(OSHostByteOrder()) == OSLittleEndian | |
let htons = isLittleEndian ? _OSSwapInt16 : { $0 } | |
let htonl = isLittleEndian ? _OSSwapInt32 : { $0 } | |
let htonll = isLittleEndian ? _OSSwapInt64 : { $0 } | |
let ntohs = isLittleEndian ? _OSSwapInt16 : { $0 } | |
let ntohl = isLittleEndian ? _OSSwapInt32 : { $0 } | |
let ntohll = isLittleEndian ? _OSSwapInt64 : { $0 } |
@implementation CIContext (IntermediateImage) | |
- (CIImage *)rsq_renderToIntermediateImage:(CIImage *)image { | |
CIImage *intermediateImage = nil; | |
CGSize size = image.extent.size; | |
CVPixelBufferRef pixelBuffer = NULL; | |
CVReturn status = CVPixelBufferCreate(kCFAllocatorDefault, | |
size.width, | |
size.height, | |
kCVPixelFormatType_32ARGB, |
#import "UICollectionViewFlowLayoutCenterItem.h" | |
@implementation UICollectionViewFlowLayoutCenterItem | |
- (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity | |
{ | |
CGSize collectionViewSize = self.collectionView.bounds.size; | |
CGFloat proposedContentOffsetCenterX = proposedContentOffset.x + self.collectionView.bounds.size.width * 0.5f; | |
CGRect proposedRect = self.collectionView.bounds; |
#import "AppDelegate.h" | |
#import <MediaPlayer/MediaPlayer.h> | |
@implementation AppDelegate | |
{ | |
BOOL _isFullScreen; | |
} | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ |
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
// | |
// NSString+XML.h | |
// Customizable string XML parser for NSString, NSMutableString, NSAttributedString, and NSMutableAttributedString. | |
// | |
// Created by Shilo White on 8/31/13. | |
// Copyright (c) 2013 XIDA Design & Technik. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |