Follow LostMuser on Twitter

Saturday, September 4, 2010

List of Every UIView Subclass

I needed a good list of every UIView subclass so I could see what I might want to use. Being unable to find a list of these, I built one myself. Here is the code I used (put inside a UIViewController source file):



extern "C" {
int objc_getClassList(Class*, int);
Class class_getSuperclass(Class cls);
const char * class_getName(Class cls);
}

- (void)viewDidLoad {
int numClasses = objc_getClassList(NULL, 0);
Class *classes = NULL;

classes = (Class*)malloc(sizeof(Class) * numClasses);
numClasses = objc_getClassList(classes, numClasses);

for(int i = 0; i < numClasses; i++) {

Class cls = classes[i];

for(Class c = cls; c = class_getSuperclass(c);) {

if(!strcmp(class_getName(c), "UIView")) {

cout << class_getName(cls) << endl;
break;
}
}
}

free(classes);
}

And here is the resulting list:

UIDimmingView
UIAccentedKeyCapStringView
UIDropShadowView
UIKeyboardGenericKeyView
UITableCountView
UIMovieScrubberTrackFillView
UIPreferencesControlTableCell
UIKeyboardLanguageIndicator
UIScrollView
UIMovieScrubberTrackOverlayView
UITabBar
UINavigationBarBackground
UIMovieScrubberTrackInnerShadowView
UIKeyboardSpaceKeyView
UIStatusBarServiceItemView
UIStatusBarTimeItemView
UITableSeparatorView
UISearchResultsTableView
UIShadowView
UIKeyboardReturnKeyView
UIZoomButtonWindow
UIKeyboardKeyView
UITabBarCustomizeView
UINavigationItemButtonView
UIMovieScrubberTrackMaskView
UIImageView
UIMovieScrubberTrackView
UISectionIndex
UICompositeImageView
UIStatusBarBatteryItemView
UITabBarCustomizeViewLegacy
UIStatusBarAirplaneModeItemView
UINavBarPrompt
UIModalView
UINavigationItemView
UILabel
UIClassicStatusBarImageView
UIClassicWindow
UIStatusBarBatteryPercentItemView
UIMovieScrubber
UITextLabel
UITableViewCellContentView
UIClipCornerView
_UIOnePartImageView
UIAutocorrectTextView
UIAutocorrectInlinePrompt
UIPageControllerScrollView
UIKeyboardEmojiScrollView
UITextView
EmojiScrollView
UISectionList
UIStatusBarForegroundView
UITableHeaderFooterView
UIWeekMonthDayTableCell
_UIPickerViewTopFrame
EmojiPageControl
UISectionTable
UIAutocorrectShadowView
UIStatusBarBackgroundView
UIWebTextRangeView
UIAutocorrectStringView
UIStatusBarIndicatorItemView
UIKeyboardEmojiCategoriesControl
UIWebDragDotView
UIAutocorrectImageView
UITableViewIndex
UIDateTableCell
UIKeyboardEmojiView
UIKeyboardCandidateBar
UISectionHeaderCell
UIKeyboardCandidateInlineScroller
UITableViewCellContentMirror
UIDefaultKeyboardInput
UIStatusBarItemView
UIKeyboardCandidateSafetyNetVie
UIMultiColumnsNavigationTransitionView
UIKeyboardLayout
UIGradientBar
UIKeyboardCandidateInlineTextLabelView
UI9PartImageView
UIWebDocumentView
UIKeyboardCandidateBarCell
UIKeyboardCandidateInline
UIUndoAlertView
UIWebFormAccessory
UIKeyboardCandidateShadowView
UIPreferencesTable
_UITableViewSeparatorView
UIStatusBarWindow
UIWebBrowserPDFPageLabel
UIWebBrowserView
KBCandidateCell
UITableViewCountView
UIPasscodeField
UISearchFieldBackgroundView
UIStatusBarSignalStrengthItemView
UITextFieldRoundedRectBackgroundView
UIWindow
UIFieldEditor
UITextMagnifierRangedRenderer
UIWebSelectPicker
UIKeyboardLayoutQWERTZLandscape
UIAlertTextView
UIAutoRotatingWindow
UIButtonBarCustomizeView
UITableViewLabel
UIToolbar
UITextMagnifierRanged
UIKeyboardAutomatic
UIOldSliderButton
_UILabeledPushButton
UIActivityIndicatorView
UITableCellDisclosureView
UILayoutContainerView
UITextEffectsWindow
UITransitionView
UIDOMHTMLOptGroupCell
UIKeyboardLayoutAZERTYLandscape
UIKeyboardLayoutQWERTZ
UIOldSliderFillView
UITableViewCellReorderControl
UIToolbarCustomizeViewLegacy
UITextContentView
UIKeyboardLayoutStar
UIDOMHTMLOptionPickerCell
_UISwitchSlider
UIInlineCandidateTextView
UIPlacardButton
UIControl
UIToolbarCustomizeView
UIKeyboardLayoutAZERTY
UIKeyboardLayoutQWERTYK48
UIPeripheralHostView
UISwitch
UIToolbarButton
UIKeyboardLayoutQWERTYLandscapeK48
InlineCandidateCell
UIKBKeyplaneView
UIToolbarTextButton
UnchargedButton
UIToolbarButtonBadge
UIKeyboardLayoutRoman
UIDatePicker
UIPickerView
UIDatePickerView
UIKeyboardLayoutEmoji
UIWebSelectionOutline
UIHighlightView
UIKeyboardLayoutQWERTY
UIWebSelectionView
UICheckeredPatternView
UIKeyboardSublayoutEMail
UITextField
UISwappableImageView
UIButtonBarBadgeBackground
UIWebSelectionHandle
UIButton
UIPickerTable
UIPushButton
UIGlassButton
UITextFieldAtomBackgroundView
UITextMagnifierRenderer
UIKeyboard
UIKeyboardReplacementImageView
UIKeyboardMinimizedView
UIKeyboardSublayout
UITexturedButton
_UIPickerViewWrappingTableCell
UIKeyboardImpl
UITouchDiagnosticsLayer
UIClippedImageView
UIRoundedCornerView
UIButtonLabel
_UIPickerViewSelectionBar
UIKeyboardEmojiPage
UITextFieldLabel
UITextFieldBorderView
UISelectionIndicatorView
UIKeyboardPartialLayoutView
UIRoundedRectButton
_UIPickerWheelView
UITextSelectionView
UIDateLabel
UIStatusBarBluetoothBatteryItemView
UITabBarButtonLabel
UIActionSheet
UINavigationBar
UITabBarButton
UINavigationButton
UIMovieScrubberEditingView
UIProgressIndicator
UIStatusBarBluetoothItemView
UIStatusBarActivityItemView
UIPageControl
UINavigationTransitionView
UISegmentedControl
UISelectionGrabber
UIProgressHUD
UITextRangeView
UITabBarButtonBadge
UIProgressBar
UITabBarSwappableImageView
UISegmentLabel
UIKBHandwritingView
UIAlertView
UITabBarBadgeBackground
UITableView
UISelectionGrabberDot
UISearchField
UICalloutBarButton
UIScrubberTimeView
UIKBCandidateView
UIImageAndTextTableCell
UIRemoteWindow
UIThreePartButton
UIRemoteView
UISegment
UICalloutBar
UIScrubberControl
UITableViewCell
UITabBarSelectionIndicatorView
UIStatusBarThermalColorItemView
_UITableViewCellRemoveControl
UIAlertSheetTableCell
_UITableCellGrabber
UICompletionTable
UIPopoverView
UIKBKeyView
UITableViewCellSelectedBackground
UIRemoveControl
UICalloutBarOverlay
UIInsertControl
UITableViewCellEditControl
UIRemoveControlMultiSelectButton
UIInputSwitcherSelectionExtraView
UIAlertSheetTextField
UISearchBarTextField
_UIAlertSheetTable
UISearchBarBackground
UIRemoveControlTextButton
UIPopoverViewBackgroundComponentView
UIKeyboardLayoutRomajiLandscape
UIInputSwitcherView
_UITableViewCellGrabber
UIKeyboardLayoutQWERTYLandscape
UIInputSwitcherShadowView
UITableViewCellDeleteConfirmationControl
WhiteView
UITextMagnifierCaret
UICalloutView
UICompletionTableViewCell
UIKeyboardLayoutRomaji
UIOnePartImageView
UISearchBar
UITableCellRemoveControl
_UITableViewCellEditControlMinusView
_UIAlertOverlayWindow
UIRemoveControlMinusButton
UIProgressView
UITableCell
_UITableViewCellDeleteConfirmationControl
UIKeyboardLayoutQZERTY
UIOldSliderControl
UIInputSwitcherTableCellBackgroundView
UIThreePartImageView
UISimpleTableCell
UITextMagnifierCaretRenderer
UIKeyboardLayoutQZERTYLandscape
UIStatusBarLockItemView
UIStatusBarDataNetworkItemView
UIWebView
UIWebTextView
UIWebTiledView
_UIPrefTableCellPiece
UITextFieldBackgroundView
UIPreferencesTableCellRemoveControl
UIPickerTableCell
UISnapshotView
UIStatusDimmingWindow
UIViewControllerWrapperView
UIGroupTableViewCellBackground
UIPreferencesTableCell
UIScroller
UIAccentedCharacterView
UIPreferencesDeleteTableCell
UIStatusBar
UIScrollerIndicator
UIGradientDimmingView
UISlider
UIMovieScrubberThumbnailView
UIPreferencesTextTableCell
_UIBookViewControllerView
UITable

