Monthly Archives: November 2012

56 posts

Windows 8 Development – Adding Controls XAML Part 3 – StackPanel Textblocks

We have almost added all the controls we will be using, and will now be adding more child controls StackPanel's are very easy to add controls to, in that they will automatically handle sizing for us. In this video, I will show you how to add content controls to a StackPanel. References XAML Navigation, Layout, Views – http://msdn.microsoft.com/en-us/library/windows/apps/jj215600.aspx

Windows 8 Development – Adding Controls Part 2 – XAML Add Image

We have added the first controls needed for our photo viewer page, and now we need to add the main Image control. We will not, however just be adding a single control. To give all the functionality desired, we need to place the Image control in a container, the StackPanel. In this video, I will show you how to add a StackPanel container and child controls. References XAML Navigation, Layout, Views – http://msdn.microsoft.com/en-us/library/windows/apps/jj215600.aspx

Working with UIPickerView class in iOS

The UIPickerView class implements objects, called picker views, that use a spinning-wheel or slot-machine metaphor to show one or more sets of values. Users select values by rotating the wheels so that the desired row of values aligns with a selection indicator. The UIDatePicker class uses a custom subclass of UIPickerView to display dates and times. To see an example, tap the add ("+") button in the the Alarm pane of the Clock application. The user interface provided by a picker view consists of components and rows. A component is a wheel, which has a series of items (rows) at indexed locations on the wheel. Each component also has an indexed location (left to right) in a picker view. Each row on a component has content, which is either a string or a view object such as a label (UILabel) or an image (UIImageView). For more information, you can check the Apple's online Documentation at: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPickerView_Class/Reference/UIPickerView.html

Windows 8 Development – Adding XAML Controls Part 1

Previously we have added a grid to our Photo Page, and now we will be placing controls in that grid. When dropping new controls, it's important to realize that their initial configuration may not align with the design in your application. In ours too, we will be resetting some of the main properties to get the control to properly render in our grid. In this video, I will show you how to add a Button, and a TextBlock to a Grid. References XAML Navigation, Layout, Views – http://msdn.microsoft.com/en-us/library/windows/apps/jj215600.aspx

UIDatePicker customisation and IBAction methods

A UIDatePicker class allow us to customise the objects of its type. To do that, we have 4 options: UIDatePickerModeTime UIDatePickerModeDate UIDatePickerModeDateAndTime UIDatePickerModeCountDownTimer , which represent the values of an Enum type in the iOS SDK. Usually we do that in Xcode Interface Builder, if the date-pickers are created visually as well. When we interact with the UIDatePicker objects, we can call different event methods. The most common (which also comes as the default option when making the IBAction connection) is: "- (IBAction)datePickerValueChanged:(id)sender". If we want to get the value of the selected date and/or time from out picker in one of these methods, we can refer to the IBOutlet object or property if we have one, or we can change the parameter type from "id" to "UIDatePicker *", and then use the sender parameter-object (which is the actual UIDatePicker object). For more information, you can check the Apple's online Documentation at: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDatePicker_Class/Reference/UIDatePicker.html

Windows 8 Development – Adding A XAML Grid

Now that we've covered styling the App Bar, it's time to move onto inserting controls in the application workspace itself. A grid control is likely familiar to anyone who has developed with .NET, but the latest iteration of the control offers interaction familiar to both developers and users of graphical design products. Using these controls, we can quickly lay out an application, define dimensions, and start inserting our own controls specific to the application logic. In this video, I will show you how to add and configure a Grid to a Windows 8 XAML application. References XAML Navigation, Layout, Views – http://msdn.microsoft.com/en-us/library/windows/apps/jj215600.aspx

How to create a UIDatePicker in iOS

There are some situation when we have to give the users the possibility to enter a date. He may input some invalid characters over there. Therefore, iOS SDK provides us a special class that enables us to choose a date from many options, and it is named UIDatePicker. Any object of this class has a special method "date", which by default returns the current date and time in the following format: YYYY-MM-DD hh:mm:ss +0000 We can format this output as we want, but this is the default one. We may use the UIDatePicker class to give different options to choose either date or time, as you will see in the next lessons, we can customise its appearance. For more information, you can check the Apple's online Documentation at: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDatePicker_Class/Reference/UIDatePicker.html

VMWare View part 3

This video shows you last steps for vcenter server config in a windows based environment,please read what you are prompted to enter in the install process, it will save you a large amount of troubleshooting time . Use the embedded database unless you have an external one

VMWare View Part 2

This video shows you steps for VMWare View Installation, as you will need vCenter Server Windows based Installation for the whole set of View components, including the composer,security .... If you get any error about database users, just make sure that you apply AD policy, or Os policy concerning the password Complexity

VMWare View 5 part 1

This video demonstrates how to configure your system, and os requiements for VMWare View installation, such as active Directory, DNS ..... This steps are required for VDI using xenDesktop or VMWare View so pay attention to vmware.com prerequesites,meaning OS version,services that needs to be running and ports

Configuring View connection Server for desktops

Tihs video shows you how to configure basics for desktops connections, including requirements,vcenter binding,user management ... The thing to keep in mind is that you can use your virtual appliance for VMWare View but as some of the components require intallation within the same OS of the vcenter Server, you will get some limits

