我有这个真正悬而未决的问题..在网上查找这个问题后,我带你好运..
我有一个UITextView
从url获取字符串。
但是......文本字段在第一行的第一行被剪切/隐藏,只有当我触摸它时才会固定。
这是代码:
- (NSString *)getMonthValues{
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@",URL_ADDRESS2,URL_MONTH_ZODIAC]];
NSString *Value = [[NSString alloc] initWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
Value = [Value stringByReplacingOccurrencesOfString:@"\\n" withString:@"\n"];
}
-(void)getMonthValue{
NSString *horoscope_daily = [self getMonthValues];
[Month_horoscope setText:[NSString stringWithFormat:@"%@",horoscope_daily]];
}
有人可以解释一下这个问题并帮我修复一下吗?
答案 0 :(得分:0)
要么1)被其他视图覆盖,要么2)框架太小而无法看到整个文本。
要查看封面问题,请尝试在所有其他可见视图上将背景属性设置为[UIColor redColor]。
如果是框架问题,请在之后设置文本,发出:
[Month_horoscope sizeToFit];