-
Notifications
You must be signed in to change notification settings - Fork 3
/
BKAlertView.m
53 lines (37 loc) · 1.27 KB
/
BKAlertView.m
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// BKAlertView.m
// BonjourKit
//
// Created by Takayoshi Sato on 2009/07/27.
// Copyright 2009 Takayoshi Sato. All rights reserved.
//
#import "BKAlertView.h"
@implementation BKAlertView
@dynamic delegate;
- (id)initWithTitle:(NSString *)aTitle {
if (aTitle == nil) {
aTitle = [[UIDevice currentDevice] name];
}
self = [super initWithTitle:aTitle message:@"\n\n\n\n\n\n" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:nil];
if (self) {
browser = [[BKBrowserViewController alloc] initWithTitle:nil showDisclosureIndicators:NO showCancelButton:NO frame:CGRectMake(11, 50, 261, 120)];
browser.ownName = aTitle;
//UILabel *bodyTextLabel;
//object_getInstanceVariable(self, "_bodyTextLabel", (void **)&bodyTextLabel);
//[browser.view setFrame:[bodyTextLabel bounds]];
//[bodyTextLabel addSubview:[browser view]];
[self addSubview:browser.tableView];
}
return self;
}
- (BOOL)searchForServicesOfType:(NSString *)type inDomain:(NSString *)domain {
return [browser searchForServicesOfType:type inDomain:domain];
}
- (id<BKBrowserViewControllerDelegate>)delegate {
return [browser delegate];
}
- (void)setDelegate:(id<BKBrowserViewControllerDelegate>)aDelegate {
[super setDelegate:aDelegate];
[browser setDelegate:aDelegate];
}
@end