Image Picker From Library IOS

Drag ImageView to storyboard and reference it to ViewController with name "imageView" Copy a code below -(void) registerTapOnImageView: (BOOL) enable{     if(enable == YES){         UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapOnImageView)];         singleTap.numberOfTapsRequired = 1;         [_imageView setUserInteractionEnabled:YES];         [_imageView addGestureRecognizer:singleTap]; … Đọc tiếp Image Picker From Library IOS

Advertisements

Beginer Objective-c keys

key gợi nhớ mã lệnh trong objective-c ( phục vụ mục đích cá nhân 😀 ) Macros: lệnh đơn độc #import <Foundation/Foundation.h> #define PI 3.14159 #define RAD_TO_DEG(radians) (radians * (180.0 / PI)) Typedef: tạo 1 cấu trúc mới hoặc tái tạo cấu trúc cũ typedef unsigned char ColorComponent; ColorComponent red = 255; NSLog(@" %hhu”,red); Struct: … Đọc tiếp Beginer Objective-c keys

Convert Solar To Lunar Calendar Android

here is a code of how to convert solar calendar to lunar calendar with android   import java.util.*; /** * Created by dat on 09/07/2015. */ public class ChinaCalendar { final float PI = 3.14f; private int mDay; private int mMonth; private int mYear; private int mTimeZone = 8; private long mJulius; public int mLunarDay; … Đọc tiếp Convert Solar To Lunar Calendar Android