Monday, January 2, 2012

iOS Development using MonoTouch Cookbook


Over 100 recipes for developing and deploying applications for the iOS using C# and .NET

  • Detailed examples covering every aspect of iOS development using MonoTouch and C#/.NET
  • Create fully working MonoTouch projects using step-by-step instructions.
  • Recipes for creating iOS applications meeting Apple's guidelines.

In Detail

MonoTouch brings the amazing revenue opportunities of Apple's billion dollar app store to C# and .NET developers.

This cookbook leaves no stone unturned, providing you with practical recipes covering user interfaces, data management, multimedia , web services, and localization, right through to application deployment on the app store.

Whatever the area of MonoTouch iOS development you need to know about, you will find a recipe for it in this cookbook. Minimum theory and maximum practical action defines this book. It is jam packed with recipes for interacting with the device hardware, like the GPS, compass and the accelerometer. Recipes for those all important real word issues are covered such as reading and responding to battery state. It is the essential cookbook for C# and .NET developers wanting to be part of the exciting and lucrative world of iOS development.

What you will learn from this book

  • Create applications specifically designed for the iPad.
  • Consume .NET web services, including WCF.
  • Capture and manage multimedia resources using the device's camera and microphone.
  • Use the accelerometer to capture and respond to device movements.
  • Create location-aware applications using the built-in GPS, compass and mapping features.
  • Create graphics and animation for powerful applications.
  • Effectively use multitasking features to provide a user-friendly experience.
  • Target worldwide audience with localization techniques and deploy to the App Store.

Approach

The book is written in a cookbook style, presenting examples in the style of recipes, allowing you to go directly to your topic of interest, or follow topics throughout a chapter to gain in-depth knowledge.



Sunday, January 1, 2012

CSS: Universal Selector

Universal selector is "*". The CSS rule in universal selector will be applied to all elements in the document.

Example:
<html>
<head>
<title>Mobile-Web-App</title>
<style>

#marketplace{
background-image: url("marketplace.png");
}
#live{
background-image: url("live.png");
}
#bugzilla{
background-image: url("bugzilla.png");
}
#forums{
background-image: url("forums.png");
}
#planet{
background-image: url("planet.png");
}
#wiki{
background-image: url("wiki.png");
}
#portal{
background-image: url("portal.png");
}

*{
height:50px;
background-repeat: no-repeat;
background-position: bottom right;
}
</style>
</head>
<body>

<h1>Mobile-Web-App: Universal Selector</h1>
<div id="marketplace">marketplace</div>
<div id="live">live</div>
<div id="bugzilla">bugzilla</div>
<div id="forums">forums</div>
<div id="planet">planet</div>
<div id="wiki">wiki</div>
<div id="portal">portal</div>

</body>
</html>

CSS: Universal Selector

CSS: ID Selector

ID selector begins with a '#'. It's a example:
<html>
<head>
<title>Mobile-Web-App</title>
<style>

#marketplace{
background-image: url("marketplace.png");
}
#live{
background-image: url("live.png");
}
#bugzilla{
background-image: url("bugzilla.png");
}
#forums{
background-image: url("forums.png");
}
#planet{
background-image: url("planet.png");
}
#wiki{
background-image: url("wiki.png");
}
#portal{
background-image: url("portal.png");
}

.placeBottomRight{
height:50px;
background-repeat: no-repeat;
background-position: bottom right;
}
</style>
</head>
<body>

<h1>Mobile-Web-App: CSS ID Selector</h1>
<div id="marketplace" class="placeBottomRight">marketplace</div>
<div id="live" class="placeBottomRight">live</div>
<div id="bugzilla" class="placeBottomRight">bugzilla</div>
<div id="forums" class="placeBottomRight">forums</div>
<div id="planet" class="placeBottomRight">planet</div>
<div id="wiki" class="placeBottomRight">wiki</div>
<div id="portal" class="placeBottomRight">portal</div>

</body>
</html>

CSS: ID Selector

Friday, December 30, 2011

CSS class name selector

Class name selector begins with a dot. It's a example:
<html>
<head>
<title>Mobile-Web-App</title>
<style>

