Showing posts with label style. Show all posts
Showing posts with label style. Show all posts

Tuesday, 4 June 2013

How to convert the normal textfield keyboard to e-mail keyboard:cocos2d/Xcode

 Mail keyboard or changing keyboardtype:

    mailField.keyboardType = UIKeyboardTypeEmailAddress; // where mailField is the text field

Sunday, 2 June 2013

How to change from one scene to another(scene transition): cocos2d

First import the next scene name in the implementation file:
    
     #import "newSceneName .m"


Then call the next scene using the following line:

    [[CCDirector sharedDirector] replaceScene:[newSceneName scene]];


There are also some special transitions available on cocos2d. some of the examples are give below:

        // For Transition radial clockwise
            [[CCDirector sharedDirector] replaceScene:
                    [CCTransitionRadialCW transitionWithDuration:1.0f scene:[newSceneName scene]]];

        // For Transition shrink grow
            [[CCDirector sharedDirector] replaceScene:
                    [CCTransitionShrinkGrow transitionWithDuration:1.0f scene:[newSceneName scene]]];

        // For Transition split rows
            [[CCDirector sharedDirector] replaceScene:
                    [CCTransitionSplitRows transitionWithDuration:1.0f scene:[newSceneName scene]]];

        // For Transition turn off tiles
            [[CCDirector sharedDirector] replaceScene:
                    [CCTransitionTurnOffTiles transitionWithDuration:1.0f scene:[newSceneName scene] ]];

        // For Transition zoom and flipping X with orientation
            [[CCDirector sharedDirector] replaceScene:
                    [CCTransitionZoomFlipX transitionWithDuration:1.0f
                    scene:[newSceneName scene] orientation:kOrientationRightOver]];

Wednesday, 29 May 2013

HTML Text formattings

Heading formatting:
  1. <h1> Largest sized heading <h1>
  2. <h2> Smaller than h1 <h2>
  3. <h3> Smaller than h2 <h3>
  4. <h4> Smaller than h3 <h4>
  5. <h5> Smaller than h4 <h5>
  6. <h6> Smaller than h5, and the smallest heading <h6>
Paragraph formatting:
  1.  <b>         Used for bold text              </b>
  2.  <strong> Used for strong text          </strong>
  3. <big>       Used for big text                </big>
  4. <em>       Used for emphasized text  </em>
  5. <i>           Used for italic text               </i>
  6. <small>    Used for small text               </small>
  7. This is used for <sub>subscript</sub> and this is for <sup>superscript</sup>