记录下来,以防止再犯错
代码如下
NSString *userHeader = [userInfoDictionary objectForKey:@"photo"]; NSMutableString *mutableuserHeader = [NSMutableString stringWithString:userHeader]; //设置用户头像 NSRange range = [mutableuserHeader rangeOfString:@".."]; [mutableuserHeader replaceCharactersInRange:range withString:@"video"]; NSMutableString *userHeaderInfo = [Port stringByAppendingString:mutableuserHeader];
红色字体部分出现的题目中的警告,经查实解决办法是把
NSMutableString换成
NSString这样问题便迎刃而解~
iOS 笔记-incompatible pointer types initializing 'NSMutableString *' with an expression of type 'NSString *'警告处理
时间: 2024-10-29 19:09:56