{ Snipperize } /iphone
Snippets about iphone
Get iPhone/iPad/iPod Touch Hardware Generation
How to get iPhone/iPad/iPod Touch hardware generation
Objective-C / iphone, ipad, ipod, platform, generation, sysctlbyname, sysctl / by ThePeppersStudio (56 days, 10.28 hours ago)
CSS style sheet for ipad and iphone
CSS style sheet for ipad and iphone
CSS / media, iphone, ipad / by ThePeppersStudio (164 days, 13.38 hours ago)
Check the first launch of the application on iPhone
Really simple example how to check the first launch of the iPhone application written in Objective-C in XCode.
Objective-C / iphone, NSUserDefaults / by ThePeppersStudio (225 days, 10.25 hours ago)
Getting the iPhone User Name
You will need to do a little additional formatting of the NSString if you need to display the returned value, as the result replaces spaces and punctuation – "John’s iPhone" is returned as "John-s-iPhone". When I ran this on the simulator, the output I received was : john-3.local.
Objective-C / iphone, username, UIDevide, NSHost / by ThePeppersStudio (236 days, 17.46 hours ago)
Calling Code In A Different Controller With Objective-C
The NSNotificationCenter allows you to pass 1 object only, if your target method needs more arguments I suggest you pass an array and create and intermediate method to split the array and call the final method.
Objective-C / iphone, NSNotificationCenter / by ThePeppersStudio (236 days, 17.50 hours ago)
MediaPlayerController
initialize of MPMusicPlayerController
Objective-C / MPMusicPlayerController, iphone / by ThePeppersStudio (238 days, 12.56 hours ago)
Inserting A UITextField In A UIAlertView
This will be a simple tutorial showing you how to put a UITextField in a UIAlertView. This is simple and just a couple lines if code. You will learn CGAffineTransform and coding UITextField programmatically.
Objective-C / iphone, uitextfield, uialertview / by ThePeppersStudio (240 days, 6.06 hours ago)
How To detect an internet connection with the iPhone SDK
Download the reachability project from Apple Copy Reachability.h and Reachability.m to your project. Add the ‘SystemConfiguration’ framework to your project.
Objective-C / iphone, internet, reachability, SystemConfiguration / by ThePeppersStudio (240 days, 6.21 hours ago)
Translucent UIView
The most basic code is here: 最简单的就是显示一个什么也没有的view,如下 CGRect frame = [[UIScreen mainScreen] applicationFrame];//获取窗口大小 UIView *theView = [[UIView alloc] initWithFrame:frame];//实例一个UIView theView.backgroundColor = [UIColor blackColor];//设置其背景色为黑色 theView.alpha = 0.7;//设置其透明为0.7 然后想办法显示这个theView即可,比如 [[[UIApplication sharedApplication] keyWindow] addSubview:theView]
Objective-C / iphone, translucent, uiview / by ThePeppersStudio (240 days, 6.28 hours ago)
Code Snippet: Prevent The iPhone From Sleeping
The code below will prevent the iPhone from dimming its screen and ultimately going to sleep. Use it wisely as you don’t want your application becoming notorious for being a battery hog
Objective-C / iphone, sleep, idletimedisabled / by ThePeppersStudio (240 days, 6.30 hours ago)
- Home
- New Snippet
- Languages
-

