RSS

Team Foundation Express Beta Arrives!

Just installed the beta of Team Foundation Express which is free for up to 5 users. I had been looking at the other free alternatives but would prefer TFS. Will let you know how I get on with it.

 
Leave a comment

Posted by on April 24, 2012 in Uncategorized

 

Xcode 4 help iOS development

Over the past week I have been trying out the recent new release of Xcode version 4. I had read all the usual hype about this release and was prepared to be disappointed. Actually it is a great improvement in both ease of use and new functionality. I will try to report on just what these improvements mean in terms of greater productivity in the coming weeks.

 
Leave a comment

Posted by on May 26, 2011 in Objective-C

 

Mango release will invigorate Windows Phone 7 Platform

Yesterday Microsoft lifted the lid on the upcoming Mango release of it’s Windows Phone 7 Operating System version 7.1. It boasts over 500 new features to help both users and developers push the platform forward. I won’t give you a run down of all these new features as they are best discovered by viewing the web cast at the Windows Phone 7 Press office website. What I will say is that the new release is both exciting and daunting to developers in equal measures. There is a lot to get to grips with in this release and although in the long term this investment in time may well pay off, the platform is yet to reach a reasonable market share. A lot will be hoping Mango invigorates sales along with the possible introduction of new models from Nokia and Samsung later this year. Overall my impression of Mango is a positive one, and I will be experimenting with a lot of the new features using the newly released development tools in the coming weeks.

 
Leave a comment

Posted by on May 26, 2011 in Windows 7 Mobile

 

Windows Phone 7 App Under Pressure in the Marketplace

My new app for the Windows Phone 7 platform went on sale just before Xmas. I had a few problems to sort out to get approval but have learned a lot in the process. It’s very important to test your app against the light and dark theme on the actual phone to ensure all text is readable. Work is now underway on more applications for both the iPhone and Windows Phone 7. Hope to have some new Apps published in January.

 
Leave a comment

Posted by on January 15, 2011 in Windows 7 Mobile

 

New windows phone 7 app submitted

My next app for windows phone 7 called Under Pressure has been submitted . Hope to hear soon .

 
Leave a comment

Posted by on December 5, 2010 in Windows 7 Mobile

 

OS4 Installed

Just downloaded and installed iPhone SDK 4.0.1 and looking forward to exploring the new features.

 
Leave a comment

Posted by on July 27, 2010 in MonoTouch

 

MonoTouch Tip #3 – Moving the View

Following on from Tip #2, this tip describes how to move the view to ensure that when a user touches down on a text box it will remain visible. By default the Keyboard uses up about half the screen area. If your text box was positioned within this area it would automatically become covered by the Keyboard. To avoid this first set up the TextFieldShouldReturn event in the ViewDidLoad OverRide. This code assumes you have a textbox called txtBox on your view placed in the bottom half of your view to show the scrolling effect.

//Add these variables to your view class...
float scrollamount = 0.0f;
float bottomPoint = 0.0f;
bool moveViewUp = false;

//Modify the ViewDidLoad OverRide...
public override void ViewDidLoad ()
{
base.ViewDidLoad ();

this.txtBox.ShouldReturn += TextFieldShouldReturn;
}

private bool TextFieldShouldReturn (UITextField tf)
{
tf.ResignFirstResponder ();
if (moveViewUp) { ScrollTheView(false); }
return true;
}

I have kept the TextFieldShouldReturn function generic so it can handle any text box in the view. To calculate and scroll up the view we need to add code to the Keyboard Notification handler we created in Tip #2.


private void KeyboardUpNotification (NSNotification notification)
{
ResetTheView();

RectangleF r = UIKeyboard.BoundsFromNotification(notification);

if(this.txtBox.IsEditing)
{
//Calculate the bottom of the Texbox
//plus a small margin...

bottomPoint = (this.txtBox.Frame.Y + this.txtBox.Frame.Height + yOffset);

//Calculate the amount to scroll the view
//upwards so the Textbox becomes visible...
//This is the height of the Keyboard -
//(the height of the display - the bottom
//of the Texbox)...

scrollamount = (r.Height - (View.Frame.Size.Height - bottomPoint));
}

//Check to see whether the view
//should be moved up...

if (scrollamount > 0)
{
moveViewUp = true;
ScrollTheView(moveViewUp);
}
else moveViewUp = false;
}

private void ResetTheView()
{
UIView.BeginAnimations(string.Empty, System.IntPtr.Zero);
UIView.SetAnimationDuration(0.3);

RectangleF frame = View.Frame;
frame.Y = 0;
View.Frame = frame;
UIView.CommitAnimations();
}

So what’s going on here. In the KeyboardUpNotification handler we call the ResetTheView method to ensure the view is always reset to the default position on the screen. We then get the Keyboard bounds to calculate the scroll amount for the text box which is in editing mode. Next we need to create the ScrollTheView method to increase or decrease the Y axis of the view and animate the scroll.

private void ScrollTheView(bool movedUp)
{
//To invoke a views built-in animation behaviour,
//you create an animation block and
//set the duration of the move...
//Set the display scroll animation and duration...

UIView.BeginAnimations(string.Empty, System.IntPtr.Zero);
UIView.SetAnimationDuration(0.3);

//Get Display size...
RectangleF frame = View.Frame;

if (movedUp) {
//If the view should be moved up,
//subtract the keyboard height from the display...

frame.Y -= scrollamount;
}
else {
//If the view shouldn't be moved up, restore it
//by adding the keyboard height back to the original...

frame.Y += scrollamount;
}

//Assign the new frame to the view...
View.Frame = frame;

//Tell the view that your all done with setting
//the animation parameters, and it should
//start the animation...

UIView.CommitAnimations();

}

This code assumes you have a textbox called txtBox on your view placed in the bottom half of your view to show the scrolling effect.

 
2 Comments

Posted by on May 12, 2010 in MonoTouch

 
 
Follow

Get every new post delivered to your Inbox.