123456789101112131415161718192021222324252627282930313233 |
- #import "NSLayoutConstraint+MT.h"
- #import <objc/runtime.h>
- @implementation NSLayoutConstraint (MT)
- + (void)load{
-
- Method imp = class_getInstanceMethod([self class], @selector(initWithCoder:));
- Method myImp = class_getInstanceMethod([self class], @selector(myInitWithCoder:));
- method_exchangeImplementations(imp, myImp);
- }
- - (id)myInitWithCoder:(NSCoder*)aDecode
- {
- [self myInitWithCoder:aDecode];
- if (self){
- if(![self.identifier isEqualToString:@"1314"])
- {
- self.constant = kNumFrom375(self.constant);
- }
- }
- return self;
- }
- @end
|