125 #ifdef DEBUG |
125 #ifdef DEBUG |
126 if ([[NSFileManager defaultManager] fileExistsAtPath:DEBUG_FILE()]) |
126 if ([[NSFileManager defaultManager] fileExistsAtPath:DEBUG_FILE()]) |
127 debugStr = [[NSString alloc] initWithContentsOfFile:DEBUG_FILE()]; |
127 debugStr = [[NSString alloc] initWithContentsOfFile:DEBUG_FILE()]; |
128 else |
128 else |
129 debugStr = [[NSString alloc] initWithString:@"Here be log"]; |
129 debugStr = [[NSString alloc] initWithString:@"Here be log"]; |
130 UITextView *scroll = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)]; |
130 UITextView *scroll = [[UITextView alloc] initWithFrame:self.view.frame]; |
131 scroll.text = debugStr; |
131 scroll.text = debugStr; |
132 [debugStr release]; |
132 [debugStr release]; |
133 scroll.editable = NO; |
133 scroll.editable = NO; |
134 scroll.alpha = 0; |
134 scroll.alpha = 0; |
135 |
135 |
136 UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; |
136 UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; |
137 [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; |
137 [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; |
138 [btn addTarget:btn action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; |
138 [btn addTarget:btn action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; |
139 btn.frame = CGRectMake(self.view.frame.size.height-58, -6, 64, 64); |
139 btn.frame = CGRectMake(self.view.frame.size.width-58, -6, 64, 64); |
140 btn.backgroundColor = [UIColor blackColor]; |
140 btn.backgroundColor = [UIColor blackColor]; |
141 btn.titleLabel.textColor = [UIColor whiteColor]; |
141 btn.titleLabel.textColor = [UIColor whiteColor]; |
142 btn.titleLabel.textAlignment = UITextAlignmentCenter; |
142 btn.titleLabel.textAlignment = UITextAlignmentCenter; |
143 btn.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize]]; |
143 btn.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize]]; |
144 [btn setTitle:@"Close" forState:UIControlStateNormal]; |
144 [btn setTitle:@"Close" forState:UIControlStateNormal]; |