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

  • colacas

    colacas

    29 EKİM 2006
  • LaKe Lightroom Tutorials

    LaKe Lightro

    22 Temmuz 2014
  • Mark Halberstadt

    Mark Halbers

    19 ŞUBAT 2010