Skip to content

Commit f264d11

Browse files
박용권박용권
박용권
authored and
박용권
committed
내가 왜 이슈를 닫았을까? 버그가 아닐까? 엉엉 ㅠㅠ
1 parent c03607a commit f264d11

10 files changed

+1634
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// LaodanPageViewController.h
3+
// PerformSelectorHomework
4+
//
5+
// Created by 박용권 on 11. 8. 14..
6+
// Copyright 2011 __MyCompanyName__. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
12+
@interface LaodanPageViewController : UIViewController <UIWebViewDelegate> {
13+
14+
UIActivityIndicatorView* _activityIndicator;
15+
UIView* _activityIndicatorBg;
16+
UIWebView* _webView;
17+
18+
}
19+
20+
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView* activityIndicator;
21+
@property (nonatomic, retain) IBOutlet UIView* activityIndicatorBg;
22+
@property (nonatomic, retain) IBOutlet UIWebView* webView;
23+
24+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
//
2+
// LaodanPageViewController.m
3+
// PerformSelectorHomework
4+
//
5+
// Created by 박용권 on 11. 8. 14..
6+
// Copyright 2011 __MyCompanyName__. All rights reserved.
7+
//
8+
9+
#import "LaodanPageViewController.h"
10+
11+
12+
@interface LaodanPageViewController ()
13+
- (void)loadLaodanGithub;
14+
@end
15+
16+
17+
@implementation LaodanPageViewController
18+
19+
@synthesize activityIndicator = _activityIndicator;
20+
@synthesize activityIndicatorBg = _activityIndicatorBg;
21+
@synthesize webView = _webView;
22+
23+
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
24+
/*
25+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
26+
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
27+
if (self) {
28+
// Custom initialization.
29+
}
30+
return self;
31+
}
32+
*/
33+
34+
- (void)viewDidLoad {
35+
[super viewDidLoad];
36+
37+
self.title = @"라오단 깃헙 페이지";
38+
39+
40+
// 화면 로딩 중 표시.
41+
[_activityIndicator startAnimating];
42+
[_activityIndicatorBg setHidden:NO];
43+
44+
45+
// 기텁 화면 바로 보여줘!
46+
// [self loadLaodanGithub];
47+
48+
49+
// 0초후에 기텁 화면 보여줘!
50+
[self performSelector:@selector(loadLaodanGithub) withObject:nil afterDelay:0];
51+
}
52+
53+
- (void)loadLaodanGithub {
54+
NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://github.com/codeport/ios"]];
55+
56+
NSError* error = nil;
57+
NSURLResponse* response = nil;
58+
59+
// 라오단 깃헙 페이지 요청
60+
NSData* recvData = [NSURLConnection sendSynchronousRequest:request
61+
returningResponse:&response
62+
error:&error];
63+
// 웹뷰에 요청결과 반영
64+
[_webView loadData:recvData
65+
MIMEType:nil
66+
textEncodingName:nil
67+
baseURL:nil];
68+
69+
// 화면 로딩 중 끄기.
70+
[_activityIndicator stopAnimating];
71+
[_activityIndicatorBg setHidden:YES];
72+
}
73+
74+
- (void)didReceiveMemoryWarning {
75+
// Releases the view if it doesn't have a superview.
76+
[super didReceiveMemoryWarning];
77+
78+
// Release any cached data, images, etc. that aren't in use.
79+
}
80+
81+
- (void)viewDidUnload {
82+
[super viewDidUnload];
83+
// Release any retained subviews of the main view.
84+
// e.g. self.myOutlet = nil;
85+
}
86+
87+
88+
- (void)dealloc {
89+
[super dealloc];
90+
}
91+
92+
93+
@end

0 commit comments

Comments
 (0)