iOS gets the Cell object where the button is located, note: iOS8 iOS7 get the difference between a Cell object

Source: Internet
Author: User

iOS7:

iOS7 under Button.superview.superview. Superview is the cell where the button is obtained

NSLog (@ "2:cell----%@", button.superview.superview.superview);

2014-10-07 10:23:55.583 neihanshe[1407:60b] 2:cell----<Radiocell:0x155849d0; BaseClass = UITableViewCell; frame = (0 0; 320 70); AutoResize = W; Layer = <CALayer:0x1552af80>>

iOS7 under Button.superview.superview is not a cell object to get

NSLog (@ "2:cell----%@", button.superview.superview);

2014-10-07 10:22:37.993 neihanshe[1396:60b] 2:cell----<uitableviewcellscrollview:0x17d2d2e0; frame = (0 0; 320 70); AutoResize = w+h; Gesturerecognizers = <NSArray:0x17d2d200>; Layer = <calayer:


iOS8:

iOS8 Button.superview.superview.superview Get the uitableviewwrapperview object, so click on different cells but get the memory equal, there will be a problem

NSLog (@ "2:cell----%@", Button.superview.superview.superview

2014-10-07 10:27:07.903 neihanshe[2791:1186272] 2:cell----<uitableviewwrapperview:0x1663bbf0 ; frame = (0 0; 320 528); Gesturerecognizers = <NSArray:0x1663bb10>; Layer = <CALayer:0x1663bbc0>; Contentoffset: {0, 0}; Contentsize: {528}>,

2014-10-07 10:27:09.617 neihanshe[2791:1186272] 2:cell----<uitableviewwrapperview:0x1663bbf0 ; frame = (0 0; 320 528); Gesturerecognizers = <NSArray:0x1663bb10>; Layer = <CALayer:0x1663bbc0>; Contentoffset: {0, 0}; Contentsize: {528}>,


iOS8 under Button.superview.superview is the cell that gets the button.

NSLog (@ "2:cell----%@", button.superview.superview);

2014-10-07 10:20:50.813 neihanshe[2775:1184682] 2:cell----<Radiocell:0x16ed6a30; BaseClass = UITableViewCell; frame = (0 0; 320 70); AutoResize = W; Layer = <CALayer:0x16ea5fc0>>

2014-10-07 10:20:52.321 neihanshe[2775:1184682] 2:cell----<Radiocell:0x16ed6b44; BaseClass = UITableViewCell; frame = (0 0; 320 70); AutoResize = W; Layer = <CALayer:0x16ea5fc0>>

iOS Gets the cell object where the button is located, note: iOS8 iOS7 get the difference between the Cell object

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.