print 'Hi, this is first gist.'
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
@interface NSCodingSearchBar : UISearchBar | |
// Default by the system is YES. | |
// https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/UIKit.framework/UISearchBar.h | |
@property (nonatomic, assign, setter = setHasCentredPlaceholder:) BOOL hasCentredPlaceholder; | |
@end |
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
// | |
// MapViewController.h | |
// MapsCustomInfoWindow | |
// | |
// Created by Jon Friskics on 4/22/14. | |
// Copyright (c) 2014 Jon Friskics. 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
import threading | |
# Based on tornado.ioloop.IOLoop.instance() approach. | |
# See https://github.com/facebook/tornado | |
class SingletonMixin(object): | |
__singleton_lock = threading.Lock() | |
__singleton_instance = None | |
@classmethod |
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)addAnimationsToLayers | |
{ | |
NSInteger timeOffset = 10; | |
for (CALayer *layer in self.view.layer.sublayers) { | |
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"strokeColor"]; | |
animation.duration = 10.0f; | |
// Stagger the animations so they don't begin until the | |
// desired time in each | |
animation.timeOffset = timeOffset--; |
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)setupCircleView{ | |
CGFloat circleView_width = ScreenWidth * 3/10.0; | |
CGRect circleViewRect = CGRectMake(0.0f, 0.0f, circleView_width, circleView_width); | |
self.circleView.bounds = circleViewRect; | |
self.circleView.backgroundColor = LightBlue; | |
self.circleView.layer.cornerRadius = circleView_width/2.0; | |
self.circleView.layer.position = CGPointMake(ScreenWidth/2.0, 100.0f); | |
} | |
- (void)addCircleAnimation { |
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)setPeriodicTask{ | |
[NSTimer scheduledTimerWithTimeInterval:5 | |
target:self | |
selector:@selector(ontick:) | |
userInfo:nil | |
repeats:YES]; | |
} | |
- (void)ontick:(NSTimer *)timer{ |
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)setPeriodicTask{ | |
[NSTimer scheduledTimerWithTimeInterval:5 | |
target:self | |
selector:@selector(updateStatusToServer:) | |
userInfo:nil | |
repeats:YES]; | |
} | |
- (void)updateStatusToServer:(NSTimer *)timer{ |
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
pictures under cc0: http://skuawk.com/?fr |
OlderNewer