.graybackground{
background-color: gray;
}
.marketplace{
background-image: url("marketplace.png");
}
.live{
background-image: url("live.png");
}
.bugzilla{
background-image: url("bugzilla.png");
}
.forums{
background-image: url("forums.png");
}
.planet{
background-image: url("planet.png");
}
.wiki{
background-image: url("wiki.png");
}
.portal{
background-image: url("portal.png");
}

.placeBottomRight{
height:50px;
background-repeat: no-repeat;
background-position: bottom right;
}
</style>
</head>
<body>

<h1>Mobile-Web-App: CSS selector by class name</h1>
<div class="graybackground">graybackground</div>
<div class="marketplace placeBottomRight">marketplace</div>
<div class="live placeBottomRight">live</div>
<div class="bugzilla placeBottomRight">bugzilla</div>
<div class="forums placeBottomRight">forums</div>
<div class="planet placeBottomRight">planet</div>
<div class="wiki placeBottomRight">wiki</div>
<div class="portal placeBottomRight">portal</div>

</body>
</html>

class name selector

Thursday, December 29, 2011

DOCTYPE

A Document Type Declaration, or DOCTYPE, is an instruction that associates a particular SGML or XML document (for example, a webpage) with a Document Type Definition (DTD) (for example, the formal definition of a particular version of HTML). In the serialized form of the document, it manifests as a short string of markup that conforms to a particular syntax.

The HTML layout engines in modern web browsers perform DOCTYPE "sniffing" or "switching", wherein the DOCTYPE in a document served as text/html determines a layout mode, such as "quirks mode" or "standards mode". The text/html serialization of HTML5, which is not SGML-based, uses the DOCTYPE only for mode selection. Since web browsers are implemented with special-purpose HTML parsers, rather than general-purpose DTD-based parsers, they don't use DTDs and will never access them even if a URL is provided. The DOCTYPE is retained in HTML5 as a "mostly useless, but required" header only to trigger "standards mode" in common browsers.


Source: Wikipedia - Document Type Declaration

Example of <!DOCTYPE> in HTML5
<!DOCTYPE html>
<html>
<head>
<title>Title...</title>
</head>
<body>
Body...
</body>
</html>




Wednesday, December 28, 2011

define color in CSS

color in CSS can be specified in the forms of keywords, hexadecimal, short hexadecimal, rgb(r, g, b) or rgb(r, g, b) in %.

example:
define color in CSS

<html>
<head>
<title>CSS - color</title>
</head>
<body
style="
margin-left:20px;
margin-right:20px;
background-image:url(http://goo.gl/ZTEx7);
background-repeat:no-repeat;
background-position:bottom right;
background-color:#e0e0e0;
">

<h1 style="font: bold 2em helvetica">Mobile-Web-App: color</h1>
<p>color in CSS can be specified in the forms of keywords, hexadecimal, short hexadecimal, rgb(r, g, b) or rgb(r, g, b) in %:</p>
<ul><li>
<p style="color:white; background-color:black">keywords: style="color:white; background-color:black"</p>
</li><li>
<p style="color:#101010; background-color:#f0f0f0">hexadecimal: style="color:#101010; background-color:#f0f0f0"</p>
</li><li>
<p style="color:#fff; background-color:#111">short hexadecimal: style="color:#fff; background-color:#111"</p>
</li><li>
<p style="color:rgb(255, 0, 0); background-color:rgb(0, 255, 255)">rgb(r, g, b): style="color:rgb(255, 0, 0); background-color:rgb(0, 255, 255)"</p>
</li><li>
<p style="color:rgb(100%, 100%, 100%); background-color:rgb(0%, 0%, 0%)">rgb(r, g, b) in %: style="color:rgb(100%, 100%, 100%); background-color:rgb(0%, 0%, 0%)"</p>
</li>
</ul>
</body>
</html>

Tuesday, December 27, 2011

CSS: set width using %

CSS: set width using %
<html>
<head>
<title>CSS Test</title>
<style>
body {
width: 75%;
background-image: url("http://goo.gl/ZTEx7");
background-repeat: no-repeat;
background-position: bottom right;
background-color: #e0e0e0 }
h1{font: bold 2em helvetica}
p {
font-size: 20px;
color: white;
width: 50%;
background-color: #303030 }
</style>
</head>
<body>

<h1>Mobile-Web-App: set width using %</h1>
<p>width of <body> = 75%</p>
<p>width of <p> = 50% inside <body></p>

</body>
</html>