ios - UIViewAnimation Increase the memory -


In my project I have implemented a ticker animation that applies scroll text horizontally.

My problem occurs when I go

  - (empty) scrollTheBreakingNews {if (isTicker) is {self.ticker.text =}, then another view controller Memory begins to increase continuously.  

textToScroll; If (! Paus ticker) {if (isTicker) {NSAttributedString * str = [[NSAttributedString alloc] initWithString: textToScroll]; CGSize text size = [SR size]; If (iticaker) {float period = (text size.white + self ticker vii.fr. size.width) / 65.0f; Float startX = 0.0f; Float endx = 0.0f; If (IsTicker) {self.ticker.frame = scrollLabelFrame; If (IsTicker) {startx = self.tickerView.frame.size.width; Endx = -textSize.width; If (iticator) {self.ticker.frame = CGRectMake (initial X, 0.0f, text system.asp, 25.0f); [UIView Start Permissions: @ "" Reference: Zero]; [UIView Set Animation Crow: UIViewAnimationCurveLinear]; [UIView Set Animation Duration: Period]; [UIView Set Delegate Animation: self]; [UIView Set AnimationDesettop Selector: @Selector (TickerStop)]; If (ITCAR) {CGTTicker TickerFrame = Self. Ticker.frame; TickerFrame.orine.x = Andx; If (hatayakar) {[self-twick setframe: tickerframe]; [UIView commitAnimations]; }}}}}}}}}} - (empty) tickerstop {if (hacker) {if (! Paus ticker) {[self scrolling news]; }} And {textToScroll = zero; }}

The memory is like this:

 Enter image description here

Please help me solve it. Any suggestions appreciated. Thanks in advance

OK, first thing ... Wow, you need to improve code style is. / P>

Lem has to go to.

Secondly, stop using that old style animation code also has the docs not to use it since iOS 4.0.

  - (zero) scrollTheBreakingNews {// You are already checking that there is a ticker / not block block in it no more than seven times to check it again. If (hatayakar) {self.ticker.text = textToScroll; If (! Paus ticker) {NSAttributedString * str = [[NSAttributedString alloc] initWithString: textToScroll]; CGSize text size = [SR size]; Float period = (see text size.width + self. Ticker frame.ize.width) / 65.0f; Float startX = 0.0f; Float endx = 0.0f; Self.ticker.frame = scrollLabelFrame; StartX = self.tickerView.frame.size.width; Endx = -textSize.width; Self.ticker.frame = CGRectMake (initial X, 0.0f, text system. Wd, 25.0f); CGRect TickerFrime = self.ticker.frame; TickerFrame.orine.x = AndX; [UIView animateWithDuration: Duration of the period: 0.0 Option: UIViewAnimationOptionsCurveLinear Animation: ^ () {self.ticker.frame = tickerFrame} Closing: ^ (BOOL Finish) {[Self-tickerstop]; }]; }}} - (zero) TickerSop {if! (Paus ticker and ITecer) {[Self scrolling news]; } Other {textToScroll = Zero; }}   

For memory issues, I had to figure out which part of the code is causing problems by profiling the app using the tool.

Do you think there will be any improvement in memory usage? Probably, but not 100% fixed on that.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -