This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<byte[]> Download() | |
{ | |
var httpClient = new HttpClient(); | |
var randomUri = UriManager.LoadRandomUri(); | |
Task<byte[]> contentsTask = httpClient.GetByteArrayAsync(randomUri); | |
return await contentsTask; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by json2csharp.com/# | |
public class Features | |
{ | |
public int conditions { get; set; } | |
} | |
public class Response | |
{ | |
public string version { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const string url = @"http://api.wunderground.com/api/72002fc4632c2927/conditions/q/27519.json"; | |
async static void RetrieveData() | |
{ | |
try | |
{ | |
string contents; | |
string Url = String.Format(url); | |
HttpClient client = new HttpClient(); | |
contents = await client.GetStringAsync(url); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewWillLayoutSubviews | |
{ | |
//scrollView.frame | |
statusIndicator.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); | |
//Main Form | |
float fTop = 0.0; float fLeftIndent = 20.0; | |
float fFieldHeight = 60.0; float fCheckboxX = 275.0; | |
float fCheckboxSide = 35.0; float fLeftIndentRightColumn = 125.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)awakeFromNib { | |
self.playButton.layer.hidden = YES; | |
_playButtonTapped = NO; | |
} | |
- (void)setFeedItem:(PFObject *)feedItem { | |
_feedItem = feedItem; | |
PFUser *user = [feedItem objectForKey:@"user"]; | |
[_usernameButton setTitle:user.username | |
forState:UIControlStateNormal]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error { | |
NSString *alertTitle = nil; | |
NSString *alertMessage = nil; | |
NSString *alertOkButtonText = @"Ok"; | |
switch (result) { | |
case MFMailComposeResultSent:{ | |
alertTitle = @"Message Sent"; | |
alertMessage = @"Your message has been sent"; | |
break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
@interface ViewController () <CLLocationManagerDelegate> | |
@end | |
@implementation ViewController{ | |
NSString *currentLongitude; | |
NSString *currentLatitude; | |
NSString *googleMapsURL; |