-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMergeSortViewController.m
More file actions
68 lines (51 loc) · 1.97 KB
/
Copy pathMergeSortViewController.m
File metadata and controls
68 lines (51 loc) · 1.97 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// MergeSortViewController.m
// Educrest
//
// Created by Angie Wang on 7/13/13.
// Copyright (c) 2013 Macroft. All rights reserved.
//
#import "MergeSortViewController.h"
@interface MergeSortViewController ()
@end
@implementation MergeSortViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
// NSString *title;
// NSString *image;
// UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(25, 25, 275, 40)];
// label.text = @"Bubble sort: \n This algorithm sweeps through the array, and swaps \n two elements if they are out of order.";
// label.lineBreakMode = UILineBreakModeWordWrap;
// label.numberOfLines = 0;
// [self.view addSubview:label];
NSString *path = [[NSBundle mainBundle] pathForResource: @"mergesort" ofType:@"gif"];
NSURL *url = [NSURL fileURLWithPath:path isDirectory:NO];
/* Load the request. */
[_myWebView loadRequest:[NSURLRequest requestWithURL:url]];
// _titleLabel.text = text;
_subLabel.text = @"Merge Sort: an algorithm \n that is both simple and fast. \n It splits the array in half,\n recursively sorts each half,\n and then merges the two halves together.";
_subLabel.lineBreakMode = UILineBreakModeWordWrap;
_subLabel.numberOfLines = 0;
[_subLabel setFont: [UIFont fontWithName:@"OpenSans-Bold" size: 36]];
_subLabel.textColor = [UIColor blackColor];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end