Skip to content

Instantly share code, notes, and snippets.

- (CGAffineTransform)getTickTransform:(NSNumber *)toValue
{
CGAffineTransform transform = CGAffineTransformIdentity;
NSInteger newValue = [toValue integerValue];
CGFloat defaultAngle = [self getDefaultAngle];
newValue %= 12;
transform = CGAffineTransformRotate(transform, newValue * defaultAngle);
return transform;
-(NSString *)getConditionStr:(NSInteger)index
{
static NSDictionary *mapping = nil;
NSString *(^getTitle)(void);
if (!mapping) {
mapping = @{
@1: ^(void){
return [NSString stringWithFormat:@"%@", index % 2 ? @"True1" : @"False1"];
},
CAShapeLayer *arc;
int radius = 100;
arc = [CAShapeLayer layer];
arc.path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(100, 50) radius:radius startAngle:-M_PI_2 endAngle:M_PI + M_PI_2 clockwise:YES].CGPath;
arc.position = CGPointMake(CGRectGetMidX(self.view.frame)-radius,
CGRectGetMidY(self.view.frame)-radius);
arc.cornerRadius = 100.0;
arc.fillColor = [UIColor clearColor].CGColor;
arc.strokeColor = [UIColor purpleColor].CGColor;
list.content.rows[i].reRender = true
for i = 1, #tableview._view._rows do
local theRow = tableview._view._rows[i]._border
theRow:setFillColor( 255, 255, 255, 0)
end
@minsOne
minsOne / networkReachabilityListener.lua
Last active August 29, 2015 14:01
Checking Connected Network Method
--[[
네트워크 동작 여부 확인 메소드
결과값이 true이면 네트워크가 연결된 상태이며 false인 경우 네트워크가 연결되지 않은 상태이다.
]]--
function networkController:networkReachabilityListener()
local io = require("io")
local http = require("socket.http")
local count = 0;
local function networkListener()
[info] a./files?containerType=ISSUE_COMMENT&containerId=340 - 192.168.2.77 - silee [23/May/2014:13:50:34 +0900] "GET /files?containerType=ISSUE_COMMENT&containerId=340 HTTP/1.1" 200 - "http://192.168.2.94:9000/mornbr/PororoPhone/issue/52" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36" 4ms
java(72076,0x112aee000) malloc: *** error for object 0x112edc790: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
issue 3번 연속 등록시 뻗는 증상
http://itunes.apple.com/WebObjects/MZStore.woa/wa/search?submit=sellAllLockup&media=software&entity=software&term=UANGEL%20Corp+%ED%86%A0%EB%AA%A8%ED%82%A4%EC%A6%88
// showing network spinning gear in status bar. default is NO
[[UIApplication sharedApplication]setNetworkActivityIndicatorVisible:YES];]
ln -s subl /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl
CABasicAnimation *shake = [CABasicAnimation animationWithKeyPath:@"position"];
[shake setDuration:0.1];
[shake setRepeatCount:2];
[shake setAutoreverses:YES];
[shake setFromValue:[NSValue valueWithCGPoint:
CGPointMake(view.center.x - 5,view.center.y)]];
[shake setToValue:[NSValue valueWithCGPoint:
CGPointMake(view.center.x + 5, view.center.y)]];
[view.layer addAnimation:shake forKey:@"position"];