SORU
30 NİSAN 2010, Cuma


Nasıl bir UİView ve onların subviews ve onların subviews tüm subviews döngü miyim

Nasıl bir UİView ve onların subviews ve onların subviews tüm subviews döngü miyim?

CEVAP
30 NİSAN 2010, Cuma


Özyineleme kullanımı:

// UIView HierarchyLogging.h
@interface UIView (ViewHierarchyLogging)
- (void)logViewHierarchy;
@end

// UIView HierarchyLogging.m
@implementation UIView (ViewHierarchyLogging)
- (void)logViewHierarchy
{
    NSLog(@"%@", self);
    for (UIView *subview in self.subviews)
    {
        [subview logViewHierarchy];
    }
}
@end

// In your implementation
[myView logViewHierarchy];

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • HSmasteryoda .

    HSmasteryoda

    22 Ocak 2010
  • Microsoft Help & Training Videos

    Microsoft He

    31 Mart 2009
  • Study with Substance P

    Study with S

    31 Mayıs 2008