IOS开发基础之微博项目第1天-OC版

IOS开发基础之微博项目第1天-OC版

纯代码创建的项目,具有参考价值
该资料来自2014年7月3号,虽然时间过去较长,但是oc和swift不同,oc语法迭代更新慢
具有一定的参考意义
涉及xib加载,纯代码创建页面,导航控制器,类分类,PCH,宏定义,封装,UITableView的使用,代理,源码在我的主页下,名称是 04-WeiBo-OneDay-OC_Version.zip在这里插入图片描述
核心源码

//
//  AppDelegate.m
//  01-WeiBo-CreateFramework
//
//  Created by 鲁军 on 2021/4/18.
//
#import "AppDelegate.h"
#import "HMTabBarViewController.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
   
    self.window = [[UIWindow alloc] init];
    self.window.frame = [UIScreen mainScreen].bounds;
    self.window.rootViewController = [[HMTabBarViewController alloc] init];
    [self.window makeKeyAndVisible];
    return YES;
}
@end

PCH文件

#define HMRandomColor [UIColor colorWithRed:arc4random_uniform(256)/255.0 green:arc4random_uniform(256)/255.0 blue:arc4random_uniform(256)/255.0 alpha:1.0]

#define IOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)

#import "UIView+Extension.h"
#import "UIBarButtonItem+Extension.h"


#ifdef DEBUG //调试状态。打开LOG功能
#define HMLog(...) NSLog(__VA_ARGS__)
#else//发布状态关闭LOG功能
#define HMLog(...)
#endif
//
//  HMNavigationController.m
//  01-WeiBo-CreateFramework
//
//  Created by 鲁军 on 2021/4/18.
#import "HMNavigationController.h"
@interface HMNavigationController ()
@end
@implementation HMNavigationController
- (void)viewDidLoad {
   
    [super viewDidLoad];
}
+(void)initialize{
   
    UIBarButtonItem *appearance = [UIBarButtonItem appearance];
    NSMutableDictionary *textAttr = [NSMutableDictionary dictionary];
    textAttr[NSForegroundColorAttributeName] = [UIColor orangeColor];
    textAttr[NSFontAttributeName] = 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值