Skip to content

Instantly share code, notes, and snippets.

View rish2017's full-sized avatar

Rishiraj Kalra rish2017

View GitHub Profile
@rish2017
rish2017 / IOS screenShot Detection
Created May 30, 2015 12:28
ios screen shot detection
let mainQueue = NSOperationQueue.mainQueue()
NSNotificationCenter.defaultCenter().addObserverForName(UIApplicationUserDidTakeScreenshotNotification,
object: nil,
queue: mainQueue) { notification in
// executes after screenshot
}
@rish2017
rish2017 / Infinite scroll
Created May 30, 2015 11:33
Windows Phone infinite scrolling developed logic
XAML# : ItemRealized property of long list selector keeps a track of the items loaded in the UI disposable view of the Xaml Page
<phone:LongListSelector HorizontalAlignment="Stretch" x:Name="listSearchResult" Background="White" VerticalAlignment="Top" ScrollViewer.VerticalScrollBarVisibility="Disabled"SelectionChanged="lst_SearchResult_SelectionChanged" Visibility="Visible" Grid.ColumnSpan="2" Padding="0 0 0 0" ManipulationStarted="lst_SearchResult_ManipulationStarted" ItemRealized="lst_SearchResult_ItemRealized" >
C#:
private void lst_SearchResult_ItemRealized(object sender, ItemRealizationEventArgs e)
{
SearchViewModel searchItem = new SearchViewModel();
searchItem = e.Container.Content as SearchViewModel;