有人可以帮我将NSObject转换为NSString吗?
我正在尝试做这样的事情 -
NSString *address = [NSString stringWithFormat:ivpObj.addressStr];
Run Code Online (Sandbox Code Playgroud)
但我得到了一个警告 - 格式不是字符串文字,也没有格式参数
请一些帮助
在主视图中,我在UITableView另一个视图下面,textInputView包含a UITextField和a UIButton.
向上移动UIView包含UITextField,UIButton当键盘显示不起作用时.
-(void)animateTextField:(UITextField*)textField up:(BOOL)up
{
const int movementDistance = -224; // tweak as needed
const float movementDuration = 0.3f; // tweak as needed
int movement = (up ? movementDistance : -movementDistance);
[UIView beginAnimations: @"animateTextField" context: nil];
[UIView setAnimationBeginsFromCurrentState: YES];
[UIView setAnimationDuration: movementDuration];
textInputView.frame = CGRectOffset(textInputView.frame, 0, movement);
[UIView commitAnimations];
}
- (void)textFieldDidBeginEditing:(UITextField *)textField{
[self animateTextField:textField up:YES];
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
[self animateTextField:textField up:NO];
}
Run Code Online (Sandbox Code Playgroud)
如果我用self.view它替换textInputView …