Notice the _UIBookViewControllerview? Mm, tempting...

Monday, August 16, 2010

Tuesday, August 3, 2010

Entrepreneurship Fallacies Involving Your Kids

I've often heard would-be entrepreneurs point to their children as reason for needing a stable job. This seems to be a popular and commonly believed reason to avoid entrepreneurship and the perceived risks to their kids that come with it.

I have come to believe that this notion is not only wrong but the opposite is true. To begin lets step away from our adult world and analyze children for a while.

What makes for a good childhood?


This question has fascinated me since, well, I was a child. Luckily for this curiosity, I had the perfect upbringing to observe various kinds. Not only were my parents divorced with split custody and living in different towns, my father bought a vacation house in an less-than-wealthy town along the beautiful-yet-brown Russian River.

Rich Kid Experience

I went to school in my mother's town. After escaping boarding school with a 3.9 GPA and high marks my mother demanding I go to a fancy private high school. I picked the happiest looking, small class size one of the lot. Woodside Priory fit the bill and children of wealthy families were not in short supply.

I grew wary of this forced schooling choice and quickly found a simple way out: Get bad grades. After this problem was solved I went to Los Altos highschool which, turns out, also has a surplus of wealthy children.

What I'm saying is, I met, befriended, and was around lots of rich kids.