Working with UITableViewDelegate protocol in iOS

The delegate of a UITableView object must adopt the UITableViewDelegate protocol. Optional methods of the protocol allow the delegate to manage selections, configure section headings and footers, help to delete and reorder cells, and perform other actions. Many methods of UITableViewDelegate take NSIndexPath objects as parameters and return values. UITableView declares a category on NSIndexPath that enables you to get the represented row index (row property) and section index (section property), and to construct an index path from a given row index and section index (indexPathForRow:inSection: method). Because rows are located within their sections, you usually must evaluate the section index number before you can identify the row by its index number. One very important method is: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath and it used in Master-Detail applications, where we have a Main/Master view which contains a basic table with general information about the items that we want to display, and when we click on any of the items, it takes us to a Detailed view, which contains all the info about the selected item. For more, please visit Apple's online documnation at: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewDelegate_Protocol/Reference/Reference.html

How to create a custom cell programmatically in iOS

A cell in a UITableView is an object of UITableViewCell class, and can have one of four styles, which are: UITableViewCellStyleDefault, UITableViewCellStyleSubtitle, UITableViewCellStyleValue1, and UITableViewCellStyleValue2, and you can use those according to your app's specifications, or you can create your custom cells. In this video tutorial we will create a custom cell programmatically. For that we have to do most of our work in the "tableView:cellForRowAtIndexPath:" method. First we need a dataSource to populate the cell with info, so declare a private property for that, in the VieController.m file, just after the #import statement: @interface ViewController () @property (nonatomic, retain) NSMutableArray *dataSource; @end Then, in the viewDidLoad method allocate and initialise that: self.dataSource = [NSMutableArray array]; [self.dataSource addObject:[NSArray arrayWithObjects:@"20", @"JUN", @"7:00PM", @"Toyota Center", @"Houston, TX", @"FROM", @"$200", nil]]; [self.dataSource addObject:[NSArray arrayWithObjects:@"6", @"JUL", @"8PM", @"Frank Erwin Center", @"Austin, TX", @"FROM", @"$350", nil]]; In the "tableView:numberOfRowsInSection:" method return self.dataSource.count. In the "tableView:cellForRowAtIndexPath:" method write: // Each subview in the cell will be identified by a unique tag static NSUInteger const kDayLabelTag = 2; static NSUInteger const kMonthLabelTag = 3; // … and so on static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; UILabel *dayLabel; UILabel *monthLabel; // … and so on if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; cell.selectionStyle = UITableViewCellSelectionStyleNone; // Define the frames for each component of the Cell CGRect dayFrame = CGRectMake(5, 7, 64, 30); CGRect monthFrame = CGRectMake(5, 35, 64, 16); // … and so on // Adjust all the controls correspondingly dayLabel = [[UILabel alloc] initWithFrame:dayFrame]; dayLabel.tag = kDayLabelTag; dayLabel.font = [UIFont boldSystemFontOfSize:30.0f]; dayLabel.backgroundColor = [UIColor clearColor]; dayLabel.textColor = [UIColor darkGrayColor]; dayLabel.textAlignment = NSTextAlignmentCenter; monthLabel = [[UILabel alloc] initWithFrame:monthFrame]; monthLabel.tag = kMonthLabelTag; monthLabel.font = [UIFont boldSystemFontOfSize:16.0f]; monthLabel.backgroundColor = [UIColor clearColor]; monthLabel.textColor = [UIColor colorWithRed:0.0f/255.0f green:140.0f/255.0f blue:220.0f/255.0f alpha:1.0f]; monthLabel.textAlignment = NSTextAlignmentCenter; // … and so on // Add all created components to the new Cell [cell.contentView addSubview:dayLabel]; [cell.contentView addSubview:monthLabel]; // … and so on } else { // A reusable cell was available, so we just need to get // a reference to the subviews using their tags dayLabel = (UILabel *) [cell.contentView viewWithTag:kDayLabelTag]; monthLabel = (UILabel *) [cell.contentView viewWithTag:kMonthLabelTag]; } NSArray *cellInfoArray = [self.dataSource objectAtIndex:indexPath.row]; dayLabel.text = [cellInfoArray objectAtIndex:0]; monthLabel.text = [cellInfoArray objectAtIndex:1]; return cell;

Different types of UITableView cells in iOS

A cell in a UITableView is an object of UITableViewCell class, and can have one of four styles, which are: UITableViewCellStyleDefault, UITableViewCellStyleSubtitle, UITableViewCellStyleValue1, and UITableViewCellStyleValue2, and you can use those according to your app's specifications, or you can create your custom cells, which we will discuss later. All the cell styles (except UITableViewCellStyleDefault) allow us to specify a textLabel, and a detailTextLabel. We can also have an image on the left. For the right side, we can specify different accessory types, which are: UITableViewCellAccessoryNone, UITableViewCellAccessoryDisclosureIndicator, UITableViewCellAccessoryDetailDisclosureButton, and UITableViewCellAccessoryCheckmark. Each accessory type has its own meaning, and you have to check that in the Human Interface Guidelines provided by Apple. In case you use them for different meaning your app may get rejected. For more, please visit Apple's online documentation at: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html