Skip to content
Browse files

Docs added

  • Loading branch information...
1 parent b47fca1 commit afae628e30d3b37576d678eac16231dc99ef6086 @AlexDenisov committed Oct 29, 2012
View
9 CONTRIBUTING.markdown
@@ -0,0 +1,9 @@
+## Contribute to FontasticIcons
+
+If you want to contribute to FontasticIcons, follow this process:
+
+1. Fork the project
+2. Create a feature branch
+3. Code
+4. Create a pull request
+
View
14 FontasticIcons.xcodeproj/project.pbxproj
@@ -26,6 +26,7 @@
CA7C5606163E3AAD00AC32A3 /* FIEntypoIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7C5605163E3AAD00AC32A3 /* FIEntypoIcon.m */; };
CA7C5609163E433400AC32A3 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA7C5608163E433400AC32A3 /* CoreText.framework */; };
CA7C561A163EFBCC00AC32A3 /* FIEntypoSocialIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7C5619163EFBCC00AC32A3 /* FIEntypoSocialIcon.m */; };
+ CA7C561E163F060500AC32A3 /* FIMetaInfoManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CA7C561D163F060500AC32A3 /* FIMetaInfoManager.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -61,6 +62,8 @@
CA7C5608163E433400AC32A3 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
CA7C5618163EFBCC00AC32A3 /* FIEntypoSocialIcon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FIEntypoSocialIcon.h; sourceTree = "<group>"; };
CA7C5619163EFBCC00AC32A3 /* FIEntypoSocialIcon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIEntypoSocialIcon.m; sourceTree = "<group>"; };
+ CA7C561C163F060500AC32A3 /* FIMetaInfoManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FIMetaInfoManager.h; sourceTree = "<group>"; };
+ CA7C561D163F060500AC32A3 /* FIMetaInfoManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIMetaInfoManager.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -148,6 +151,7 @@
CA7C55E8163DC49C00AC32A3 /* Base */ = {
isa = PBXGroup;
children = (
+ CA7C561B163F049100AC32A3 /* FIMetaInfoManager */,
CA7C5616163EFB4A00AC32A3 /* FIFont */,
CA7C5615163EFB2F00AC32A3 /* FIIcon */,
CA7C5614163EFB2100AC32A3 /* FIIconView */,
@@ -238,6 +242,15 @@
name = Entypo;
sourceTree = "<group>";
};
+ CA7C561B163F049100AC32A3 /* FIMetaInfoManager */ = {
+ isa = PBXGroup;
+ children = (
+ CA7C561C163F060500AC32A3 /* FIMetaInfoManager.h */,
+ CA7C561D163F060500AC32A3 /* FIMetaInfoManager.m */,
+ );
+ name = FIMetaInfoManager;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -315,6 +328,7 @@
CA7C55F8163DC81800AC32A3 /* FIFont.m in Sources */,
CA7C5606163E3AAD00AC32A3 /* FIEntypoIcon.m in Sources */,
CA7C561A163EFBCC00AC32A3 /* FIEntypoSocialIcon.m in Sources */,
+ CA7C561E163F060500AC32A3 /* FIMetaInfoManager.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
494 FontasticIcons/Sources/Classes/FIEntypoIcon.m
@@ -12,267 +12,255 @@
@implementation FIEntypoIcon
-#pragma mark - Static fields
-
-static id _iconsDictionary = nil;
-static id _font = nil;
-
#pragma mark - Overriden methods
+ (FIFont *)iconFont {
- if (_font == nil) {
- _font = [FIFont entypoFont];
- }
- return _font;
+ return [FIFont entypoFont];
}
#pragma mark - Icons Dictionary
+ (NSDictionary *)iconsDictionary {
- if (_iconsDictionary == nil) {
- _iconsDictionary = [[NSDictionary alloc] initWithDictionary:
- @{
- @"phone" : @"\U0001F4DE",
- @"mobile" : @"\U0001F4F1",
- @"mouse" : @"\U0000E789",
- @"address" : @"\U0000E723",
- @"mail" : @"\U00002709",
- @"paper-plane" : @"\U0001F53F",
- @"pencil" : @"\U0000270E",
- @"feather" : @"\U00002712",
- @"attach" : @"\U0001F4CE",
- @"inbox" : @"\U0000E777",
- @"reply" : @"\U0000E712",
- @"reply-all" : @"\U0000E713",
- @"forward" : @"\U000027A6",
- @"user" : @"\U0001F464",
- @"users" : @"\U0001F465",
- @"add-user" : @"\U0000E700",
- @"vcard" : @"\U0000E722",
- @"export" : @"\U0000E715",
- @"location" : @"\U0000E724",
- @"map" : @"\U0000E727",
- @"compass" : @"\U0000E728",
- @"direction" : @"\U000027A2",
- @"hair-cross" : @"\U0001F3AF",
- @"share" : @"\U0000E73E",
- @"shareable" : @"\U0001F4DE",
- @"heart" : @"\U00002665",
- @"heart-empty" : @"\U00002661",
- @"star" : @"\U00002605",
- @"star-empty" : @"\U00002606",
- @"thumbs-up" : @"\U0001F44D",
- @"thumbs-down" : @"\U0001F44E",
- @"chat" : @"\U0000E720",
- @"comment" : @"\U0000E718",
- @"quote" : @"\U0000275E",
- @"home" : @"\U00002302",
- @"popup" : @"\U0000E74C",
- @"search" : @"\U0001F50D",
- @"flashlight" : @"\U0001F526",
- @"print" : @"\U0000E716",
- @"bell" : @"\U0001F514",
- @"link" : @"\U0001F517",
- @"flag" : @"\U00002691",
- @"cog" : @"\U00002699",
- @"tools" : @"\U00002692",
- @"trophy" : @"\U0001F3C6",
- @"tag" : @"\U0000E70C",
- @"camera" : @"\U0001F4F7",
- @"megaphone" : @"\U0001F4E3",
- @"moon" : @"\U0000263D",
- @"palette" : @"\U0001F3A8",
- @"leaf" : @"\U0001F342",
- @"note" : @"\U0000266A",
- @"beamed-note" : @"\U0000266B",
- @"new" : @"\U0001F4A5",
- @"graduation-cap" : @"\U0001F393",
- @"book" : @"\U0001F4D5",
- @"newspaper" : @"\U0001F4F0",
- @"bag" : @"\U0001F45C",
- @"airplane" : @"\U00002708",
- @"lifebuoy" : @"\U0000E788",
- @"eye" : @"\U0000E70A",
- @"clock" : @"\U0001F554",
- @"mic" : @"\U0001F3A4",
- @"calendar" : @"\U0001F4C5",
- @"flash" : @"\U000026A1",
- @"thunder-cloud" : @"\U000026C8",
- @"droplet" : @"\U0001F4A7",
- @"cd" : @"\U0001F4BF",
- @"briefcase" : @"\U0001F4BC",
- @"air" : @"\U0001F4A8",
- @"hourglass" : @"\U000023F3",
- @"gauge" : @"\U0001F6C7",
- @"language" : @"\U0001F394",
- @"network" : @"\U0000E776",
- @"key" : @"\U0001F511",
- @"battery" : @"\U0001F50B",
- @"bucket" : @"\U0001F4FE",
- @"magnet" : @"\U0000E7A1",
- @"drive" : @"\U0001F4FD",
- @"cup" : @"\U00002615",
- @"rocket" : @"\U0001F680",
- @"brush" : @"\U0000E79A",
- @"suitcase" : @"\U0001F6C6",
- @"traffic-cone" : @"\U0001F6C8",
- @"globe" : @"\U0001F30E",
- @"keyboard" : @"\U00002328",
- @"browser" : @"\U0000E74E",
- @"publish" : @"\U0000E74D",
- @"progress-3" : @"\U0000E76B",
- @"progress-2" : @"\U0000E76A",
- @"progress-1" : @"\U0000E769",
- @"progress-0" : @"\U0000E768",
- @"light-down" : @"\U0001F505",
- @"light-up" : @"\U0001F506",
- @"adjust" : @"\U000025D1",
- @"code" : @"\U0000E714",
- @"monitor" : @"\U0001F4BB",
- @"infinity" : @"\U0000221E",
- @"light-bulb" : @"\U0001F4A1",
- @"credit-card" : @"\U0001F4B3",
- @"database" : @"\U0001F4F8",
- @"voicemail" : @"\U00002707",
- @"clipboard" : @"\U0001F4CB",
- @"cart" : @"\U0000E73D",
- @"box" : @"\U0001F4E6",
- @"ticket" : @"\U0001F3AB",
- @"rss" : @"\U0000E73A",
- @"signal" : @"\U0001F4F6",
- @"thermometer" : @"\U0001F4FF",
- @"water" : @"\U0001F4A6",
- @"sweden" : @"\U0000F601",
- @"line-graph" : @"\U0001F4C8",
- @"pie-chart" : @"\U000025F4",
- @"bar-graph" : @"\U0001F4CA",
- @"area-graph" : @"\U0001F53E",
- @"lock" : @"\U0001F512",
- @"lock-open" : @"\U0001F513",
- @"logout" : @"\U0000E741",
- @"login" : @"\U0000E740",
- @"check" : @"\U00002713",
- @"cross" : @"\U0000274C",
- @"squared-minus" : @"\U0000229F",
- @"squared-plus" : @"\U0000229E",
- @"squared-cross" : @"\U0000274E ",
- @"circled-minus" : @"\U00002296",
- @"circled-plus" : @"\U00002295",
- @"circled-cross" : @"\U00002716",
- @"minus" : @"\U00002796",
- @"plus" : @"\U00002795",
- @"erase" : @"\U0000232B",
- @"block" : @"\U0001F6AB",
- @"info" : @"\U00002139",
- @"circled-info" : @"\U0000E705",
- @"help" : @"\U00002753",
- @"circled-help" : @"\U0000E704",
- @"warning" : @"\U000026A0",
- @"cycle" : @"\U0001F504",
- @"cw" : @"\U000027F3",
- @"ccw" : @"\U000027F2",
- @"shuffle" : @"\U0001F500",
- @"back" : @"\U0001F519",
- @"level-down" : @"\U000021B3",
- @"retweet" : @"\U0000E717",
- @"loop" : @"\U0001F501",
- @"back-in-time" : @"\U0000E771",
- @"level-up" : @"\U000021B0",
- @"switch" : @"\U000021C6",
- @"numbered-list" : @"\U0000E005",
- @"add-to-list" : @"\U0000E003",
- @"layout" : @"\U0000268F",
- @"list" : @"\U00002630",
- @"text-doc" : @"\U0001F4C4",
- @"text-doc-inverted" : @"\U0000E731",
- @"doc" : @"\U0000E730",
- @"docs" : @"\U0000E736",
- @"landscape-doc" : @"\U0000E737",
- @"picture" : @"\U0001F304",
- @"video" : @"\U0001F3AC",
- @"music" : @"\U0001F3B5",
- @"folder" : @"\U0001F4C1",
- @"archive" : @"\U0000E800",
- @"trash" : @"\U0000E729",
- @"upload" : @"\U0001F4E4",
- @"download" : @"\U0001F4E5",
- @"save" : @"\U0001F4BE",
- @"install" : @"\U0000E778",
- @"cloud" : @"\U00002601",
- @"upload-cloud" : @"\U0000E711",
- @"bookmark" : @"\U0001F516",
- @"bookmarks" : @"\U0001F4D1",
- @"open-book" : @"\U0001F4D6",
- @"play" : @"\U000025B6",
- @"paus" : @"\U00002016",
- @"record" : @"\U000025CF",
- @"stop" : @"\U000025A0",
- @"ff" : @"\U000023E9",
- @"fb" : @"\U000023EA",
- @"to-start" : @"\U000023EE",
- @"to-end" : @"\U000023ED",
- @"resize-full" : @"\U0000E744",
- @"resize-small" : @"\U0000E746",
- @"volume" : @"\U000023F7",
- @"sound" : @"\U0001F50A",
- @"mute" : @"\U0001F507",
- @"flow-cascade" : @"\U0001F568",
- @"flow-branch" : @"\U0001F569",
- @"flow-tree" : @"\U0001F56A",
- @"flow-line" : @"\U0001F56B",
- @"flow-parallel" : @"\U0001F56C",
- @"left-bold" : @"\U0000E4AD",
- @"down-bold" : @"\U0000E4B0",
- @"up-bold" : @"\U0000E4AF",
- @"right-bold" : @"\U0000E4AE",
- @"left" : @"\U00002B05",
- @"down" : @"\U00002B07",
- @"up" : @"\U00002B06",
- @"right" : @"\U000027A1",
- @"circled-left" : @"\U0000E759",
- @"circled-down" : @"\U0000E758",
- @"circled-up" : @"\U0000E75B",
- @"circled-right" : @"\U0000E75A",
- @"triangle-left" : @"\U000025C2",
- @"triangle-down" : @"\U000025BE",
- @"triangle-up" : @"\U000025B4",
- @"triangle-right" : @"\U000025B8",
- @"chevron-left" : @"\U0000E75D",
- @"chevron-down" : @"\U0000E75C",
- @"chevron-up" : @"\U0000E75F",
- @"chevron-right" : @"\U0000E75E",
- @"chevron-small-left" : @"\U0000E761",
- @"chevron-small-down" : @"\U0000E760",
- @"chevron-small-up" : @"\U0000E763",
- @"chevron-small-right" : @"\U0000E762",
- @"chevron-thin-left" : @"\U0000E765",
- @"chevron-thin-down" : @"\U0000E764",
- @"chevron-thin-up" : @"\U0000E767",
- @"chevron-thin-right" : @"\U0000E766",
- @"left-thin" : @"\U00002190",
- @"down-thin" : @"\U00002193",
- @"up-thin" : @"\U00002191",
- @"right-thin" : @"\U00002192",
- @"arrow-combo" : @"\U0000E74F",
- @"three-dots" : @"\U000023F6",
- @"two-dots" : @"\U000023F5",
- @"dot" : @"\U000023F4",
- @"cc" : @"\U0001F545",
- @"cc-by" : @"\U0001F546",
- @"cc-nc" : @"\U0001F547",
- @"cc-nc-eu" : @"\U0001F548",
- @"cc-nc-jp" : @"\U0001F549",
- @"cc-sa" : @"\U0001F54A",
- @"cc-nd" : @"\U0001F54B",
- @"cc-pd" : @"\U0001F54C",
- @"cc-zero" : @"\U0001F54D",
- @"cc-share" : @"\U0001F54E",
- @"cc-remix" : @"\U0001F54F",
- @"db-logo" : @"\U0001F5F9",
- @"db-shape" : @"\U0001F5FA"}
- ];
- }
- return _iconsDictionary;
+ return @{
+ @"phone" : @"\U0001F4DE",
+ @"mobile" : @"\U0001F4F1",
+ @"mouse" : @"\U0000E789",
+ @"address" : @"\U0000E723",
+ @"mail" : @"\U00002709",
+ @"paper-plane" : @"\U0001F53F",
+ @"pencil" : @"\U0000270E",
+ @"feather" : @"\U00002712",
+ @"attach" : @"\U0001F4CE",
+ @"inbox" : @"\U0000E777",
+ @"reply" : @"\U0000E712",
+ @"reply-all" : @"\U0000E713",
+ @"forward" : @"\U000027A6",
+ @"user" : @"\U0001F464",
+ @"users" : @"\U0001F465",
+ @"add-user" : @"\U0000E700",
+ @"vcard" : @"\U0000E722",
+ @"export" : @"\U0000E715",
+ @"location" : @"\U0000E724",
+ @"map" : @"\U0000E727",
+ @"compass" : @"\U0000E728",
+ @"direction" : @"\U000027A2",
+ @"hair-cross" : @"\U0001F3AF",
+ @"share" : @"\U0000E73E",
+ @"shareable" : @"\U0001F4DE",
+ @"heart" : @"\U00002665",
+ @"heart-empty" : @"\U00002661",
+ @"star" : @"\U00002605",
+ @"star-empty" : @"\U00002606",
+ @"thumbs-up" : @"\U0001F44D",
+ @"thumbs-down" : @"\U0001F44E",
+ @"chat" : @"\U0000E720",
+ @"comment" : @"\U0000E718",
+ @"quote" : @"\U0000275E",
+ @"home" : @"\U00002302",
+ @"popup" : @"\U0000E74C",
+ @"search" : @"\U0001F50D",
+ @"flashlight" : @"\U0001F526",
+ @"print" : @"\U0000E716",
+ @"bell" : @"\U0001F514",
+ @"link" : @"\U0001F517",
+ @"flag" : @"\U00002691",
+ @"cog" : @"\U00002699",
+ @"tools" : @"\U00002692",
+ @"trophy" : @"\U0001F3C6",
+ @"tag" : @"\U0000E70C",
+ @"camera" : @"\U0001F4F7",
+ @"megaphone" : @"\U0001F4E3",
+ @"moon" : @"\U0000263D",
+ @"palette" : @"\U0001F3A8",
+ @"leaf" : @"\U0001F342",
+ @"note" : @"\U0000266A",
+ @"beamed-note" : @"\U0000266B",
+ @"new" : @"\U0001F4A5",
+ @"graduation-cap" : @"\U0001F393",
+ @"book" : @"\U0001F4D5",
+ @"newspaper" : @"\U0001F4F0",
+ @"bag" : @"\U0001F45C",
+ @"airplane" : @"\U00002708",
+ @"lifebuoy" : @"\U0000E788",
+ @"eye" : @"\U0000E70A",
+ @"clock" : @"\U0001F554",
+ @"mic" : @"\U0001F3A4",
+ @"calendar" : @"\U0001F4C5",
+ @"flash" : @"\U000026A1",
+ @"thunder-cloud" : @"\U000026C8",
+ @"droplet" : @"\U0001F4A7",
+ @"cd" : @"\U0001F4BF",
+ @"briefcase" : @"\U0001F4BC",
+ @"air" : @"\U0001F4A8",
+ @"hourglass" : @"\U000023F3",
+ @"gauge" : @"\U0001F6C7",
+ @"language" : @"\U0001F394",
+ @"network" : @"\U0000E776",
+ @"key" : @"\U0001F511",
+ @"battery" : @"\U0001F50B",
+ @"bucket" : @"\U0001F4FE",
+ @"magnet" : @"\U0000E7A1",
+ @"drive" : @"\U0001F4FD",
+ @"cup" : @"\U00002615",
+ @"rocket" : @"\U0001F680",
+ @"brush" : @"\U0000E79A",
+ @"suitcase" : @"\U0001F6C6",
+ @"traffic-cone" : @"\U0001F6C8",
+ @"globe" : @"\U0001F30E",
+ @"keyboard" : @"\U00002328",
+ @"browser" : @"\U0000E74E",
+ @"publish" : @"\U0000E74D",
+ @"progress-3" : @"\U0000E76B",
+ @"progress-2" : @"\U0000E76A",
+ @"progress-1" : @"\U0000E769",
+ @"progress-0" : @"\U0000E768",
+ @"light-down" : @"\U0001F505",
+ @"light-up" : @"\U0001F506",
+ @"adjust" : @"\U000025D1",
+ @"code" : @"\U0000E714",
+ @"monitor" : @"\U0001F4BB",
+ @"infinity" : @"\U0000221E",
+ @"light-bulb" : @"\U0001F4A1",
+ @"credit-card" : @"\U0001F4B3",
+ @"database" : @"\U0001F4F8",
+ @"voicemail" : @"\U00002707",
+ @"clipboard" : @"\U0001F4CB",
+ @"cart" : @"\U0000E73D",
+ @"box" : @"\U0001F4E6",
+ @"ticket" : @"\U0001F3AB",
+ @"rss" : @"\U0000E73A",
+ @"signal" : @"\U0001F4F6",
+ @"thermometer" : @"\U0001F4FF",
+ @"water" : @"\U0001F4A6",
+ @"sweden" : @"\U0000F601",
+ @"line-graph" : @"\U0001F4C8",
+ @"pie-chart" : @"\U000025F4",
+ @"bar-graph" : @"\U0001F4CA",
+ @"area-graph" : @"\U0001F53E",
+ @"lock" : @"\U0001F512",
+ @"lock-open" : @"\U0001F513",
+ @"logout" : @"\U0000E741",
+ @"login" : @"\U0000E740",
+ @"check" : @"\U00002713",
+ @"cross" : @"\U0000274C",
+ @"squared-minus" : @"\U0000229F",
+ @"squared-plus" : @"\U0000229E",
+ @"squared-cross" : @"\U0000274E ",
+ @"circled-minus" : @"\U00002296",
+ @"circled-plus" : @"\U00002295",
+ @"circled-cross" : @"\U00002716",
+ @"minus" : @"\U00002796",
+ @"plus" : @"\U00002795",
+ @"erase" : @"\U0000232B",
+ @"block" : @"\U0001F6AB",
+ @"info" : @"\U00002139",
+ @"circled-info" : @"\U0000E705",
+ @"help" : @"\U00002753",
+ @"circled-help" : @"\U0000E704",
+ @"warning" : @"\U000026A0",
+ @"cycle" : @"\U0001F504",
+ @"cw" : @"\U000027F3",
+ @"ccw" : @"\U000027F2",
+ @"shuffle" : @"\U0001F500",
+ @"back" : @"\U0001F519",
+ @"level-down" : @"\U000021B3",
+ @"retweet" : @"\U0000E717",
+ @"loop" : @"\U0001F501",
+ @"back-in-time" : @"\U0000E771",
+ @"level-up" : @"\U000021B0",
+ @"switch" : @"\U000021C6",
+ @"numbered-list" : @"\U0000E005",
+ @"add-to-list" : @"\U0000E003",
+ @"layout" : @"\U0000268F",
+ @"list" : @"\U00002630",
+ @"text-doc" : @"\U0001F4C4",
+ @"text-doc-inverted" : @"\U0000E731",
+ @"doc" : @"\U0000E730",
+ @"docs" : @"\U0000E736",
+ @"landscape-doc" : @"\U0000E737",
+ @"picture" : @"\U0001F304",
+ @"video" : @"\U0001F3AC",
+ @"music" : @"\U0001F3B5",
+ @"folder" : @"\U0001F4C1",
+ @"archive" : @"\U0000E800",
+ @"trash" : @"\U0000E729",
+ @"upload" : @"\U0001F4E4",
+ @"download" : @"\U0001F4E5",
+ @"save" : @"\U0001F4BE",
+ @"install" : @"\U0000E778",
+ @"cloud" : @"\U00002601",
+ @"upload-cloud" : @"\U0000E711",
+ @"bookmark" : @"\U0001F516",
+ @"bookmarks" : @"\U0001F4D1",
+ @"open-book" : @"\U0001F4D6",
+ @"play" : @"\U000025B6",
+ @"paus" : @"\U00002016",
+ @"record" : @"\U000025CF",
+ @"stop" : @"\U000025A0",
+ @"ff" : @"\U000023E9",
+ @"fb" : @"\U000023EA",
+ @"to-start" : @"\U000023EE",
+ @"to-end" : @"\U000023ED",
+ @"resize-full" : @"\U0000E744",
+ @"resize-small" : @"\U0000E746",
+ @"volume" : @"\U000023F7",
+ @"sound" : @"\U0001F50A",
+ @"mute" : @"\U0001F507",
+ @"flow-cascade" : @"\U0001F568",
+ @"flow-branch" : @"\U0001F569",
+ @"flow-tree" : @"\U0001F56A",
+ @"flow-line" : @"\U0001F56B",
+ @"flow-parallel" : @"\U0001F56C",
+ @"left-bold" : @"\U0000E4AD",
+ @"down-bold" : @"\U0000E4B0",
+ @"up-bold" : @"\U0000E4AF",
+ @"right-bold" : @"\U0000E4AE",
+ @"left" : @"\U00002B05",
+ @"down" : @"\U00002B07",
+ @"up" : @"\U00002B06",
+ @"right" : @"\U000027A1",
+ @"circled-left" : @"\U0000E759",
+ @"circled-down" : @"\U0000E758",
+ @"circled-up" : @"\U0000E75B",
+ @"circled-right" : @"\U0000E75A",
+ @"triangle-left" : @"\U000025C2",
+ @"triangle-down" : @"\U000025BE",
+ @"triangle-up" : @"\U000025B4",
+ @"triangle-right" : @"\U000025B8",
+ @"chevron-left" : @"\U0000E75D",
+ @"chevron-down" : @"\U0000E75C",
+ @"chevron-up" : @"\U0000E75F",
+ @"chevron-right" : @"\U0000E75E",
+ @"chevron-small-left" : @"\U0000E761",
+ @"chevron-small-down" : @"\U0000E760",
+ @"chevron-small-up" : @"\U0000E763",
+ @"chevron-small-right" : @"\U0000E762",
+ @"chevron-thin-left" : @"\U0000E765",
+ @"chevron-thin-down" : @"\U0000E764",
+ @"chevron-thin-up" : @"\U0000E767",
+ @"chevron-thin-right" : @"\U0000E766",
+ @"left-thin" : @"\U00002190",
+ @"down-thin" : @"\U00002193",
+ @"up-thin" : @"\U00002191",
+ @"right-thin" : @"\U00002192",
+ @"arrow-combo" : @"\U0000E74F",
+ @"three-dots" : @"\U000023F6",
+ @"two-dots" : @"\U000023F5",
+ @"dot" : @"\U000023F4",
+ @"cc" : @"\U0001F545",
+ @"cc-by" : @"\U0001F546",
+ @"cc-nc" : @"\U0001F547",
+ @"cc-nc-eu" : @"\U0001F548",
+ @"cc-nc-jp" : @"\U0001F549",
+ @"cc-sa" : @"\U0001F54A",
+ @"cc-nd" : @"\U0001F54B",
+ @"cc-pd" : @"\U0001F54C",
+ @"cc-zero" : @"\U0001F54D",
+ @"cc-share" : @"\U0001F54E",
+ @"cc-remix" : @"\U0001F54F",
+ @"db-logo" : @"\U0001F5F9",
+ @"db-shape" : @"\U0001F5FA"
+ };
}
#pragma mark - Icons
View
112 FontasticIcons/Sources/Classes/FIEntypoSocialIcon.m
@@ -11,74 +11,58 @@
@implementation FIEntypoSocialIcon
-#pragma mark - Static fields
-
-static id _iconsDictionary = nil;
-static id _font = nil;
-
-#pragma mark - Overriden methods
-
+ (FIFont *)iconFont {
- if (_font == nil) {
- _font = [FIFont entypoSocialFont];
- }
- return _font;
+ return [FIFont entypoSocialFont];
}
-#pragma mark - Icons Dictionary
-
+ (NSDictionary *)iconsDictionary {
- if (_iconsDictionary == nil) {
- _iconsDictionary = [[NSDictionary alloc] initWithDictionary:
- @{
- @"github":@"\U0000F300",
- @"c-github":@"\U0000F301",
- @"flickr":@"\U0000F303",
- @"c-flickr":@"\U0000F304",
- @"vimeo":@"\U0000F306",
- @"c-vimeo":@"\U0000F307",
- @"twitter":@"\U0000F309",
- @"c-twitter":@"\U0000F30A",
- @"facebook":@"\U0000F30C",
- @"c-facebook":@"\U0000F30D",
- @"s-facebook":@"\U0000F30E",
- @"google+":@"\U0000F30F",
- @"c-google+":@"\U0000F310",
- @"pinterest":@"\U0000F312",
- @"c-pinterest":@"\U0000F313",
- @"tumblr":@"\U0000F315",
- @"c-tumblr":@"\U0000F316",
- @"linkedin":@"\U0000F318",
- @"c-linkedin":@"\U0000F319",
- @"dribbble":@"\U0000F31B",
- @"c-dribbble":@"\U0000F31C",
- @"stumbleupon":@"\U0000F31E",
- @"c-stumbleupon":@"\U0000F31F",
- @"lastfm":@"\U0000F321",
- @"c-lastfm":@"\U0000F322",
- @"rdio":@"\U0000F324",
- @"c-rdio":@"\U0000F325",
- @"spotify":@"\U0000F327",
- @"c-spotify":@"\U0000F328",
- @"qq":@"\U0000F32A",
- @"instagram":@"\U0000F32D",
- @"dropbox":@"\U0000F330",
- @"evernote":@"\U0000F333",
- @"flattr":@"\U0000F336",
- @"skype":@"\U0000F339",
- @"c-skype":@"\U0000F33A",
- @"renren":@"\U0000F33C",
- @"sina-weibo":@"\U0000F33F",
- @"paypal":@"\U0000F342",
- @"picasa":@"\U0000F345",
- @"soundcloud":@"\U0000F348",
- @"mixi":@"\U0000F34B",
- @"behance":@"\U0000F34E",
- @"google-circles":@"\U0000F351",
- @"vk":@"\U0000F354"
- }];
- }
- return _iconsDictionary;
+ return @{
+ @"github":@"\U0000F300",
+ @"c-github":@"\U0000F301",
+ @"flickr":@"\U0000F303",
+ @"c-flickr":@"\U0000F304",
+ @"vimeo":@"\U0000F306",
+ @"c-vimeo":@"\U0000F307",
+ @"twitter":@"\U0000F309",
+ @"c-twitter":@"\U0000F30A",
+ @"facebook":@"\U0000F30C",
+ @"c-facebook":@"\U0000F30D",
+ @"s-facebook":@"\U0000F30E",
+ @"google+":@"\U0000F30F",
+ @"c-google+":@"\U0000F310",
+ @"pinterest":@"\U0000F312",
+ @"c-pinterest":@"\U0000F313",
+ @"tumblr":@"\U0000F315",
+ @"c-tumblr":@"\U0000F316",
+ @"linkedin":@"\U0000F318",
+ @"c-linkedin":@"\U0000F319",
+ @"dribbble":@"\U0000F31B",
+ @"c-dribbble":@"\U0000F31C",
+ @"stumbleupon":@"\U0000F31E",
+ @"c-stumbleupon":@"\U0000F31F",
+ @"lastfm":@"\U0000F321",
+ @"c-lastfm":@"\U0000F322",
+ @"rdio":@"\U0000F324",
+ @"c-rdio":@"\U0000F325",
+ @"spotify":@"\U0000F327",
+ @"c-spotify":@"\U0000F328",
+ @"qq":@"\U0000F32A",
+ @"instagram":@"\U0000F32D",
+ @"dropbox":@"\U0000F330",
+ @"evernote":@"\U0000F333",
+ @"flattr":@"\U0000F336",
+ @"skype":@"\U0000F339",
+ @"c-skype":@"\U0000F33A",
+ @"renren":@"\U0000F33C",
+ @"sina-weibo":@"\U0000F33F",
+ @"paypal":@"\U0000F342",
+ @"picasa":@"\U0000F345",
+ @"soundcloud":@"\U0000F348",
+ @"mixi":@"\U0000F34B",
+ @"behance":@"\U0000F34E",
+ @"google-circles":@"\U0000F351",
+ @"vk":@"\U0000F354"
+ };
}
#pragma mark - Icons
View
13 FontasticIcons/Sources/Classes/FIIcon.m
@@ -10,9 +10,18 @@
#import "FIUtils.h"
#import "FIFont.h"
#import "FIIcon_Private.h"
+#import "FIMetaInfoManager.h"
@implementation FIIcon
++ (void)initialize {
+ FIMetaInfoManager *manager = [FIMetaInfoManager sharedManager];
+ [manager registerFont:[self iconFont]
+ forClass:self];
+ [manager registerIconSet:[self iconsDictionary]
+ forClass:self];
+}
+
- (void)dealloc {
self.iconString = nil;
self.iconName = nil;
@@ -28,7 +37,7 @@ + (NSString *)iconKeyForName:(NSString *)aName {
}
+ (FIFont *)iconFont {
- return nil;
+ return [[FIMetaInfoManager sharedManager] fontForClass:self];
}
+ (FIIcon *)iconWithName:(NSString *)anIconName {
@@ -39,7 +48,7 @@ + (FIIcon *)iconWithName:(NSString *)anIconName {
}
+ (NSDictionary *)iconsDictionary {
- return nil;
+ return [[FIMetaInfoManager sharedManager] iconSetForClass:self];
}
@end
View
21 FontasticIcons/Sources/Classes/FIMetaInfoManager.h
@@ -0,0 +1,21 @@
+//
+// FIMetaInfoManager.h
+// FontasticIcons
+//
+// Created by Alex Denisov on 29.10.12.
+// Copyright (c) 2012 Alex Denisov. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@class FIFont;
+
+@interface FIMetaInfoManager : NSObject
+
++ (FIMetaInfoManager *)sharedManager;
+- (void)registerFont:(FIFont *)aFont forClass:(Class)aClass;
+- (FIFont *)fontForClass:(Class)aClass;
+- (void)registerIconSet:(NSDictionary *)anIcons forClass:(Class)aClass;
+- (NSDictionary *)iconSetForClass:(Class)aClass;
+
+@end
View
57 FontasticIcons/Sources/Classes/FIMetaInfoManager.m
@@ -0,0 +1,57 @@
+//
+// FIMetaInfoManager.m
+// FontasticIcons
+//
+// Created by Alex Denisov on 29.10.12.
+// Copyright (c) 2012 Alex Denisov. All rights reserved.
+//
+
+#import "FIMetaInfoManager.h"
+
+@implementation FIMetaInfoManager
+{
+ NSMutableDictionary *fonts;
+ NSMutableDictionary *iconSets;
+}
+
+static id _instance = nil;
+
++ (FIMetaInfoManager *)sharedManager {
+ if (_instance == nil) {
+ _instance = [self new];
+ }
+ return _instance;
+}
+
+- (id)init {
+ self = [super init];
+ if (self) {
+ self->fonts = [NSMutableDictionary new];
+ self->iconSets = [NSMutableDictionary new];
+ }
+ return self;
+}
+
+- (void)registerFont:(FIFont *)aFont forClass:(Class)aClass {
+ NSString *key = NSStringFromClass(aClass);
+ [self->fonts setValue:aFont
+ forKey:key];
+}
+
+- (FIFont *)fontForClass:(Class)aClass {
+ NSString *key = NSStringFromClass(aClass);
+ return [self->fonts valueForKey:key];
+}
+
+- (void)registerIconSet:(NSDictionary *)anIcons forClass:(Class)aClass {
+ NSString *key = NSStringFromClass(aClass);
+ [self->iconSets setValue:anIcons
+ forKey:key];
+}
+
+- (NSDictionary *)iconSetForClass:(Class)aClass {
+ NSString *key = NSStringFromClass(aClass);
+ return [self->iconSets valueForKey:key];
+}
+
+@end
View
19 LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2012 Alexey Denisov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
33 README.markdown
@@ -0,0 +1,33 @@
+## FontasticIcons
+
+FontasticIcons is an Objective-C wrapper for iconic fonts.
+
+## Installation
+
+### With CocoaPods
+
+ pod 'FontasticIcons'
+
+### Manual
+
+Just add sources from `FontasticIcons/Sources` directory to your project.
+
+## Usage
+
+ FIIconView *iconView = [[FIIconView alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
+ iconView.backgroundColor = [UIColor clearColor];
+ iconView.icon = [FIEntypoIcon leafIcon];
+ iconView.padding = 2;
+ iconView.iconColor = [UIColor greenColor];
+ [self.view addSubview:iconView];
+
+## Available fonts
+
+Right now added only [Entypo](http://www.entypo.com/) font.
+
+## License
+
+Source code distributed under MIT license.
+
+**Note that all fonts have it's own license.**
+

0 comments on commit afae628

Please sign in to comment.
Something went wrong with that request. Please try again.