2013-03-12 6 views

답변

1

다른 색상 각 국경 측을 할 사전 구축 된 방법은 없지만 할 수 있습니다 층와 가짜. 아마 그 가치보다 더 많은 작업을 할 수 있지만, 기본적으로 각 테두리에 대해 개별 calayers를 그린 다음 텍스트 필드에 추가해야합니다.

#import <QuartzCore/QuartzCore.h> //This goes up top, but you already know that :-) 

CALayer *topBorder = [CALayer layer]; 
topBorder.frame = // cgrect of where you want the bottom border. Use the textfields frame as reference, but treat the border as a solid rectangle 
topBorder.backgroundColor = [UIColor greenColor].CGColor; // the .CGColor is important, don't forget it 

[toScrollView.layer addSublayer:topBorder]; 

그런 다음 각면을 헹구고 반복하십시오. 도미넌트 컬러를 정상적으로 설정 한 다음 차이가 나는면을 추가하면됩니다. (작업이 적음)