'분류 전체보기'에 해당되는 글 377건

  1. 2014.08.27 [IOS] - IOS UIView Overflow Hidden ( Method clipsToBounds )
  2. 2014.08.09 [IOS / Object-C] - IOS 버튼 그라데이션, UIButton Gradation
  3. 2014.08.01 [IOS] - IOS ScrollView 스크롤 초기화
  4. 2014.07.30 [IOS] - IOS 네트워크 통신 파라미터 인코딩
  5. 2014.07.22 [IOS] - IOS TextField Only Number
  6. 2014.07.21 [IOS] - IOS UIImage to NSData 이미지 Data 값으로 변경
  7. 2014.07.18 [IOS] - IOS UIView fadeOut & fadeIn, UIView animation
  8. 2014.07.18 [IOS] - IOS 외부 이미지 불러오기, URL Image
  9. 2014.07.16 [IOS / Object-C] - IOS HTTP 네트워크 통신
  10. 2014.07.11 [IOS] - IOS System Version 정보 구하기, IOS 버전 구하기

[IOS] - IOS UIView Overflow Hidden ( Method clipsToBounds )

IOS ( Object-C ) 2014. 8. 27. 10:06
반응형

UIView *view;


view.clipsToBounds = YES

반응형
:

[IOS / Object-C] - IOS 버튼 그라데이션, UIButton Gradation

IOS ( Object-C ) 2014. 8. 9. 10:10
반응형

UIButton *btnStart;


CALayer *btnLayer           = btnStart.layer;

CAGradientLayer *gLayer     = [CAGradientLayer layer];


gLayer.cornerRadius = 5;

gLayer.frame  = btnLayer.bounds;

gLayer.colors = [NSArray arrayWithObjects:

                     (id)DEFINE_SET_RGB(93, 167, 236, 0.5f).CGColor,

                     (id)DEFINE_SET_RGB(83, 154, 224, 0.7f).CGColor,

                     (id)DEFINE_SET_RGB(65, 132, 204, 1.0f).CGColor,

                     (id)DEFINE_SET_RGB(53, 117, 190, 0.8f).CGColor,

                     nil];


[btnLayer insertSublayer:gLayer atIndex:0];

반응형
:

[IOS] - IOS ScrollView 스크롤 초기화

IOS ( Object-C ) 2014. 8. 1. 15:48
반응형


[scrollBody setContentOffset:CGPointZero animated:YES];

반응형
:

[IOS] - IOS 네트워크 통신 파라미터 인코딩

IOS ( Object-C ) 2014. 7. 30. 10:56
반응형

[[NSString stringWithFormat:@"usr_id=%@&offset=%d&name=%@", userID, offset, name] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

반응형
:

[IOS] - IOS TextField Only Number

IOS ( Object-C ) 2014. 7. 22. 13:43
반응형

- (BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {

  NSCharacterSet *nonNumberSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet];

  return ([string stringByTrimmingCharactersInSet:nonNumberSet].length > 0) || [string isEqualToString:@""];

}

반응형
:

[IOS] - IOS UIImage to NSData 이미지 Data 값으로 변경

IOS ( Object-C ) 2014. 7. 21. 11:19
반응형

UIImage *image    = zoomImageView.image;

NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(image)];

반응형
:

[IOS] - IOS UIView fadeOut & fadeIn, UIView animation

IOS ( Object-C ) 2014. 7. 18. 11:54
반응형

[self setFadeOut:self.view];

[self setFadeIn:self.view];


// Set Fade Out Pop

- (void) setFadeOut : (UIView *) target {

  [target setAlpha:0];


  [UIView animateWithDuration:Dialog_Animation_Delay

                        delay:0

                      options: UIViewAnimationOptionCurveEaseInOut

                   animations:^{

                     [target setAlpha:1];

                   }

                   completion:^(BOOL finished){

NSLog(@"Set Fade Out Call Back");

                   }];

}


// Set Fade In Pop

- (void) setFadeIn : (UIView *) target  {

  [target setAlpha:1];


  [UIView animateWithDuration:Dialog_Animation_Delay

                        delay:0

                      options: UIViewAnimationOptionCurveEaseInOut

                   animations:^{

                     [target setAlpha:0];

                   }

                   completion:^(BOOL finished){

NSLog(@"Set Fade In Call Back");

                   }];

}

반응형
:

[IOS] - IOS 외부 이미지 불러오기, URL Image

IOS ( Object-C ) 2014. 7. 18. 08:49
반응형

NSString *attach = @"http://mrkn.tistory.com";


NSURL *url        = [NSURL URLWithString:attach];

NSData *imageFile = [NSData dataWithContentsOfURL:url];

UIImage *image    = [UIImage imageWithData:imageFile];


CGSize imageSize  = image.size;


NSLog(@" Image Size : Width = %f Height = %f", imageSize.width, imageSize.height);

반응형
:

[IOS / Object-C] - IOS HTTP 네트워크 통신

IOS ( Object-C ) 2014. 7. 16. 14:43
반응형

NSMutableData *receiveData;


- (void) sendData : (NSString *) url : (NSString *) value : (NSString *) sendType {


NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];


  NSString *post   = value;

  NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];


  [request setURL:[NSURL URLWithString:url]];

  [request setHTTPMethod:sendType];

  [request setHTTPBody:[value dataUsingEncoding:NSUTF8StringEncoding]];

  [request setCachePolicy:NSURLRequestUseProtocolCachePolicy];

  [request setTimeoutInterval:15.0f];

  [request setValue:@"Mozilla/4.0 (compatible;)" forHTTPHeaderField:@"User-Agent"];

  [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];

  [request setHTTPBody:postData];


  NSURLConnection *connection = [NSURLConnection connectionWithRequest : request

                                                              delegate : self];


}



// Receive Start to Submit

- (void) connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *) aResponse {

  NSLog(@" Receive Start ");

  receiveData = [[NSMutableData alloc] init];

}


// Connection Error Event

- (void) connection:(NSURLConnection *)connection didFailWithError:(NSError *) error {

  [self setRetryGetData];

  NSLog(@" Receive Error ");

}


// Connection Receive Event

- (void) connection:(NSURLConnection *)connection didReceiveData:(NSData *) data {

  NSLog(@" Receiving............ ");

  [receiveData appendData:data];

}


// Connection Receive Finished

- (void) connectionDidFinishLoading : (NSURLConnection *) connection {

  NSLog(@" Receive Finished ");


  NSLog(@" Receive Data : %@", receiveData);

}

반응형
:

[IOS] - IOS System Version 정보 구하기, IOS 버전 구하기

IOS ( Object-C ) 2014. 7. 11. 10:38
반응형

NSString* version = [[UIDevice currentDevice] systemVersion];


NSLog(@"Version : %@", version);


return version;

반응형
: