예제 #1
0
 @Override
 public void setFrame(CGRect frame) {
   super.setFrame(frame);
   frame.origin.x = 0;
   frame.origin.y = 0;
   if (title != null) title.setFrame(frame);
   if (fore != null) fore.setFrame(frame);
 }
예제 #2
0
 private void initForeground() {
   if (fore == null) {
     fore = new UIImageView();
     if (imagefills) fore.setContentMode(UIViewContentMode.ScaleToFill);
     else fore.setContentMode(UIViewContentMode.Center);
     CGSize size = getFrame().size;
     fore.setFrame(new CGRect(0, 0, size.width, size.height));
     addSubview(fore);
   }
 }