-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathADAMAnnotation.m
More file actions
38 lines (34 loc) · 864 Bytes
/
ADAMAnnotation.m
File metadata and controls
38 lines (34 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// ADAMAnnotation.m
// ADAM - Ausbau der Digitalisierung im Anlagenmanagement
//
// Created by Jonathan Lucas Fritz on 16.08.16.
// Copyright © 2016 NOSCIO. All rights reserved.
//
#import "ADAMAnnotation.h"
@implementation ADAMAnnotation
- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent*)event
{
UIView* hitView = [super hitTest:point withEvent:event];
if (hitView != nil)
{
[self.superview bringSubviewToFront:self];
}
return hitView;
}
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent*)event
{
CGRect rect = self.bounds;
BOOL isInside = CGRectContainsPoint(rect, point);
if(!isInside)
{
for (UIView *view in self.subviews)
{
isInside = CGRectContainsPoint(view.frame, point);
if(isInside)
break;
}
}
return isInside;
}
@end