generic function example code swift Generic means that “something that is general”. In programming, generic data type means that when we make a generic type that means we can use it as any other data type like Int, Float or String. For example, we need to swap to values. So, we will write a function… Read More »
Incrementer using nested function swift Swift provides nice feature of nested function. Here, in this example when we create a constant newIncrementer which refers to makeIncrement function that creates a copy of makeIncrement function. Amount we pass in it, is stored within that copy. copy of the total variable increases every time that function is… Read More »
//UIAlertView Yes and Cancel example code
UIAlertView *alert = [[UIAlertViewalloc] initWithTitle:
@"Exit iRemote ?"message:@"Do you really want to exit iRemote ?"
// optional - add more buttons:
- (void)alertView:(UIAlertView *)alertView
if (buttonIndex == 1)
// perform your code here on selecting Yes
Set up a segue in your storyboard by giving an appropriate identifier – Click on the segue (left panel) and then click on Attributes (right panel) This will perform the pushing the viewcontroller to the next view. Here’s a sample to understand on clicking the button, perform the navigation.