我正在处理我的旧项目,其中包含一个xib文件。我有一个按钮,可以将UIImageview
的位置更改为0,0,但它不起作用且标签保持在其初始位置。当我使用完全相同的代码创建新项目时,它期望它包含一个mainStoryboard.Storyboard它工作正常。我想它与xib文件和文件所有者有关。
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)Action1:(id)sender {
imageview.center = CGPointMake(0, 0);
}