This file contains hidden or 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
-(void) networkExample | |
{ | |
uint8_t buf[5]; | |
buf[0]=0xe0; | |
buf[1]=0x4f; | |
buf[2]=0xd0; | |
buf[3]=0x20; | |
buf[4]=0xea; |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>size</key> | |
<string>26</string> | |
<key>name</key> | |
<string>5</string> | |
<key>ph</key> |
This file contains hidden or 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 <Foundation/Foundation.h> | |
typedef NS_ENUM(NSInteger, DeliDay) { | |
DeliDaySunday=0, | |
DeliDayMonday=1, | |
DeliDayTuesday=2, | |
DeliDayWednesday=3, | |
DeliDayThursday=4, |
This file contains hidden or 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 | |
import CoreBluetooth | |
class ViewController: UIViewController,CBPeripheralManagerDelegate { | |
var bluetoothManager : CBPeripheralManager? | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. |
This file contains hidden or 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
self.keyboardHeight.constant = height; | |
[self.view setNeedsUpdateConstraints]; | |
[UIView animateWithDuration:animationDuration animations:^{ | |
[self.view layoutIfNeeded]; | |
}]; |
This file contains hidden or 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 "QuoteTableViewCell.h" | |
@implementation QuoteTableViewCell | |
- (void)setBounds:(CGRect)bounds | |
{ | |
[super setBounds:bounds]; | |
self.contentView.frame = self.bounds; |
This file contains hidden or 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
func typeAsString() -> String { | |
var retVal:String | |
println("Checking") | |
switch self.brickType { | |
case .None: | |
retVal="None" | |
case .Green: | |
retVal="Green" | |
case .Yellow: | |
retVal="Yellow" |
This file contains hidden or 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
// | |
// FadingLabel.h | |
// TextCrossFade | |
// | |
// Created by Paul Wilkinson on 30/09/2015. | |
// Copyright © 2015 Paul Wilkinson. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
This file contains hidden or 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
class myClass { | |
func somethingElse(sender:AnyObject) { | |
print(sender) | |
} | |
func something() { | |
let myBlock = { | |
self.somethingElse(self) |
This file contains hidden or 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 Foundation | |
var dateComponents = NSDateComponents() | |
dateComponents.day = 19 | |
dateComponents.month = 12 | |
dateComponents.year = 2015 | |
let birthDate = NSCalendar(identifier: NSCalendarIdentifierGregorian)!.dateFromComponents(dateComponents)! |
OlderNewer