Categories
Friends
Links
Author Archives: Mika
Basic Default CSS Print Template
CSS /* Set default width, margin, float, and background. */ body, #wrap, #content, #container, { width: 100%; margin: 0; float: none; background: #fff url(none); } /* Remove any elements not needed in print. This would include navigation, ads, sidebars, etc. */ #nav, .noprint, #footer { display: [...]
How to Change the Default Text Selection Color with CSS
HTML Example <p class="selectionBlue">Testing blue selections.</p> CSS 3 .selectionBlue::selection { background: #0000FF; /* Safari */ } .selectionBlue::-moz-selection { background: #0000FF; /* Firefox */ }
Alert Box on iPhone – Xcode
Example: UIAlertView *someError = [[UIAlertView alloc] initWithTitle: @"Network error" message: @"Error sending your info to the server" delegate: self cancelButtonTitle: @"Ok" otherButtonTitles: nil]; [someError show]; [someError release];
How to Flipping a View on iPhone SDK
Objective C - (void) flipView { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:kTransitionDuration]; [UIView setAnimationTransition:([mainView superview] ? UIViewAnimationTransitionFlipFromLeft : UIViewAnimationTransitionFlipFromRight) [...]
Posted in iPhone Xcode - Objective C Tagged Flip View, Flipping view, Iphone, Objective C, SDK, Xcode 1 Comment
How to Rename /Duplicate iPhone Project in Xcode 3.x
Rename iPhone Project Step by Step: 1. Copy/rename the folder into new name. 2. Get inside the new folder and rename the .pch and .xcodeproj files. 3. Delete the build folder. 4. Open .xcodeproj file in text editor, like TextMate or TextWrangler. That’s actually a folder, which contains 4 files (you can also right-click [...]
Posted in iPhone Xcode - Objective C Tagged Cocoa, Duplicate iPhone, Objective C, Rename iPhone Project, Xcode 4 Comments
How to show/hide div with HTML and CSS only – Toggle visibility with CSS
HTML Example: <a onclick="document.getElementById(‘myDiv’).style.display=’block’;" href="javascript:void(0)">Click Here to show my div</a></div> <div class="anyclass" id="myDiv"> <p>Here goes the content you want to toggle the visibility</p> <a onclick="document.getElementById(‘myDiv’).style.display=’none’;" href="javascript:void(0)">Close [x]</a> </div>
How to set more than one event/option – jQuery Accordion
In The example below we set the mouseover event, auto height option as false and starts with the 3rd selector opened. (The index is a zero-indexed number to match the position of the header) JavaScript <script type="text/javascript"> $(function() { $(‘.subnav-rhs’).accordion({event: ‘mouseover’, [...]
Posted in jQuery Leave a comment
How to Detect iPhone with JavaScript