forked from catch/TED-iPhone-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CatchNotesLauncher.m
executable file
·375 lines (343 loc) · 15.8 KB
/
CatchNotesLauncher.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
/*Copyright 2011 Catch.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/
//
// CatchNotesLauncher.m
//
// Created by Jeff Meininger on 8/2/10. Modified By Peter Ma. Updated by Jon Dukes-Schlossberg.
// Copyright 2011 Catch.com, Inc. All rights reserved.
//
#import "CatchNotesLauncher.h"
NSString *aboutHTML = @"<html>"
"<head>"
"<style type=\"text/css\">"
""
"* { margin:0; padding:0; }"
"p { margin:5px 0 10px 0; }"
""
"html, body {"
" height: 100%;"
" font-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\", sans-serif;"
" color: gray;"
" text-shadow: white 1px 1px 1px;"
" background-color: whitesmoke;"
"}"
""
"#header {"
" background-color: rgb(10, 31, 46);"
" -webkit-box-shadow: rgb(148, 148, 148) 0px 0px 8px;"
" background-color: rgb(10, 31, 46);"
" border-bottom: 2px solid rgb(24, 77, 112);"
" -webkit-gradient(linear, 0% 0%, 0% 100%, from(#11364F), to(#0A1F2E), color-stop(0,#11364F));"
" position: fixed;"
" top: 0;"
" left: 0;"
" width: 100%;"
" -webkit-box-shadow: rgb(68, 68, 68) 0px 0px 8px;"
" text-shadow: none;"
" padding: 10px 0px;"
" height: 31px;"
" z-index: 1;"
"}"
""
"#header .logo {"
" margin-left: 5px;"
" float: left;"
" border: none;"
" height: 31px;"
"}"
""
"#main {"
" padding-top: 65px;"
" width:90%;"
" margin-left:auto;"
" margin-right:auto;"
"}"
""
".form-title {"
" padding-left: 10px;"
"}"
""
"div.box {"
" -webkit-border-bottom-left-radius: 5px 5px;"
" -webkit-border-bottom-right-radius: 5px 5px;"
" -webkit-border-top-left-radius: 5px 5px;"
" -webkit-border-top-right-radius: 5px 5px;"
" -webkit-box-shadow: rgba(0, 0, 0, 0.160156) 0px 2px 5px;"
" background-color: white;"
" margin: 8px auto auto;"
" margin-left: auto;"
" margin-right: auto;"
" padding: 20px;"
"}"
""
"div.box .label {"
" font-size: 1em;"
" font-weight: bold;"
"}"
""
"div.box div {"
" margin-bottom:12px;"
"}"
"div.box div.label {"
" margin-bottom:3px;"
"}"
""
"button {"
" border: 0;"
" border-bottom: 1px solid rgba(0,0,0,0.25);"
" border-bottom: 1px solid #222;"
" outline: 0;"
" margin: 0;"
" margin-top: 5px;"
" padding: 9px 10px 10px;"
" display: inline-block;"
" padding: 8px 14px 9px;"
" color: #fff;"
" background-color:#909090;"
" text-decoration: none;"
" font-size: 1.1em;"
" font-weight: bold;"
" text-shadow: 0 -1px 1px #222;"
" line-height: 1;"
" -moz-border-radius: 5px;"
" -webkit-border-radius: 5px;"
" -moz-box-shadow: 0 1px 3px #999;"
" -webkit-box-shadow: 0 1px 3px #999;"
" position: relative;"
" cursor: pointer;"
" -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);"
" -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);"
" text-shadow: 0 -1px 1px rgba(0,0,0,0.25);"
"}"
""
"button.appStore {"
" background-color: #91bd09;"
"}"
""
"</style>"
"</head>"
""
"<body>"
""
"<div id=\"header\"> "
"<div class=\"logo\"> "
"</div> "
"<div class=\"logo\"> "
"<img class=\"logo\" src=\"data:image/png;base64,"
"iVBORw0KGgoAAAANSUhEUgAAAE8AAAAkCAYAAADIB2cfAAAKRGlDQ1BJQ0MgUHJvZmlsZQAAeAGd"
"lndUFNcXx9/MbC+0XZYiZem9twWkLr1IlSYKy+4CS1nWZRewN0QFIoqICFYkKGLAaCgSK6JYCAgW"
"7AEJIkoMRhEVlczGHPX3Oyf5/U7eH3c+8333nnfn3vvOGQAoASECYQ6sAEC2UCKO9PdmxsUnMPG9"
"AAZEgAM2AHC4uaLQKL9ogK5AXzYzF3WS8V8LAuD1LYBaAK5bBIQzmX/p/+9DkSsSSwCAwtEAOx4/"
"l4tyIcpZ+RKRTJ9EmZ6SKWMYI2MxmiDKqjJO+8Tmf/p8Yk8Z87KFPNRHlrOIl82TcRfKG/OkfJSR"
"EJSL8gT8fJRvoKyfJc0WoPwGZXo2n5MLAIYi0yV8bjrK1ihTxNGRbJTnAkCgpH3FKV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wk1zClCmtOM1d9DSzuDf2Jx+APBzz6ibGVyMa0eYbmdMJgzKblzkCGgFi7vw/u0dU5p3MC"
"4yw9gn/wfqR4omqkVjLuooeWU47kAiTcKRj77iBIZAr7szO9VPEsmc09cHY5kt5C2IUX4Ymay7is"
"o/PQwEotg2E5PMbah2z5DTCiZN+fYN9cFImFZNuY70e6vBtJoqWzTC3YTNAdDWXD99xOklVDbn7k"
"lJdHPXqyE05qPhwVpFEawVfQY4qo5uoiA/X0CUjxio0OywmSBLRO2zpmyfavGk9OOuDORC1Oog8M"
"n9mGlot5IVkjKQroUMhgo2k1f0MQYyacYR3ZI0s/0j7RjkR6gVSv5dVWljGLxpMUO9mnfEpcv1am"
"as/tJsybexInIl5S7WvZ/HCQLL3xknBA6kg+BY487k7iGCIukxFZHrncgQjg8U1eVJLFkRN1BYoC"
"R/pVGfFTQGJgHPcp+TImgZQxawsQCotVs1oeS+Iyqi4BVhFLvb4qm/0mIjfWosOIqECxaEeUNNZ6"
"v/c6IKq83prCKqHqjY76bixrfK9Xl+fh/IY+f6dcQJFUq3OELJIv48rzvdJMZe9Vn6NwGP7p3Dsd"
"TiYHqEj4INGWFDOmF9HrUh+ueDy+EARBRjDjvwNoBl+8NyeVLVFw6KHlPWElAlhixOT/LQQ/ge7j"
"iwe8goXOf96hIae3L2qVnd/+d4zWiWQOJvp/GHonfropk13vuIYpm+XDWlOvdbw+SSBhnAA3GE5v"
"f3rkwF3cEdFbMv8WmlzZHm37ZnLxIvT8hek6a0hQm21ie328gsZ5i+KJZWTY7xW16g4Cd+cXb/d2"
"EC9x8SqRmawjCDJ953qtq0tHMjBV27jGcXw3fGj93FZ//ccYJUTxprsBjxp4khMD2FD28essCCi1"
"VXW43Zil7nFdLDZOUiMIvwWhKw6nq0iZOwAAAABJRU5ErkJggg=="
"\" />"
"</div>"
"</div><!-- header -->"
" <div id=\"main\"> "
" <h2>Capture what matters</h2>"
" <div class=\"box\">"
" <div class=\"label\">Save all your snippets</div>"
" <div>Notes, images, ideas, to-dos, numbers, names, links, locations, recipes, articles - in one place.</div>"
" "
" <div class=\"label\">With you wherever you go</div>"
" <div>Free syncing with iPhone, and iPad, and other devices, lets you keep your important notes by your side.</div>"
" </div>"
" <br />"
" <center><button class=\"appStore\" onclick=\"window.location='itms-apps://itunes.apple.com/us/app/3banana-notes/id355424047?mt=8'\">Get Catch Notes - It's Free!</button><br />"
" <button class=\"cancel\" onclick=\"window.location='cocoa://cancel/'\">No, Thanks</button></center>"
" </div><!-- main -->"
""
"</body>"
"</html>";
@implementation CatchNotesLauncher
+ (void)openURL:(NSURL*)url fromViewController:(UIViewController*)viewController
{
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
} else {
NSAssert([viewController isKindOfClass:[UIViewController class]],
@"The viewController parameter must be a valid UIViewController.");
CatchNotesLauncher *aboutCatcnNotes = [[CatchNotesLauncher alloc] init];
[viewController presentModalViewController:aboutCatcnNotes animated:YES];
[aboutCatcnNotes release];
}
}
+ (void)createNewNoteWithText:(NSString*)text cursorAt:(NSInteger)offset
bounceOnSave:(NSString*)saveUri bounceOnCancel:(NSString*)cancelUri
fromViewController:(UIViewController*)viewController
{
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:
@"catch://notes/new?text=%@&cursor_at=%i&bounce_on_save=%@&bounce_on_cancel=%@",
[text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
offset,
[saveUri stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
[cancelUri stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
[self openURL:url fromViewController:viewController];
}
+ (void)createNewNoteWithText:(NSString*)text
fromViewController:(UIViewController*)viewController
{
NSURL *url = [NSURL URLWithString:[NSString
stringWithFormat:@"catch://notes/new?text=%@",
[text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
[self openURL:url fromViewController:viewController];
}
+ (void)showNotesMatchingText:(NSString*)text
fromViewController:(UIViewController*)viewController
{
NSURL *url = [NSURL URLWithString:[NSString
stringWithFormat:@"catch://notes/search?text=%@",
[text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
[self openURL:url fromViewController:viewController];
}
+ (void)showNotesWithTag:(NSString*)tag
fromViewController:(UIViewController*)viewController
{
NSURL *url = [NSURL URLWithString:[NSString
stringWithFormat:@"catch://notes/tag?name=%@",
[tag stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
[self openURL:url fromViewController:viewController];
}
- (void)loadView
{
UIWebView *webView = [[UIWebView alloc] init];
webView.delegate = self;
self.view = webView;
[webView release];
[webView loadHTMLString:aboutHTML baseURL:nil];
}
- (void)dealloc
{
[super dealloc];
}
- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request
navigationType:(UIWebViewNavigationType)navigationType
{
NSURL *url = [request URL];
if ([[url absoluteString] isEqualToString:@"cocoa://cancel/"]) {
//[self.parentViewController dismissModalViewControllerAnimated:YES];
[self dismissModalViewControllerAnimated:YES];
return NO;
} else if ([[url scheme] isEqualToString:@"itms-apps"]) {
[[UIApplication sharedApplication] openURL:url];
return NO;
}
return YES;
}
@end