uitableview - Programmatically "flashing" UITableViewCell sets background color to white -


मेरे पास UILongPressGestureRecognizer मेरे UICollectionView में सेट है जो कॉल करता है

<पूर्व> - (शून्य) लंबे समय से दबाएं: (UILongPressGestureRecognizer *) इशारा {यदि (gesture.state == UIGestureRecognizerStateBegan) {CGPoint बिंदु = [संकेत स्थानःदृश्य: self.collectionView]; NSIndexPath * indexPath = [self.collectionView सूचकांक PathForItemAtPoint: बिंदु]; अगर (इंडेक्सपाथ) {self.manager.currentLongPressIndex = indexPath.row; [आत्म शो पोपोवर]; }}}

विधि से दिखाए गए UIPopover एक UITableView है। मेरा लक्ष्य है "फ्लैश" (चयन करें और फिर UITableViewCell को अचयनित करें) और इसे दिखाने के लिए स्क्रॉल करें ऐसा मैं कैसे करता हूं:

  - (शून्य) दृश्यडिडलोड {[सुपर व्यूडिडलोड]; // मौजूदा इंडेक्स पथ NSIndexPath * path = [NSIndexPath indexPathForRow: self.manager.currentLongPressIndex मेंविशेषता प्राप्त करें: 0]; // सेट फ्लैग self.cellIs फ्लैशिंग = हाँ; // चयन सेल [self.tableView selectRowAtIndexPath: पथ एनिमेटेड: हाँ स्क्रॉलपोजिशन: UITableViewScrollPositionMiddle]; } - (शून्य) तालिकादृश्य: (UITableView *) तालिकादृश्य किया था SelectionRowAtIndexPath: (NSIndexPath *) indexPath {यदि (self.cellIsFlashing == नहीं) {[self.viewController.collectionView scrollToItemAtIndexPath: indexPath atScrollPosition: UICollectionViewScrollPositionTop एनिमेटेड: हाँ]; } और {self.cellIs फ्लैशिंग = नहीं; } [सेल्फ डॉट्सव्यूज़ डिससेल्ट राउट इंडेक्सपाथ: इंडेक्सपाथ एनिमेटेड: हाँ]; }  

यह प्रकार काम करता है, लेकिन चयनित सेल का पृष्ठभूमि रंग सफेद में बदलता है और फ्लैश प्रभाव अच्छा नहीं लगता है, ऐसा लगता है कि यह बिल्कुल एनिमेटेड नहीं है।

यहां छवि विवरण दर्ज करें

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -