내가 다른 view
에 view
을 만들어 왼쪽으로 이동 label
형태로 오른쪽을 한 문제는 숨기는 방법 .. label
전체 view
에 이동하고 난 단지 MAINVIEW에 두 번째 view
하지에 보여주고 싶은 것입니다 특정에서 label
그 view
?? 여기 내 코드특정 UIView에서 라벨을 숨기시겠습니까?
- (void)viewDidLoad {
[super viewDidLoad];
self.movelabel = [[UILabel alloc]initWithFrame:CGRectMake(200, 0, 200, 30)];
self.movelabel.text = @"This is my music line";
[self.moveview addSubview:self.move];
[NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(LabelAnimation) userInfo:nil repeats:YES];
}
-(void)LabelAnimation
{
[UIView animateWithDuration:3.0f delay:0.0f options:UIViewAnimationOptionTransitionNone animations:^{
self.move.frame = CGRectMake(-200, 0, 200, 60);
} completion:^(BOOL finished)
{
self.move.frame = CGRectMake(200, 0, 200, 60);
}];
}
고마워요. self.move가
첫 번째 확인 어디에서 모두 표시했는지 보여줍니다. 당신이 보여주고 싶은이 뷰에 lable을 추가해야합니다. 아마 당신은 메인 뷰가 transperent이므로 서브 뷰의 레이블을 보여 주어야합니다. –
나는 하나의 노래에서 음악 페이지를 연주하고있다. 나는 두 번째보기에서 오른쪽에서 왼쪽으로 그 노래 이름을 움직여서 그 노래의 이름을 viewrs로 보여주고 싶지만 두 번째보기뿐만 아니라 메인보기도 얻고있다. – Garry
왜 그렇지 않은가? 이것을 사용하십시오 : https://github.com/cbpowell/MarqueLabel –