The question arises about the weak self, blocks and saves the cycle.
In the book, I understand that we need to use weakly in blocks. The question is when?
for example, simple animation code, never contains weaknesses.
i.e
self.myView.alpha = 1.0; [UIView animateWithDuration:0.2 animations:^{ self.myView.alpha = 1.0; }];
is this code ok? or should I create a weakness in front of the block and use it inside?
In all my code and in all other projects that I have ever worked on, I have never seen a single line that uses a weak me. Now I am trying to use weakness in every block. it's just that I'm not sure it is necessary
Waiting for your feedback. Thanks.
, weakSelf , (, ). weakSelf, , ( , ).
weakSelf
, . , . , , , , . , , , , , .
, weakSelf , , , , . , weakSelf .
animateWithDuration, , , .
animateWithDuration
selfs, .
, foo bar. foo self. - foo, . foo bar bar, foo . Foo , , , bar, . , , - foo. , , .
UIView , animate:, UIView .
ARC , . . , , , .
, .
Source: https://habr.com/ru/post/1534833/More articles:Can exe and assembly work on different versions of the .NET framework? - c #Converting an 8-bit number to hex in z80 assembler - decimalCustom Message Type Integration with E-Commerce (Woocommerce o others) - WORDPRESS - posthttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1534831/what-is-the-minimum-number-of-steps-to-get-full-javadoc-support-with-the-new-default-project-options&usg=ALkJrhhvX10s4659boLtI2KaOlylzZdgkAСохранить и загрузить Guava Необязательный S в MongoDB с помощью Spring -Data - javaGet function from string containing full name - pythonTYPO3 cannot enable htmlArea RTE - content-management-systemAndroid EditText forcibly uses numeric keypad but allows non-numeric characters - androidpython embedded in server without loading css - pythonDifference between CDialog and CDialogEx - visual-c ++All Articles