1

I want to get an image fixed between the animation, so it doesn't move when the app slides to right. A bit like the background of a UINavBar, I couldn't find anyone who tried it earlier so I would really like to know.

Thanks in advance

Sjors

sjors
  • 117
  • 1
  • 2
  • 10

1 Answers1

1

As a response on your last comment, here is how to do this:

UIView * hoi = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
hoi.backgroundColor = [UIColor blackColor];
UIWindow * window = [UIApplication sharedApplication].keyWindow;
[window addSubview:hoi];

Alternatively you create add a second UIWindow to which you can add your subviews. As is nicely explained in this answer: https://stackoverflow.com/a/2671148/262691

Community
  • 1
  • 1
Wolfert
  • 974
  • 6
  • 12
  • Yes, you could put this in the viewDidLoad method of the viewController in which you want to show it at first. – Wolfert Dec 20 '12 at 16:42
  • It does work for me. Alternatively you could create a second UIWindow to attach subviews, I will update my answer – Wolfert Dec 20 '12 at 16:50