iOS开发系列之常用自定义控件开发集—进度条Loading控件开发

在很多项目中,经常要进行网络请求操作而为了更好的用户体验和美观,我们需要定制开发网络加载控件,下面是自定义网络加载控件实现方式:
头文件UIView+WHC_Loading.h实现:

//
//  UIView+WHC_Loading.h
//  UIView+WHC_Loading
//
//  Created by 吴海超 on 15/3/25.
//  Copyright (c) 2015年 吴海超. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (WHC_Loading)

- (void)startLoading;

- (void)stopLoading;

- (void)startLoadingWithTxt:(NSString*)customTitle;

- (void)stopLoadingWithTxt;

- (void)startLoadingWithTxtUser:(NSString*)customTitle;

- (void)stopLoadingWithTxtUser;

- (void)startLoadingWithUser;

- (void)stopLoadingWithUser;

@end

源文件UIView+WHC_Loading.m实现方式:

//
//  UIView+WHC_Loading.m
//  UIView+WHC_Loading
//
//  Created by 吴海超 on 15/3/25.
//  Copyright (c) 2015年 吴海超. All rights reserved.
//

#import "UIView+WHC_Loading.h"
#define KWHC_LOADING_VIEW_SIZE (50.0)                 //显示不带提示文字view的尺寸
#define KWHC_FONT_SIZE (15.0)                         //默认字体大小
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值