Rich kids are generally insecure and anxious. They almost always have some strong notion they're supposed to "do good" and succeed. Sometimes they get a notion that they're supposed to be better but they usually don't know what that means. Somehow they never quite seem comfortable with the world.

Poor kids, on the other hand, don't have a clue. They don't really know or care about all this "doing good" or succeeding nonsense. They are almost never insecure and 'anxious' isn't in their vocabulary. And my god do they know how to have fun!

More on this "fun" business


The fun I had in my father's town was a world beyond the fun I had at my mother's. And the fun I had at the less-than-wealthy vacation town was a world beyond that! Life felt like a an exciting leap into a world of wonder and amazing things all around us just waiting for us to crack open it's exciting little secrets. Was there a tree? Let's climb it! A creek? Let's explore it. You get the picture.

This exciting world of poverty made going back to the 'land of the rich' awful. The people there didn't even understand how oblivious they were to this other world of amazing things.

I've verified my ideas by asking many people who had impoverished lives as a child. So far talking to everyone who has come from poverty has proven to me that my observations are correct. Fascinatingly, children learn at a certain age that their childhood was somehow bad. The thought would never have occurred to them otherwise!

But what's better?


At this point people will make an argument structured something like the following. I will box it to separate it from my own voice. And maybe color it red so the voice reads just that much sillier...


