Skip to content

Commit d1e73c8

Browse files
committed
Merge branch 'master' of github.com:Pixate/Titanium-Pixate
2 parents 8879799 + 5cc9ce4 commit d1e73c8

File tree

1 file changed

+15
-55
lines changed

1 file changed

+15
-55
lines changed

Pixate/Classes/ComPixateFrameworkModule.m

Lines changed: 15 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ -(NSString*)moduleId
5656
- (void)styleSheetFromFilePathWithOrigin:(id)args
5757
{
5858
ENSURE_SINGLE_ARG(args, NSDictionary);
59-
59+
6060
NSString *aFilePath = [TiUtils stringValue:[args valueForKey:@"filename"]];
6161
int origin = [TiUtils intValue:[args valueForKey:@"origin"]];
62-
62+
6363
PXStylesheet *pxs = [Pixate styleSheetFromFilePath:aFilePath withOrigin:origin];
64-
64+
6565
if([args valueForKey:@"monitor"] != nil)
6666
{
6767
[pxs setMonitorChanges:[TiUtils boolValue:[args valueForKey:@"monitor"]]];
@@ -71,10 +71,10 @@ - (void)styleSheetFromFilePathWithOrigin:(id)args
7171
- (void)styleSheetFromSourceWithOrigin:(id)args
7272
{
7373
ENSURE_SINGLE_ARG(args, NSDictionary);
74-
74+
7575
NSString *source = [TiUtils stringValue:[args valueForKey:@"source"]];
7676
int origin = [TiUtils intValue:[args valueForKey:@"origin"]];
77-
77+
7878
[Pixate styleSheetFromSource:source withOrigin:origin];
7979
}
8080

@@ -162,7 +162,7 @@ + (void)swizzleMethod:(SEL)orig_sel withMethod:(SEL)alt_sel
162162
Class c = self;
163163
Method origMethod = class_getInstanceMethod(c, orig_sel);
164164
Method altMethod = class_getInstanceMethod(c, alt_sel);
165-
165+
166166
if (class_addMethod(c, orig_sel, method_getImplementation(altMethod), method_getTypeEncoding(altMethod)))
167167
{
168168
class_replaceMethod(c, alt_sel, method_getImplementation(origMethod), method_getTypeEncoding(origMethod));
@@ -209,21 +209,21 @@ - (void)px_setLayoutInfo:(NSValue *)frame transform:(NSValue *)transform
209209
CGPoint origin_ = frame_.origin;
210210
CGSize size_ = frame_.size;
211211
CGAffineTransform transform_ = CGAffineTransformIdentity;
212-
212+
213213
[transform getValue:&transform_];
214-
214+
215215
if(CGAffineTransformIsIdentity(transform_) == NO) // && [self isKindOfClass:[UIView class]])
216216
{
217217
[self setTransform_:[[Ti2DMatrix alloc] initWithMatrix:CGAffineTransformIdentity]];
218218
}
219-
219+
220220
// use Ti API to get to proxy
221221
TiProxy *tiProxy = self.proxy;
222-
222+
223223
if([tiProxy isKindOfClass:[TiViewProxy class]])
224224
{
225225
TiViewProxy *viewProxy = (TiViewProxy *)tiProxy;
226-
226+
227227
// Use Ti API to set the 4 settings
228228
if(origin_.x != MAXFLOAT)
229229
{
@@ -246,7 +246,7 @@ - (void)px_setLayoutInfo:(NSValue *)frame transform:(NSValue *)transform
246246
// [proxy performSelector:@selector(setHeight:) withObject:[NSNumber numberWithFloat:context.height]];
247247
}
248248
}
249-
249+
250250
if(CGAffineTransformIsIdentity(transform_) == NO) // && [self isKindOfClass:[UIView class]])
251251
{
252252
[self setTransform_:[[Ti2DMatrix alloc] initWithMatrix:transform_]];
@@ -260,7 +260,7 @@ -(void)startup
260260
// this method is called when the module is first loaded
261261
// you *must* call the superclass
262262
[super startup];
263-
263+
264264
NSLog(@"[INFO] %@ loaded",self);
265265
}
266266

@@ -269,12 +269,12 @@ -(void)shutdown:(id)sender
269269
// this method is called when the module is being unloaded
270270
// typically this is during shutdown. make sure you don't do too
271271
// much processing here or the app will be quit forceably
272-
272+
273273
// you *must* call the superclass
274274
[super shutdown:sender];
275275
}
276276

277-
#pragma mark Cleanup
277+
#pragma mark Cleanup
278278

279279
-(void)dealloc
280280
{
@@ -291,44 +291,4 @@ -(void)didReceiveMemoryWarning:(NSNotification*)notification
291291
[super didReceiveMemoryWarning:notification];
292292
}
293293

294-
#pragma mark Listener Notifications
295-
296-
-(void)_listenerAdded:(NSString *)type count:(int)count
297-
{
298-
if (count == 1 && [type isEqualToString:@"my_event"])
299-
{
300-
// the first (of potentially many) listener is being added
301-
// for event named 'my_event'
302-
}
303-
}
304-
305-
-(void)_listenerRemoved:(NSString *)type count:(int)count
306-
{
307-
if (count == 0 && [type isEqualToString:@"my_event"])
308-
{
309-
// the last listener called for event named 'my_event' has
310-
// been removed, we can optionally clean up any resources
311-
// since no body is listening at this point for that event
312-
}
313-
}
314-
315-
#pragma Public APIs
316-
317-
-(id)example:(id)args
318-
{
319-
// example method
320-
return @"hello world";
321-
}
322-
323-
-(id)exampleProp
324-
{
325-
// example property getter
326-
return @"hello world";
327-
}
328-
329-
-(void)setExampleProp:(id)value
330-
{
331-
// example property setter
332-
}
333-
334294
@end

0 commit comments

Comments
 (0)