본문 바로가기

코드로 오토레이아웃 제어하기 코드로 오토 레이아웃을 추가 해 주어야 할 경우에는+(instancetype)constraintWithItem:(id)view1 attribute:(NSLayoutAttribute)attr1 relatedBy:(NSLayoutRelation)relation toItem:(id)view2 attribute:(NSLayoutAttribute)attr2 multiplier:(CGFloat)multiplier constant:(CGFloat)c;를 추가하여 사용 해 주면 된다.view1과 view2는 서로 제약조건으로 영향을 주는 뷰 이며 (NSLayoutAttribute )attr1, attr2는 레이아웃 속성이다. 여기서 사용되는 NSLayoutAttribute 경우는 아래와 같은 속성을 사용 할 수 있다... 더보기
iOS 중간 글자 크기, 색상 변경하기 NSMutableAttributedString 글자 중간중간의 색상, 크기, 하이퍼링크를 주고 싶다면 NSMutableAttributedString 클래스를 사용하면 된다.아래 코드를 사용하면 다음과 같은 화면이 나온다. NSMutableAttributedString *stringAtterbuted = [[NSMutableAttributedString alloc] initWithString:@"가나다라 마바사아 아자차카 타파하"]; [stringAtterbuted addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:20.0] range:NSMakeRange(0, 3)]; [stringAtterbuted addAttribute:NSForegroundColorAttributeName valu.. 더보기
코드 비교 프로그램 DiffMerge http://sourcegear.com/diffmerge/downloaded.php에서 다운 받을 수 있으며 한글 깨짐의 경우 Preferences -> Rulesets -> Edit -> Fallblack Character Endcoding Options 에서 Use Name Encoding Below를 활성화 하신 후에 하단에 UTF8로 변경하면 된다. 더보기