Ah sure the poor kids are happy now but the rich educated kids will have better lives when they're older!


I will avoid delving into this "educated people having better lives" nonsense (great discussion to have with me over email if you're interested) but focusing on a different question:
Which childhood leads to a better, smarter, more successful citizen?

To answer this, I get to ask a very interesting question, which I will make italic because I love it so much. What is the value of a happy, balanced mind without insecurity?

If there is one common thread I've seen with people who succeed with their productive lives, it's having this balanced mind. It doesn't matter what you know, it matters how clearly and confidently you face the unknown. Because the world is full of unknowns. Unknowns like: How do I write a resume? How do I learn this newly in demand skill? How do I learn to build the right kinds of products? How do I create a new industry? Answering these previously unknown questions is valuable to all of society and, more importantly, to the future success of your child.

Perfect recipe for a growing a child


The perfect recipe is combining the wonderful freedom and happiness of poverty while showing your child the wonderful aspects of the world. Give your child a free ticket to grow their ability and apetite for learning itself. This ability and the pleasures that come with it are the keys to your child becoming everything you hope for it.

Children know what's going on with you, often better than you do. A great way to help your child grow this essential appetite for learning is to live it in your own life. If you're approaching new problems and learning new ways to solve things and feeling the excitement, confidence and happiness that seeps into your life from it your kid will feel it too! And that is exactly what drives a child to be a certain way growing up.

So you need to combine two things: Poverty and an obsession learning.

Hey wait! Isn't that what entrepreneurship is all about?

iPhone App in 5 Minutes

Here are the slides for a presentation on how to build an iPhone app with physics in about 5 minutes.


Thursday, July 29, 2010

Screen Spy - Sales Update

Want to see an update of how Screen Spy is doing? Check out this nice post with graphs, figures and stats:


Screen Spy - Sales Update

Sunday, July 25, 2010

Translations on the iPhone


Want to perform translations on the iPhone? Here is a simple way to use Google Translate in you iPhone app.



#import "translate.h"

...

NSLog(@"Translation: %@", CWTranslatedString(@"tiếng Việt"));
NSLog(@"Translation: %@", CWTranslatedString(@"How much wood could a wood chuck chuck if a wood chuck could chuck wood?", @"vi"));


The result of this code will be:



Translation: Vietnamese
Translation: Bao nhiêu gỗ có thể một chuck chuck gỗ nếu một chuck gỗ có thể chuck gỗ?


The string will be translated into whatever language is set on the iPhone unless you specify a language code as the second parameter.



Download the Translator Code. Unzip the file and drag the two folders (named JSON and translate) to the left panel of your xcode project. Check the "Copy items into destination folder" checkbox and click Add.

Monday, April 26, 2010

You Gotta Love People Description Blurbs


I read an interesting story today (from slashdot no less) and found this interesting boxed blurb thing near the bottom of the article.



"How cool," I thought, "he's award winning." Moments later I questioned, what does award winning even mean? Than I remembered that in-fact I too am award winning. I've been winning awards since I was 12 ranging from Participant to Most Improved. So, without further ado, here is my awesome new blurb.






Dustin Dettmer is an award-winning internet user who advises major corporations on things and other things. He brings a relevant, meaningful, and sometimes superior voice to the tech world. He is a member of the Google Blog Network and is not an employee of Google.

Musing's Blog Viewer Webcam



(People reading the blog right now!)