Skip to content

Instantly share code, notes, and snippets.

Daniel Gray null-loop

  • Bournemouth
Block or report user

Report or block null-loop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@null-loop
null-loop / savemp3.m
Last active Dec 19, 2015
Saving MP3 to Documents folder in iOS
View savemp3.m
- (IBAction)saveRingtoneButtonClicked:(UIButton *)sender {
m_saveRingtoneButtonLowlighted = false;
m_saveRingtoneButtonHighlighted = true;
[self animateSaveRingtoneButton];
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,true);
NSString* sourceFilePath = [[NSBundle mainBundle] pathForResource:[m_activeClip.mp3 componentsSeparatedByString:@"."][0] ofType:@"mp3"];
NSData* mainBundleFile = [NSData dataWithContentsOfFile:sourceFilePath];
@null-loop
null-loop / PanoramaHandling
Created Jun 19, 2013
Having to add this to pages that host panoramas to work around this bug - https://connect.microsoft.com/VisualStudio/feedback/details/772715/wp8-panorama-using-itemssource-does-not-keep-track-of-selectedindex - what's the point of data binding if it's not universal? Basically you can't databind a panorama control in WP8 and expect it to work - 7…
View PanoramaHandling
public void WirePanorama(ObservableCollection<Screen> topNavItems)
{
Dispatcher.BeginInvoke(() =>
{
Panorama.Items.Clear();
foreach (var pi in topNavItems.Select(CreatePanoramaItemForViewModel))
{
Panorama.Items.Add(pi);
}
You can’t perform that action at this time.