我有一個UIView,我在其上加載我的圖像視圖作爲子視圖。當我沒有設置錨點時,圖像顯示,但每當我設置錨點圖像不顯示。我也添加了QUARTZCore框架的工作。當我設置定位點時,我的圖像不加載
我加入我的代碼如下
CGRect apprect=CGRectMake(0, 0, 1024, 768);
UIView *containerView = [[UIView alloc] initWithFrame:apprect1];
containerView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:containerView];
handleView1= [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"large.gif"]];
[handleView1 setAlpha:1];
//[handleView1 setFrame:CGRectMake(390, 172.00, 56.00, 316.00)];
handleView1.userInteractionEnabled = YES;
handleView1.layer.anchorPoint=CGPointMake(490.0, 172.0);
[containerView addSubview:handleView1];
非常感謝你尼克韋弗。非常感謝。 – Lena 2011-05-11 07:37:09