![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
object-c
camel_4197
这个作者很懒,什么都没留下…
展开
-
oc中的字符串学习
//// main.m// text7//// Created by 骆超 on 2020/3/3.// Copyright © 2020 luochao.com. All rights reserved.//#import <Foundation/Foundation.h>int main(int argc, const char * argv[]) {...原创 2020-03-10 18:39:06 · 175 阅读 · 0 评论 -
oc中的for循环
// 一般性的遍历// for (int i = 0; i<week.count; i++){// NSLog(@"day: %@",week[i]);// } // 使用for-in语句的遍历// for(NSString *day in week){// ...原创 2020-03-02 12:48:55 · 974 阅读 · 0 评论 -
object-c中反斜杠换行写字符串
NSString *greeting = @"hello, object-c"; NSString *greeting2 = @"hello,\ object-c"; NSString *greeting3 = @"hello," " object-c"; NSLog(@"\n%@\n%@\n%@",greeting,greetin...原创 2020-02-01 17:19:26 · 656 阅读 · 0 评论 -
object-c中的基本数据类型转换
float floatNumber = 3.14; int intNumber = (int)floatNumber; NSLog(@"floatNumber = %.2f",floatNumber); NSLog(@"intNumber = %d",intNumber); //float类型被转...原创 2020-02-01 16:26:59 · 311 阅读 · 0 评论 -
各基本数据类型所占用的内存空间大小
代码如下所示 NSLog(@"Storage size of char : %d \n" , sizeof(char)); NSLog(@"Storage size of unsigned char : %d \n" , sizeof(unsigned char)); NSLog(@"Storage size of signed char : %...原创 2020-02-01 15:45:47 · 1268 阅读 · 0 评论