|
|
|
|
|
|
|
|
self.stack.alignment = 0; |
|
|
self.stack.alignment = 0; |
|
|
self.oldCountOfDevices = -100; |
|
|
self.oldCountOfDevices = -100; |
|
|
self.queued = NO; |
|
|
self.queued = NO; |
|
|
self.clipsToBounds = NO; |
|
|
|
|
|
|
|
|
|
|
|
[self setMinimumZoomScale:1]; |
|
|
[self setMinimumZoomScale:1]; |
|
|
[self setMaximumZoomScale:1]; |
|
|
[self setMaximumZoomScale:1]; |
|
|
|
|
|
|
|
|
if(self.oldCountOfDevices == -100) { |
|
|
if(self.oldCountOfDevices == -100) { |
|
|
self.oldCountOfDevices = [devices count] + 1; |
|
|
self.oldCountOfDevices = [devices count] + 1; |
|
|
} |
|
|
} |
|
|
|
|
|
for(KAIBatteryCell *cell in self.stack.subviews) { |
|
|
|
|
|
[cell updateInfo]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(!self.isUpdating && self.oldCountOfDevices != 0 && ([devices count] + 1 == self.oldCountOfDevices || [devices count] - 1 == self.oldCountOfDevices || [devices count] == self.oldCountOfDevices)) { |
|
|
if(!self.isUpdating && self.oldCountOfDevices != 0 && ([devices count] + 1 == self.oldCountOfDevices || [devices count] - 1 == self.oldCountOfDevices || [devices count] == self.oldCountOfDevices)) { |
|
|
//if(!self.isUpdating) { |
|
|
//if(!self.isUpdating) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[self setContentSize:self.stack.frame.size]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
-(void)layoutSubviews { |
|
|
-(void)layoutSubviews { |