ios - Animating Subview's Frame In A UIScrollView -


मेरे पास क्षैतिज UIScrollView के अंदर एक सबव्यूव है।

उपव्यू के फ्रेम जब ऊर्ध्वाधर UISwipeGestureRecognizer ट्रिगर किया जाता है तब परिवर्तन होता है।

हालांकि, यदि उपयोगकर्ता गलती से तिरछे स्वाइप करता है, तो सबव्यू का फ्रेम वास्तव में नहीं बदलता।

ठीक है, तकनीकी रूप से यह करता है, लेकिन आप बहुत तेज़ फ्लैश देख सकते हैं - जहां आप इसे बदलते हैं, लेकिन फिर तुरंत अपने मूल फ्रेम में वापस जाएं

पेजिंग सक्षम है - तो क्या यह वर्तमान पृष्ठ के स्थान पर वापस चला जाता है?

मैं कैसे उपज की फ़्रेम को बदलने के लिए (वापस वापस बिना) कैसे प्राप्त करूं?

मैंने कई विकल्पों का उपयोग करने की कोशिश की है जैसे कि UIViewAnimationOptionAllowUserInteraction | | UIViewAnimationOptionLayoutSubviews। वर्तमान में मैं animateWithDuration: देरी: विकल्प: एनीमेशन: पूरा होने पर कॉल करता हूं जब एक ऊर्ध्वाधर स्वाइप पंजीकृत है

आपको अपनी विधि के अंत में CGRectMake का उपयोग करने की कोशिश करनी चाहिए।

  subview.frame = CGRectMake (x, y, width, height);    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -