1. UIView를 계승한 클래스 만듦.


2. xib만듦


3. UIView에.. 추가


+ (id)customView

{

    CustomView *customView = [[[NSBundle mainBundleloadNibNamed:@"xibview" owner:nil options:nillastObject];

    

    // make sure customView is not nil or the wrong class!

    if ([customView isKindOfClass:[CustomView class]])

        return customView;

    else

        return nil;

}


4. xib의 Custom Class에 CustomView지정.


5. 사용



CustomView *cView = [CustomView customView];




Posted by tenn
,



http://stackoverflow.com/questions/21474536/podfile-gives-an-error-on-install

Posted by tenn
,

[c] c style array

iPhone 2014. 2. 18. 23:01




   int array[10];

    

    for(int i=0;i<10;i++){

        array[i] = 0;

        NSLog(@"%d", array[i]);

    }

    

    for(int i=0;i<10;i++){

        array[i] = i;

        NSLog(@"%d", array[i]);

    }


Posted by tenn
,