![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IOS UI基础
文章平均质量分 66
LONG_IOS
IOS
展开
-
UIStepper
- (void)creatUIStepper{ UIStepper *stepper = [[UIStepper alloc] init]; stepper.tag = 10; stepper.center = CGPointMake(160, 240); stepper.minimumValue = 1; //设置最小值 stepper.ma原创 2015-08-26 16:11:18 · 417 阅读 · 0 评论 -
iOS手势
iOS点击手势UITapGestureRecognizer :- (void)viewDidLoad{ [super viewDidLoad]; UIImageView *imgview = [[UIImageView alloc]initWithFrame:CGRectMake(80, 200, 150, 150)]; imgview.image = [UIIma原创 2015-08-27 16:33:03 · 671 阅读 · 0 评论 -
UItextField
UItextField相关代码如下:- (void)creatUItextField{ UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(120.0f, 80.0f, 150.0f, 30.0f)]; [textField setBorderStyle:UITextBorder原创 2015-08-26 16:26:43 · 377 阅读 · 0 评论 -
UIPageControl以及滚动视图定时滚动
UIPageControl以及滚动视图定时滚动的相关代码如下:#import "TRRootViewController.h"#import "TRSubViewController.h"#define SCROLL_W 320#define SCROLL_H 568 @interface TRRootViewController ()@property(nonatomic,st原创 2015-08-27 15:33:49 · 462 阅读 · 0 评论 -
iOS刷新控件UIRefreshControl
iOS刷新控件UIRefreshControl相关代码如下:-(void)createUITabelView{ self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 568) style:UITableViewStylePlain]; self.tableView.delegate原创 2015-08-27 15:41:22 · 565 阅读 · 0 评论 -
ios UIAlertView
ios UIAlertView相关代码如下:- (IBAction)clicked:(id)sender{ UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"提示" message:@"请输入球队名称" delegate:self cancelButtonTitle:@"取消" otherButtonTitles原创 2015-09-06 18:07:24 · 396 阅读 · 0 评论 -
ios tableView基本属性一:
ios tableView基本属性一://返回的section数- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ return 2;}//返回每个section的行数- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSe原创 2015-09-06 10:15:55 · 589 阅读 · 0 评论 -
UITableView基本属性二:编辑模式
UITableView基本属性二 ://设置分区头-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ if (0 == section) { return @"男员工"; }else{ return @"女员工"原创 2015-09-06 14:29:29 · 619 阅读 · 0 评论 -
ios webView 加载本地html5
ios webView 加载本地html5 UIWebView *webView=[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; [self.view addSubview:webView]; NSString *filePath = [[NSBu原创 2015-09-17 09:52:54 · 1068 阅读 · 0 评论 -
UINavigationController 以及 UITabBarController
UITabBarController相关代码如下:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen m原创 2015-08-27 14:24:41 · 332 阅读 · 0 评论 -
UISlider滑块
UISlider相关代码如下:- (void)creatUISlider{ UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(0, 0, 200, 20)]; //初始化 slider.minimumValue = 0;//指定可变最小值 slider.maximumValue = 100;//指原创 2015-08-26 16:43:46 · 482 阅读 · 0 评论 -
UITextView
UITextView相关代码如下:- (void)viewDidLoad { [super viewDidLoad]; self.textView = [[UITextView alloc] initWithFrame:self.view.frame]; //初始化大小并自动释放 self.textView.textColor = [UIColor black原创 2015-08-27 11:50:48 · 432 阅读 · 0 评论 -
UISwitch
UIswitch相关代码如下:- (void)creatUIswitch{ UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectMake(54.0f, 16.0f, 100.0f, 28.0f)]; switchView.on = YES; //设置初始为ON [switchVi原创 2015-08-26 16:18:37 · 379 阅读 · 0 评论 -
XIB
xib相关代码如下:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] boun原创 2015-08-26 10:43:43 · 591 阅读 · 0 评论 -
UISegmentedControl
UISegmentedControl相关代码如下:- (UISegmentedControl *)creatUISegmentedControl{ _segmentControl=[[UISegmentedControl alloc]initWithItems:@[@"待发货",@"待收货"]]; _segmentControl.segmentedControlStyle =原创 2015-08-27 10:22:57 · 289 阅读 · 0 评论 -
iOS导航页
iOS导航引导页相关代码如下:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen]原创 2015-08-27 15:25:40 · 411 阅读 · 0 评论 -
视图跟着点击的手势移动
视图跟着点击的鼠标移动,鼠标点击那里,绿色的视图就移动到那里#import "TRRootAViewController.h"@interface TRRootAViewController ()@property(nonatomic,strong)UIView *greenview;@end@implementation TRRootAViewController- (void原创 2015-08-27 10:56:02 · 533 阅读 · 0 评论 -
iOS导航栏
相关代码如下:- (void)viewDidLoad{ [super viewDidLoad]; //设置导航左边按钮 UIBarButtonItem *leftbutton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemRewind target:self act原创 2015-08-27 14:11:04 · 423 阅读 · 0 评论 -
iOS滚动视图UIScrollView
iOS滚动视图相关代码如下:#import "TRRootAViewController.h"#import "TRrootBViewController.h"#define SCROLL_W 320#define SCROLL_h 568-64@interface TRRootAViewController ()@property (nonatomic,strong)UIScro原创 2015-08-27 15:13:07 · 546 阅读 · 0 评论 -
UIButton
UIButton相关代码如下: UIButton *fistBt = [[UIButton alloc] initWithFrame:CGRectMake(10, 130, SCREEN_WIDTH/2 - 25, 40)]; [fistBt.layer setCornerRadius:5]; [fistBt setTitle:@"取消" forS原创 2015-08-27 09:36:45 · 305 阅读 · 0 评论 -
UIlabel
UIlabel代码如下://创建uilabelUILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(20, 40, 280, 80)];//设置背景色label1.backgroundColor = [UIColor grayColor];//设置taglabel1.tag = 91;//设置标签文本label1.原创 2015-08-27 09:23:14 · 420 阅读 · 0 评论