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
// | |
// MyLayer.m | |
// | |
// Created by Chris Miles on 14/03/11. | |
// Copyright 2011 Chris Miles. | |
// | |
/* | |
Animate custom property example: |
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
// | |
// BaseViewController.m | |
// | |
// Created by Peter Boctor on 5/4/11. | |
// | |
// Copyright (c) 2011 Peter Boctor | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
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
/* Return a random integer number between low and high inclusive */ | |
int randomInt(int low, int high) | |
{ | |
return (arc4random() % (high-low+1)) + low; | |
} | |
/* Return a random BOOL value */ | |
BOOL randomBool() | |
{ | |
return (BOOL)randomInt(0, 1); |
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
@interface NSDate ( CMExtras ) | |
- (NSDate *)stripTimeComponent; | |
@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
/* | |
Example: | |
CGRect fillRect = CGRectMake(0.0, 0.0, 50.0, 100.0); | |
size_t locationCount = 2; | |
CGFloat locationList[] = {0.0, 1.0}; | |
CGFloat colorList[] = { | |
//red, green, blue, alpha | |
244.0/255.0, 207.0/255.0, 80.0/255.0, 1.0, | |
255.0/255.0, 161.0/255.0, 59.0/255.0, 1.0, |
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
// | |
// UIView+CMExtras.h | |
// | |
// Created by Chris Miles on 9/06/11. | |
// Copyright 2011 Chris Miles. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
// | |
// ModelUtil.h | |
// | |
// Copyright 2011 Chris Miles. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
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
// | |
// NSArray+CMRandomised.h | |
// | |
// Copyright 2011 Chris Miles. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
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
@interface UIImageView (CMAsyncExtension) | |
- (void)asyncLoadImageFromURL:(NSURL *)imageURL; | |
@end | |
@implementation UIImageView (CMAsyncExtension) | |
- (void)asyncLoadImageFromURL:(NSURL *)imageURL | |
{ |
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
// | |
// Main Program.h | |
// | |
// | |
// Created by BLE Sensor Tag. | |
// | |
// | |
#include <CoreBluetooth/CoreBluetooth.h> | |
#include "Sensors.h" |
OlderNewer