Einzelnen Beitrag anzeigen

jensw_2000
(Gast)

n/a Beiträge
 
#4

AW: XE5 + iOS: AnimationDelegate und Selector für AnimationDidStopSelector erstellen?

  Alt 5. Feb 2014, 08:36
Unter dem Strich muss es am Ende doch etwa so aussehen ...
Delphi-Quellcode:
interface
  TmyViewController = class(TIrgendwasFMXUIViewControllerWrap&Pizza)
  private
    procedure viewDidAppear(..);
    procedure myAnimation1DidStop(const finished: NSInteger); message 'myAnimation1DidStop:';
    procedure myAnimation2DidStop(const finished: NSInteger); message 'myAnimation2DidStop:';
    procedure myAnimation3DidStop(const finished: NSInteger); message 'myAnimation3DidStop:';

  public
  end;

implementation

procedure TmyViewController.viewDidAppear() // oder was auch immer Du als Trigger zum Starten der ersten Animation nimmst ..
var lSEL: Die_FXM_SELECTOR_Klasse;
begin
  lSEL := sel_registerName( PChar( 'myAnimation1DidStop:'));
  self.View.setAnimationDelegate(self);
  self.View.setAnimationDidStopSelector(lSEL);

  // hier die erste Animation starten
end;

procedure TmyViewController.myAnimation1DidStop(const finished: NSInteger);
var lSEL: Die_FXM_SELECTOR_Klasse;
begin
  lSEL := sel_registerName( PChar( 'myAnimation2DidStop:'));
  self.View.setAnimationDelegate(self);
  self.View.setAnimationDidStopSelector(lSEL);

  // und die 2. Animation starten
end;


procedure TmyViewController.myAnimation2DidStop(const finished: NSInteger);
var lSEL: Die_FXM_SELECTOR_Klasse;
begin
  lSEL := sel_registerName( PChar( 'myAnimation3DidStop:'));
  self.View.setAnimationDelegate(self);
  self.View.setAnimationDidStopSelector(lSEL);

  // und die 3. Animation starten
end;

procedure TmyViewController.myAnimation3DidStop(const finished: NSInteger);
var lSEL: Die_FXM_SELECTOR_Klasse;
begin
  run(do_nothing_loop);
end;
  Mit Zitat antworten Zitat