diff --git a/.gitignore b/.gitignore index e4f3572cba..a7fde6bd31 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ Products *.pbxuser *.perspectivev3 *.mode1v3 -*.xcworkspace xcuserdata .DS_Store config @@ -18,4 +17,9 @@ src/Three20UINavigator/*.h src/Three20UI/*.h extensions/ -*.pyc \ No newline at end of file +*.pyc +Docs + +# we don't support xcworkspaces for single projects. Use Three20.xcworkspace instead +*.xcworkspace +!Three20.xcworkspace diff --git a/AUTHORS b/AUTHORS index 15b9adf51b..d387e31c3d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,8 @@ Owen Yamauchi github.com/oyamauchi oyamauchi@facebook.com Jeff Verkoeyen github.com/jverkoey jverkoey@gmail.com John Wang github.com/jwang jwang392@gmail.com Stephan Diederich github.com/diederich stephan.diederich@googlemail.com +Adar Porat github.com/aporat adar.porat@gmail.com +Tobias Klonk github.com/tonklon me@tonklon.com Contributors ------------ diff --git a/Build/ignoreme b/Build/ignoreme deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/samples/Resources/Icon.png b/Icon.png similarity index 100% rename from samples/Resources/Icon.png rename to Icon.png diff --git a/README.mdown b/README.mdown index df179e6b9c..0fe71e8700 100644 --- a/README.mdown +++ b/README.mdown @@ -1,172 +1,29 @@ -Three20 -======= - -Three20 is a collection of iPhone UI classes, like a photo viewer, and general -utilities, like an HTTP disk cache. Three20 is derived from the -[Facebook iPhone app][], which is one of the most downloaded iPhone apps ever. - -[![](http://farm4.static.flickr.com/3447/3378092101_40a62a04b2_m.jpg)](http://farm4.static.flickr.com/3447/3378092101_b064d8e339_o.jpg) -[![](http://farm4.static.flickr.com/3432/3378117315_846547cfba_m.jpg)](http://farm4.static.flickr.com/3432/3378117315_3bf905bdb6_o.jpg) -[![](http://farm4.static.flickr.com/3462/3378171111_ec1208541d_m.jpg)](http://farm4.static.flickr.com/3462/3378171111_666173111d_o.jpg) -[![](http://farm4.static.flickr.com/3646/3378998444_d0534d337f_m.jpg)](http://farm4.static.flickr.com/3646/3378998444_8d3b1eeef8_o.jpg) -[![](http://farm4.static.flickr.com/3552/3378940896_7b23cca98e_m.jpg)](http://farm4.static.flickr.com/3552/3378940896_8ccb5ea1c8_o.jpg) -[![](http://farm4.static.flickr.com/3382/3425636810_483f1b65a6_m.jpg)](http://farm4.static.flickr.com/3382/3425636810_b0a578bb22_o.jpg) - -Community -========= - -If you would like to ask any questions regarding Three20, please check out any of the following: - -* [Three20.info][] -* [Three20 Mailing List][] -* [Three20 Tagged Questions on StackOverflow][] - -Adding Three20 to your project -============================== - -Three20 is compiled as static libraries. It use Xcode's "dependent project" facilities. -There are two methods of adding Three20 to your project. - -The first is with the [TTModule Python Script][]. - -The Second option is to add it to your project manually. Here is how: -**Estimated time:** 5 minutes. - -1. Clone the three20 git repository: `git clone git://github.com/facebook/three20.git`. Make sure - you store the repository in a permanent place because Xcode will need to reference the files - every time you compile your project. - -2. Locate the "Three20.xcodeproj" file under "`three20/src/Three20/`". Drag Three20.xcodeproj and - drop it onto the root of your Xcode project's "Groups and Files" sidebar. A dialog will - appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project" - before clicking "Add". - -3. Open the Three20 Xcode Project that you just added to your app and expand the "Dependencies" - group. Select all of the projects listed there and drag them to your app as well. You should - now have the following list of Three20 projects added to your app: - * Three20Core - * Three20Network - * Three20Style - * Three20UICommon - * Three20UINavigator - * Three20UI - * Three20 - -4. Now you need to link the Three20 static libraries to your project. Select all of the - project items that you just added to the sidebar. Under the "Details" table, you will see - a number of items, such as libThree20.a and libThree20Core.a. Check the checkbox on the - far right for each of the `lib` files (not the UnitTests). This will link each part of the - Three20 framework to your app. - -5. Now you need to add Three20 as a dependency of your project, so Xcode compiles it whenever - you compile your project. Expand the "Targets" section of the sidebar and double-click your - application's target. Under the "General" tab you will see a "Direct Dependencies" section. - Click the "+" button, select "Three20" and each of the other libs, and click "Add Target". - You do *not* need to add the `UnitTests` target for each lib. +Archived Repo +============= -6. Now you need to add the bundle of images and strings to your app. Locate "Three20.bundle" under - "three20/src" and drag and drop it into your project. A dialog will appear -- make sure - "Create Folder References" is selected, "Copy items" is unchecked, and "Reference Type" is - "Relative to Project" before clicking "Add". +**This is an archived project and is no longer supported or updated by Facebook. Please do not file issues or pull-requests against this repo. If you wish to continue to develop this code yourself, we recommend you fork it.** -7. Now you need to add the Core Animation framework to your project. Right click on the - "Frameworks" group in your project (or equivalent) and select Add > Existing Frameworks. - Then locate QuartzCore.framework and add it to the project. +**Proceed and be bold!** -8. Finally, we need to tell your project where to find the Three20 headers. Open your - "Project Settings" and go to the "Build" tab. Look for "Header Search Paths" and double-click - it. Add the relative path from your project's directory to the - "three20/Build/Products/three20" directory. - -9. While you are in Project Settings, go to "Other Linker Flags" under the "Linker" section, and - add "-ObjC" and "-all_load" to the list of flags. - -10. You're ready to go. Just #import "Three20/Three20.h" anywhere you want to use Three20 classes - in your project. - -An Overview of Three20 -====================== - -Photo Viewer ------------- - -[TTPhotoViewController][] emulates Apple's Photos app with all of its flick n' pinch delight. -You can supply your own "photo sources", which works similiarly to the data sources used by -UITableView. Unlike Apple's Photos app, it isn't limited to photos stored locally. Your -photos can be loaded from the network, and long lists of photos can be loaded incrementally. - -Message composer ----------------- - -[TTMessageController][] emulates the message composer in Apple's Mail app. You can customize it -to send any kind of message you want. Include your own set of message fields, or use the -standard "To:" and "Subject:". Recipient names can be autocompleted from a data source that -you provide. - -Web image views ------------------------ - -[TTImageView][] makes it as easy to display an image as it is in HTML. Just supply the URL -of the image, and TTImageView loads it and displays it efficiently. TTImageView also works -with the HTTP cache described below to avoid hitting the network when possible. - -Internet-aware table view controllers ---------------------------------------- - -[TTTableViewController][] and [TTTableViewDataSource][] help you to build tables which load -their content from the Internet. Rather than just assuming you have all the data ready to go, -like UITableView does by default, TTTableViewController lets you communicate when your data is -loading, and when there is an error or nothing to display. It also helps you to add a "More" -button to load the next page of data, and optionally supports reloading the data by shaking the -device. - -Better text fields ------------------- - -[TTTextEditor][] is a UITextView which can grow in height automatically as you type. I use -this for entering messages in Facebook Chat, and it behaves similarly to the editor in Apple's -SMS app. - -[TTPickerTextField][] is a type-ahead UITextField. As you type it searches a data source, and -it adds bubbles into the flow of text when you choose a type-ahead option. I use this in -TTMessageController for selecting the names of message recipients. - -HTTP disk cache --------------- +Three20 +======= -[TTURLRequest][] is a replacement for NSURLRequest which supports a disk cache (NSURLRequest -can only cache in RAM). It has some other nice features too. HTTP posts are as easy as -supplying a dictionary of parameters. The TTURL loading system can also be suspended and -resumed at any time, which is a great performance helper. Network threads often fight with -the UI thread, so you can suspend the network any time your app is momentarily graphically -intensive. +What now? +------ -URL-based Navigation --------------------- +If you updated to this revision by accident (e.g. a git pull), you might want to switch back to the +version you had before (`git checkout cc672132ab`). -[TTNavigator][] is for those grizzled old web developers like myself who want to -organize their app by "pages" which can be displayed by visiting a URL. +Three20 still compiles and seems to work on iOS6, so there's no immediate need to remove everything now. +Still, as the library is not maintained anymore, it might be a good time to replace it. -Your view controllers can simply register URL patterns that they handle, and when those URLs -are visited the controllers will be created and displayed. You can also register generic -actions that are called when a URL is visited. +Lots of Three20's helpers are not needed anymore, as they are now present right in iOS. +For other parts there are some really good replacement available. +If you're searching for a full replacement, [NimbusKit](http://nimbuskit.info) might help, they even provide a [migration guide](http://wiki.nimbuskit.info/Three20-Migration-Guide). -TTNavigator also persists and restores the full path of navigation controllers and modal -view controllers, so your users can quite the app and come back exactly where they left off. +Links +------ -Learn more at [Three20.info][] +[Three20 Mailing List](http://groups.google.com/group/three20/) -[Facebook iPhone app]: http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284882215&mt=8 -[Three20.info]: http://Three20.info -[Three20 Mailing List]: http://groups.google.com/group/three20/ -[Three20 Tagged Questions on StackOverflow]: http://stackoverflow.com/questions/tagged/three20 -[TTPhotoViewController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTPhotoViewController.h -[TTMessageController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTMessageController.h -[TTImageView]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTImageView.h -[TTTableViewController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTableViewController.h -[TTTableViewDataSource]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTableViewDataSource.h -[TTURLRequest]: http://github.com/facebook/three20/blob/master/src/Three20Network/Headers/TTURLRequest.h -[TTTextEditor]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTextEditor.h -[TTPickerTextField]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTPickerTextField.h -[TTNavigator]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTNavigator.h -[TTModule Python Script]: http://three20.info/article/2010-10-06-Adding-Three20-To-Your-Project \ No newline at end of file +[Three20 Tagged Questions on StackOverflow](http://stackoverflow.com/questions/tagged/three20) diff --git a/config.template b/config.template deleted file mode 100644 index b955f4622b..0000000000 --- a/config.template +++ /dev/null @@ -1,17 +0,0 @@ -; -; This Three20 config file is used by various scripts in the Three20 ecosystem to -; change configuration settings. -; -; NOTICE: This is just a template. Changes to this file will not be noticed by scripts. -; To configure Three20, copy this file and rename it to "config" in the same folder. -; -; This file represents the assumed "defaults" when the config file does not exist. -; - -; The Three20 lint tool validates source code for the Three20 style guidelines to ensure a -; consistent style across the code base. -[lint] - -; By default, Three20 will run the linter on all Three20 projects. If you are hacking on -; Three20 and don't really care about stylistic consistency, set this to false. -enabled_for_projects = true diff --git a/diffstrings.py b/diffstrings.py deleted file mode 100755 index ca79e8f4cd..0000000000 --- a/diffstrings.py +++ /dev/null @@ -1,656 +0,0 @@ -#!/usr/bin/env python - -usage = """usage: %prog [options] path1 path2 ... - -diffstrings compares your primary locale with all your other locales to help you determine which new strings need to be translated. It outputs XML files which can be translated, and then merged back into your strings files. - -The path arguments supplied to this script should be the path containing your source files. The file system will be searched to find the .lproj directories containing the Localizable.strings files that the script will read and write. -""" - -import os.path, codecs, optparse, re, datetime -from xml.sax.saxutils import escape -from xml.dom import minidom - -################################################################################################### - -global xmlFormat -xmlFormat = {} - -reLprojFileName = re.compile(r'(.+?)\.lproj') -reStringsFileName = re.compile(r'(.+?)\.strings') -reComment = re.compile(r'/\*(.*?)\*/') -reString = re.compile(r'\s*"((\\.|.)+?)"\s*=\s*"(.+?)";') -reVariable = re.compile(r'%(@|d|f|lld|\d+\.?f|\d+\.\d+f|\d+d)') -reEnumeratedVariable = re.compile('(%?\d+\$)') - -defaultComment = "No comment provided by engineer." - -################################################################################################### - -def generateProjects(projects): - for project in projects: - project.generateStrings() - -def diffProjects(projects, sourceLocaleName, focusedLocaleName=None, verbose=False, dryRun=False): - compiledStrings = {} - sourceMap = {} - for project in projects: - project.compileStrings(compiledStrings, focusedLocaleName) - project.compileSourceMap(sourceMap) - - if sourceLocaleName not in compiledStrings: - print "WARNING: No '%s' locale found!" % sourceLocaleName - else: - sourceStrings = compiledStrings[sourceLocaleName] - - if verbose: - print "\n", "=" * 80 - print "* %s has %d total strings." \ - % (sourceLocaleName, len(sourceStrings.strings)) - print "=" * 80 - - for localeName, localizedStrings in compiledStrings.iteritems(): - if localizedStrings != sourceStrings: - sourceStrings.diffReport(localizedStrings) - - for localeName, localizedStrings in compiledStrings.iteritems(): - if localizedStrings != sourceStrings: - translation = sourceStrings.diff(localizedStrings) - if not dryRun: - translation.save(".", sourceMap=sourceMap) - -def mergeProjects(projects, sourceLocaleName, focusedLocaleName=None, verbose=False, dryRun=False): - translations = {} - - for project in projects: - sourceStrings = project.condenseStringSourceFiles() - sourceStrings.save() - - for localeName, localizedStrings in project.locales.iteritems(): - if not focusedLocaleName or focusedLocaleName == localeName: - if localizedStrings.name in translations: - translation = translations[localizedStrings.name] - else: - translation = Translation(localizedStrings.name) - translation.open(".") - translations[localizedStrings.name] = translation - - if translation.strings: - if verbose: - localizedStrings.mergeReport(sourceStrings, translation) - - localizedStrings.mergeTranslation(sourceStrings, translation) - if not dryRun: - localizedStrings.save() - else: - if verbose: - print "no translation.strings for %s, sad" % localeName - -################################################################################################### - -class XcodeProject(object): - def __init__(self, path, sourceLocaleName): - self.path = path - self.sourceLocaleName = sourceLocaleName - self.sourceLocalePath = self.__findStringsFile(sourceLocaleName, self.path) - self.stringSourceFiles = list(self.__iterateSourceStrings()) - - self.locales = {} - for localeName, localizedStrings in self.__iterateLocalizableStrings(): - self.locales[localeName] = localizedStrings - - def condenseStringSourceFiles(self): - """ Copies all strings from all sources files into a single file.""" - sourceStrings = LocalizableStrings(self.sourceLocaleName) - - sourceStrings.path = self.__findSourceStringsPath() - if not sourceStrings.path: - sourceStrings.path = os.path.join(self.sourceLocalePath, "Localizable.strings") - - for sourceFile in self.stringSourceFiles: - sourceStrings.update(sourceFile) - return sourceStrings - - def compileStrings(self, compiledStrings, focusedLocaleName=None): - """ Copies all strings in a dictionary for each locale.""" - - if not self.sourceLocaleName in compiledStrings: - compiledStrings[self.sourceLocaleName] = LocalizableStrings(self.sourceLocaleName) - compiledStringsFile = compiledStrings[self.sourceLocaleName] - - for sourceStrings in self.stringSourceFiles: - compiledStringsFile.update(sourceStrings) - - if focusedLocaleName: - locales = {focusedLocaleName: self.locales[focusedLocaleName]} - else: - locales = self.locales - - for localeName, sourceStrings in locales.iteritems(): - if not localeName in compiledStrings: - compiledStringsFile = LocalizableStrings(localeName) - compiledStrings[localeName] = compiledStringsFile - else: - compiledStringsFile = compiledStrings[localeName] - - compiledStringsFile.update(sourceStrings) - - def compileSourceMap(self, sourceMap): - for sourceStrings in self.stringSourceFiles: - for source in sourceStrings.strings: - if not source in sourceMap: - sourceMap[source] = [] - - name,ext = os.path.splitext(os.path.basename(sourceStrings.path)) - sourceMap[source].append(name) - - def generateStrings(self): - buildPath = None - - cwd = os.getcwd() - os.chdir(self.path) - - extras = "" - if os.path.isdir(os.path.join(self.path, "Three20.xcodeproj")): - extras = " -s TTLocalizedString" - - for fileName in os.listdir(self.path): - name,ext = os.path.splitext(fileName) - if ext == ".m": - if not buildPath: - buildPath = self.__makeBuildPath() - if not os.path.isdir(buildPath): - os.makedirs(buildPath) - - command = "genstrings %s -o %s%s" % (fileName, buildPath, extras) - print " %s" % command - os.system(command) - - resultPath = os.path.join(buildPath, "Localizable.strings") - if os.path.isfile(resultPath): - renamedPath = os.path.join(buildPath, "%s.strings" % name) - os.rename(resultPath, renamedPath) - - os.chdir(cwd) - - def __findStringsFile(self, localeName, searchPath): - dirName = "%s.lproj" % localeName - localeDirPath = os.path.join(searchPath, dirName) - if os.path.isdir(localeDirPath): - return localeDirPath - - for name in os.listdir(searchPath): - path = os.path.join(searchPath, name) - if os.path.isdir(path): - localeDirPath = self.__findStringsFile(localeName, path) - if localeDirPath: - return localeDirPath - - return None - - def __iterateSourceStrings(self): - buildPath = self.__makeBuildPath() - if not os.path.exists(buildPath): - for path in self.__findSourceStrings(): - yield path - else: - for fileName in os.listdir(buildPath): - name,ext = os.path.splitext(fileName) - if ext == ".strings": - strings = LocalizableStrings(self.sourceLocaleName) - - filePath = os.path.join(buildPath, fileName) - strings.open(filePath) - yield strings - - def __findSourceStringsPath(self): - for name in os.listdir(self.sourceLocalePath): - m = reStringsFileName.match(name) - if m: - return os.path.join(self.sourceLocalePath, name) - - def __findSourceStrings(self): - for name in os.listdir(self.sourceLocalePath): - m = reStringsFileName.match(name) - if m: - strings = LocalizableStrings(self.sourceLocaleName) - - filePath = os.path.join(self.sourceLocalePath, name) - strings.open(filePath) - yield strings - - def __iterateLocalizableStrings(self): - dirPath = os.path.dirname(self.sourceLocalePath) - for dirName in os.listdir(dirPath): - m = reLprojFileName.match(dirName) - if m: - localeName = m.groups()[0] - if localeName != self.sourceLocaleName: - strings = LocalizableStrings(localeName) - - localeDirPath = os.path.join(dirPath, dirName) - for name in os.listdir(localeDirPath): - m = reStringsFileName.match(name) - if m: - filePath = os.path.abspath(os.path.join(localeDirPath, name)) - strings.open(filePath) - break - - yield localeName, strings - - def __makeBuildPath(self): - return os.path.join(self.path, "build", "i18n") - -################################################################################################### - -class LocalizableStrings(object): - def __init__(self, name): - self.name = name - self.path = None - self.strings = {} - self.comments = {} - - def open(self, path): - if os.path.isfile(path): - self.path = path - self.__parse() - - def save(self, path=None, suffix=""): - text = self.generate() - if text: - if path: - filePath = self.__makePath(path, suffix) - else: - filePath = self.path - - print "***** Saving %s" % filePath - f = codecs.open(filePath, 'w', 'utf-16') - f.write(text) - f.close() - - def generate(self): - lines = [] - - # This may not sort non-English strings sensibly, but the order itself - # doesn't matter - this is just so that the strings come out in some - # consistent order every time. (Less efficient, but oh well.) - for source in sorted(self.strings.keys()): - if source in self.comments: - comment = self.comments[source] - lines.append("/* %s */" % comment) - lines.append('"%s" = "%s";\n' % (source, self.strings[source])) - - return "\n".join(lines) - - def mergeTranslation(self, sourceStrings, translation): - for source in sourceStrings.strings: - sourceEnum = enumerateStringVariables(source) - if sourceEnum in translation.strings: - targetEnum = translation.strings[sourceEnum] - target = denumerateStringVariables(targetEnum) - self.strings[source] = target - - def update(self, other): - self.strings.update(other.strings) - self.comments.update(other.comments) - - def diff(self, localizedStrings): - translation = Translation(localizedStrings.name) - - for source, target in self.strings.iteritems(): - sourceEnum = enumerateStringVariables(source) - - if source in localizedStrings.strings: - target = localizedStrings.strings[source] - translation.translated[sourceEnum] = True - - targetEnum = enumerateStringVariables(target) - translation.strings[sourceEnum] = targetEnum - - if source in self.comments: - translation.comments[sourceEnum] = self.comments[source] - - return translation - - def diffReport(self, localizedStrings): - name = localizedStrings.name - newStrings = list(self.__compare(localizedStrings)) - obsoleteStrings = list(localizedStrings.__compare(self)) - troubleStrings = list(self.__compareSizes(localizedStrings)) - - print "\n", "=" * 80 - - if not len(newStrings): - if len(obsoleteStrings): - print "%s is fully translated, but has %s obsolete strings" \ - % (name, len(obsoleteStrings)) - else: - print "%s is fully translated" % name - else: - existingCount = len(self.strings) - len(newStrings) - if len(obsoleteStrings): - print "%s has %s new strings, %s translated, and %s obsolete."\ - % (name, len(newStrings), existingCount, len(obsoleteStrings)) - else: - print "%s has %s new strings, with %s already translated."\ - % (name, len(newStrings), existingCount) - print "=" * 80 - - if len(newStrings): - print "\n---- %s NEW STRINGS ---\n" % name - print "\n".join(newStrings) - - if len(obsoleteStrings): - print "\n---- %s OBSOLETE STRINGS ---\n" % name - print "\n".join(obsoleteStrings) - - if len(troubleStrings): - print "\n---- %s TROUBLE STRINGS ---\n" % name - - for source, diff in sorted(troubleStrings, lambda a,b: cmp(b[1], a[1])): - print "%3d. %s " % (diff, codecs.encode(source, 'utf-8')) - print " %s " % codecs.encode(localizedStrings.strings[source], 'utf-8') - - print "\n" - - def mergeReport(self, sourceStrings, translation): - name = self.name - updatedStrings = [] - ignoredStrings = [] - - for source in sourceStrings.strings: - sourceEnum = enumerateStringVariables(source) - if sourceEnum in translation.strings: - targetEnum = translation.strings[sourceEnum] - target = denumerateStringVariables(targetEnum) - if source not in self.strings or target != self.strings[source]: - updatedStrings.append(source) - else: - ignoredStrings.append(source) - - print "\n", "=" * 80 - print self.path - print "%d newly translated strings and %d untranslated strings" \ - % (len(updatedStrings), len(ignoredStrings)) - print "=" * 80 - - if len(updatedStrings): - print "\n---- %s NEWLY TRANSLATED STRINGS ---\n" % name - print "\n".join(updatedStrings) - - if len(ignoredStrings): - print "\n---- %s UNTRANSLATED STRINGS ---\n" % name - print "\n".join(ignoredStrings) - - def __makePath(self, path=".", suffix=""): - fileName = "Localizable%s.strings" % (suffix) - return os.path.abspath(os.path.join(path, fileName)) - - def __parse(self): - lastIdentical = False - lastComment = None - for line in openWithProperEncoding(self.path): - m = reString.search(line) - if m: - source = m.groups()[0] - target = m.groups()[2] - self.strings[source] = target - if lastComment: - self.comments[source] = lastComment - lastComment = None - if lastIdentical: - lastIdentical = False - else: - m = reComment.search(line) - if m: - comment = m.groups()[0].strip() - if comment != defaultComment: - lastComment = comment - - def __compare(self, other, compareStrings=False): - for source, target in self.strings.iteritems(): - if source in other.strings: - target = other.strings[source] - if compareStrings and target == source: - yield source - else: - yield source - - def __compareSizes(self, other): - for source, target in self.strings.iteritems(): - if source in other.strings: - target = other.strings[source] - ratio = float(len(target)) / len(source) - diff = len(target) - len(source) - if ratio > 1.3 and diff > 5: - yield (source, diff) - -################################################################################################### - -class Translation(object): - def __init__(self, name): - self.name = name - self.path = None - self.strings = {} - self.translated = {} - self.comments = {} - - def open(self, path=".", suffix=""): - filePath = self.__makePath(path, suffix) - if os.path.isfile(filePath): - self.__parse(filePath) - - def save(self, path=None, suffix="", sourceMap=None): - text = self.generate(sourceMap) - if text: - if path: - filePath = self.__makePath(path, suffix) - else: - filePath = self.path - - print "***** Saving %s" % filePath - #print codecs.encode(text, 'utf-8') - - f = codecs.open(filePath, 'w', 'utf-16') - f.write(text) - f.close() - - def generate(self, sourceMap=None): - lines = [] - - global xmlFormat - prefix = xmlFormat['prefix'] - - lines.append('') - lines.append('<%sexternal>' % prefix) - lines.append(' ') - if xmlFormat['appName']: - lines.append(' %s' % xmlFormat['appName']) - lines.append(' %s' % datetime.datetime.now().strftime('%Y%m%d')) - lines.append(' %s' % self.name) - lines.append(' ') - - for sourceFileName, sourceFileStrings in self.__invertSourceMap(sourceMap): - lines.append(" " % sourceFileName) - for source in sourceFileStrings: - target = self.strings[source] - - lines.append(" ") - lines.append(" <%ssource>%s" % (prefix, escape(source), prefix)) - - if source in self.translated: - lines.append(" <%sxtarget>%s" % (prefix, escape(target), prefix)) - else: - lines.append(" <%starget>%s" % (prefix, escape(target), prefix)) - - if source in self.comments: - lines.append(" <%sdescription>%s" - % (prefix, escape(self.comments[source]), prefix)) - - lines.append(" ") - - lines.append('' % prefix) - - return "\n".join(lines) - - def __makePath(self, path=".", suffix=""): - fileName = "%s%s.xml" % (self.name, suffix) - return os.path.abspath(os.path.join(path, fileName)) - - def __parse(self, filePath): - self.path = filePath - - global xmlFormat - prefix = xmlFormat['prefix'] - - document = minidom.parse(filePath) - for entry in document.documentElement.childNodes: - if entry.nodeType == 1: - source = None - target = None - translated = False - - sources = entry.getElementsByTagName("%ssource" % prefix) - if len(sources): - source = sources[0] - source = source.childNodes[0].data - - targets = entry.getElementsByTagName("%sxtarget" % prefix) - if not len(targets): - targets = entry.getElementsByTagName("%starget" % prefix) - translated = True - - if len(targets): - target = targets[0] - target = target.childNodes[0].data - - if source and target: - self.strings[source] = target - if translated: - self.translated[source] = True - - def __invertSourceMap(self, sourceMap): - sourceFileMap = {} - - for sourceEnum in self.strings: - source = denumerateStringVariables(sourceEnum) - if source in sourceMap: - sourcePaths = sourceMap[source] - for sourcePath in sourcePaths: - if sourcePath not in sourceFileMap: - sourceFileMap[sourcePath] = [] - sourceFileMap[sourcePath].append(sourceEnum) - break - - for sourceName, sourceFileStrings in sourceFileMap.iteritems(): - sourceFileStrings.sort() - - keys = sourceFileMap.keys() - keys.sort() - - for key in keys: - yield key, sourceFileMap[key] - -################################################################################################### -## Helpers - -def openProjects(projectDirPaths, sourceLocaleName): - for projectDirPath in projectDirPaths: - yield XcodeProject(projectDirPath, sourceLocaleName) - -def openWithProperEncoding(path): - if not os.path.isfile(path): - return [] - - try: - f = codecs.open(path, 'r', 'utf-16') - lines = f.read().splitlines() - f.close() - except UnicodeError,exc: - f = codecs.open(path, 'r', 'utf-8') - lines = f.read().splitlines() - f.close() - - return lines - -def enumerateStringVariables(s): - i = 1 - for var in reVariable.findall(s): - s = s.replace("%%%s" % var, "%%%d$%s" % (i, var), 1) - i += 1 - return s - -def denumerateStringVariables(s): - for var in reEnumeratedVariable.findall(s): - s = s.replace(var, "%") - return s - -################################################################################################### -## Main - -def parseOptions(): - parser = optparse.OptionParser(usage) - parser.set_defaults(locale="en", focus=None, build=False, merge=False, diff=False, - verbose=False, dryrun=False, appName="", prefix="") - - parser.add_option("-l", "--locale", dest="locale", type="str", - help = "The name of your source locale. The default is 'en'.") - - parser.add_option("-f", "--focus", dest="focus", type="str", - help = "The name of the locale to operate on, excluding all others.") - - parser.add_option("-v", "--verbose", dest="verbose", action="store_true", - help = "Verbose reporting of activity.") - - parser.add_option("-r", "--dryrun", dest="dryrun", action="store_true", - help = "Print the output of files instead of saving them.") - - parser.add_option("-b", "--build", dest="build", action="store_true", - help = "Runs genstrings on each source file in each project.") - - parser.add_option("-d", "--diff", dest="diff", action="store_true", - help="Generates a diff of each locale against the source locale. Each locale's diff will be stored in a file in the working directory named .xml.") - - parser.add_option("-m", "--merge", dest="merge", action="store_true", - help="Merges strings from the .xml file in the working directory back into the Localized.strings files in each locale.") - - parser.add_option("-p", "--prefix", dest="prefix", type="str", - help="The prefix to use on the xml tags.") - - parser.add_option("-a", "--appname", dest="appName", type="str", - help="The name of the application to include in the xml metadata.") - - options, arguments = parser.parse_args() - paths = ["."] if not len(arguments) else arguments - if not options.merge: - options.diff = True - - return options, paths - -def main(): - options, projectPaths = parseOptions() - projectPaths = [os.path.abspath(os.path.expanduser(path)) for path in projectPaths] - - global xmlFormat - xmlFormat['prefix'] = options.prefix - xmlFormat['appName'] = options.appName - - projects = list(openProjects(projectPaths, options.locale)) - - if options.build: - print "******* Generating strings *******" - generateProjects(projects) - print "" - - if options.merge: - print "******* Merging *******" - mergeProjects(projects, options.locale, options.focus, options.verbose, options.dryrun) - print "" - - if options.diff: - print "******* Diffing *******" - diffProjects(projects, options.locale, options.focus, options.verbose, options.dryrun) - print "" - -if __name__ == "__main__": - main() diff --git a/extensions/ignoreme b/extensions/ignoreme deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/project.dev b/project.dev deleted file mode 100755 index 2ac63fc4e8..0000000000 --- a/project.dev +++ /dev/null @@ -1,3 +0,0 @@ - -name = "Three20" -description = "Three20 iPhone library" diff --git a/samples/Core/TTCoreDemo/Classes/AppDelegate.h b/samples/Core/TTCoreDemo/Classes/AppDelegate.h deleted file mode 100644 index 3ef3eb0265..0000000000 --- a/samples/Core/TTCoreDemo/Classes/AppDelegate.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@class PlaygroundViewController; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { - UIWindow* _window; - PlaygroundViewController* _controller; -} - -@end - diff --git a/samples/Core/TTCoreDemo/Classes/AppDelegate.m b/samples/Core/TTCoreDemo/Classes/AppDelegate.m deleted file mode 100644 index 51f2f8331a..0000000000 --- a/samples/Core/TTCoreDemo/Classes/AppDelegate.m +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "AppDelegate.h" - -// View Controllers -#import "PlaygroundViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication*)application { - _window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; - _window.backgroundColor = [UIColor whiteColor]; - - _controller = [[PlaygroundViewController alloc] init]; - [_window addSubview:_controller.view]; - - [_window makeKeyAndVisible]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) dealloc { - TT_RELEASE_SAFELY(_window); - TT_RELEASE_SAFELY(_controller); - - [super dealloc]; -} - - -@end diff --git a/samples/Core/TTCoreDemo/Classes/PlaygroundViewController.h b/samples/Core/TTCoreDemo/Classes/PlaygroundViewController.h deleted file mode 100644 index 9c94c56340..0000000000 --- a/samples/Core/TTCoreDemo/Classes/PlaygroundViewController.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -@interface PlaygroundViewController : UIViewController { - UIScrollView* _scrollView; -} - -@end diff --git a/samples/Core/TTCoreDemo/Classes/PlaygroundViewController.m b/samples/Core/TTCoreDemo/Classes/PlaygroundViewController.m deleted file mode 100644 index 5d52d91a4b..0000000000 --- a/samples/Core/TTCoreDemo/Classes/PlaygroundViewController.m +++ /dev/null @@ -1,200 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "PlaygroundViewController.h" - -#import - -static const CGFloat kFramePadding = 10; -static const CGFloat kElementSpacing = 5; -static const CGFloat kGroupSpacing = 10; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation PlaygroundViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat) addHeader:(NSString*)text yOffset:(CGFloat)yOffset { - UILabel* label = [[UILabel alloc] initWithFrame:CGRectZero]; - label.text = text; - label.font = [UIFont systemFontOfSize:20]; - label.numberOfLines = 0; - - CGRect frame = label.frame; - frame.origin.x = kFramePadding; - frame.origin.y = yOffset; - frame.size.width = 320 - kFramePadding * 2; - frame.size.height = [text sizeWithFont:label.font - constrainedToSize:CGSizeMake(frame.size.width, 10000)].height; - label.frame = frame; - - [_scrollView addSubview:label]; - - yOffset += label.frame.size.height + kElementSpacing; - - TT_RELEASE_SAFELY(label); - - return yOffset; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat) addText:(NSString*)text yOffset:(CGFloat)yOffset { - UILabel* label = [[UILabel alloc] initWithFrame:CGRectZero]; - label.text = text; - label.numberOfLines = 0; - - CGRect frame = label.frame; - frame.origin.x = kFramePadding; - frame.origin.y = yOffset; - frame.size.width = 320 - kFramePadding * 2; - frame.size.height = [text sizeWithFont:label.font - constrainedToSize:CGSizeMake(frame.size.width, 10000)].height; - label.frame = frame; - - [_scrollView addSubview:label]; - - yOffset += label.frame.size.height + kElementSpacing; - - TT_RELEASE_SAFELY(label); - - return yOffset; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) loadView { - [super loadView]; - - _scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds]; - _scrollView.autoresizingMask = - UIViewAutoresizingFlexibleWidth - | UIViewAutoresizingFlexibleHeight; - - [self.view addSubview:_scrollView]; - - CGFloat yOffset = kFramePadding; - - yOffset = [self addHeader:NSLocalizedString(@"TTDebug", @"") yOffset:yOffset]; - - { - UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - [button setTitle:NSLocalizedString(@"Debug test", @"") forState:UIControlStateNormal]; - [button addTarget: self - action: @selector(debugTestAction) - forControlEvents: UIControlEventTouchUpInside]; - [button sizeToFit]; - - CGRect frame = button.frame; - frame.origin.x = kFramePadding; - frame.origin.y = yOffset; - button.frame = frame; - - [_scrollView addSubview:button]; - - yOffset += frame.size.height; - } - - yOffset += kGroupSpacing; - - yOffset = [self addHeader:NSLocalizedString(@"TTGlobalCoreLocale", @"") yOffset:yOffset]; - yOffset = [self addText:[NSString stringWithFormat:NSLocalizedString(@"Current locale: %@", @""), - [TTCurrentLocale() - displayNameForKey:NSLocaleIdentifier - value:[TTCurrentLocale() localeIdentifier]]] - yOffset:yOffset]; - yOffset += kGroupSpacing; - - yOffset = [self addHeader:NSLocalizedString(@"TTGlobalCorePaths", @"") yOffset:yOffset]; - yOffset = [self addText:[NSString stringWithFormat:NSLocalizedString(@"Bundle path: %@", @""), - TTPathForBundleResource(@"Icon.png")] - yOffset:yOffset]; - yOffset = [self addText:[NSString stringWithFormat:NSLocalizedString(@"Document path: %@", @""), - TTPathForDocumentsResource(@"document.pdf")] - yOffset:yOffset]; - yOffset += kGroupSpacing; - - yOffset = [self addHeader:NSLocalizedString(@"NSDataAdditions", @"") yOffset:yOffset]; - yOffset = [self addText:[NSString stringWithFormat:NSLocalizedString(@"MD5 Hash of \"Three20\": %@", @""), - [[@"Three20" dataUsingEncoding:NSUTF8StringEncoding] md5Hash]] - yOffset:yOffset]; - yOffset += kGroupSpacing; - - [_scrollView setContentSize:CGSizeMake(320, yOffset)]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) viewDidUnload { - [super viewDidUnload]; - - TT_RELEASE_SAFELY(_scrollView); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - - [_scrollView flashScrollIndicators]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) debugTestAction { -#ifdef DEBUG - NSLog(@"Three20 debug logging is currently...ON"); -#else - NSLog(@"Three20 debug logging is currently...OFF"); -#endif - - // This will print the current method name. - TTDPRINTMETHODNAME(); - - TTDPRINT(@"Showing TTDPRINT."); - TTDPRINT(@"-----------------"); - TTDPRINT(@"Showing TTD log levels <= %d", TTMAXLOGLEVEL); - TTDERROR(@"This is TTDERROR, level %d.", TTLOGLEVEL_ERROR); - TTDWARNING(@"This is TTDWARNING, level %d.", TTLOGLEVEL_WARNING); - TTDINFO(@"This is TTDINFO, level %d.", TTLOGLEVEL_INFO); - - TTDPRINT(@""); - TTDPRINT(@"Showing TTDCONDITIONLOG."); - TTDPRINT(@"------------------------"); - TTDCONDITIONLOG(true, @"This will always display because the condition is \"true\""); - TTDCONDITIONLOG(false, @"This will never display because the condition is \"false\""); - TTDCONDITIONLOG(rand()%2, @"This will randomly display because the condition is \"rand()%2\""); - - TTDPRINT(@""); - TTDPRINT(@"Showing TTDASSERT."); - TTDPRINT(@"------------------"); - // Should do nothing at all. - TTDASSERT(true); - - // This will jump you into the debugger in the simulator. - // Note that this isn't a crash! Simply the equivalent of setting - // a breakpoint in the debugger, but programmatically. These TTDASSERTs - // will be completely stripped away from your final product, assuming - // you don't declare the DEBUG preprocessor macro (and you shouldn't in - // your final product). - TTDASSERT(false); -} - - -@end diff --git a/samples/Core/TTCoreDemo/Configurations/App.xcconfig b/samples/Core/TTCoreDemo/Configurations/App.xcconfig deleted file mode 100644 index fb121e8537..0000000000 --- a/samples/Core/TTCoreDemo/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTCoreDemo -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/Core/TTCoreDemo/Configurations/Project.xcconfig b/samples/Core/TTCoreDemo/Configurations/Project.xcconfig deleted file mode 100644 index fc1966a5f7..0000000000 --- a/samples/Core/TTCoreDemo/Configurations/Project.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" diff --git a/samples/Core/TTCoreDemo/Configurations/RelPath.xcconfig b/samples/Core/TTCoreDemo/Configurations/RelPath.xcconfig deleted file mode 100644 index e869ea439f..0000000000 --- a/samples/Core/TTCoreDemo/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../../.. diff --git a/samples/Core/TTCoreDemo/Configurations/UnitTests.xcconfig b/samples/Core/TTCoreDemo/Configurations/UnitTests.xcconfig deleted file mode 100644 index 6356960958..0000000000 --- a/samples/Core/TTCoreDemo/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -PRODUCT_NAME = TTCoreDemoUnitTests -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/Core/TTCoreDemo/Headers/TTCoreDemo_Prefix.pch b/samples/Core/TTCoreDemo/Headers/TTCoreDemo_Prefix.pch deleted file mode 100644 index 10ce0fecab..0000000000 --- a/samples/Core/TTCoreDemo/Headers/TTCoreDemo_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'TTCoreDemo' target in the 'TTCoreDemo' project -// - -#ifdef __OBJC__ - #import - #import - #import -#endif diff --git a/samples/Core/TTCoreDemo/README.mdown b/samples/Core/TTCoreDemo/README.mdown deleted file mode 100644 index 1e6aff9322..0000000000 --- a/samples/Core/TTCoreDemo/README.mdown +++ /dev/null @@ -1,43 +0,0 @@ - -TTCoreDemo Example Project -========================== - -Version: 1.0 - -Created by: Jeff Verkoeyen (github.com/jverkoey && @featherless) - -Three20 technologies used: - -Three20 Core - -Overview --------- - -The TTCoreDemo example project is an incredibly light-weight project that only uses the Core -component of Three20. Using Three20 Core might be preferable for you if you don't need any of the -User Interface, Network, or Style components of Three20, and simply want the powerful debugging -utilities and path processing provided by Core, amongst other features. - -Architecture ------------- - -PlaygroundViewController.h/m: Within this controller you will find numerous examples of core -Three20 features. If you run the app, you will be greeted with an incredibly simple UI composed -of text and buttons that each perform a rudimentary, hopefully self-explanatory task. - -Project Setup -------------- - -This example project uses Xcode configuration (.xcconfig) files to share common configuration -properties with the rest of the sample projects. Using configuration files is entirely optional, -but it makes it much easier to make one change that affects a set of projects. - -Project.xcconfig is used for all project settings. -App.xcconfig is used for the TTCoreDemo target. -UnitTests.xcconfig would be used for the project's unit tests. - -A set of common configuration files exists in three20/samples/common/Configurations/ - -You can see which configuration file a target or project is using by clicking "Project", then -either "Edit Project Settings" or "Edit Active Target". At the bottom of the dialog that displays, -you'll see "Based On:" and the title of the xcconfig file. diff --git a/samples/Core/TTCoreDemo/TTCoreDemo-Info.plist b/samples/Core/TTCoreDemo/TTCoreDemo-Info.plist deleted file mode 100644 index a820c63936..0000000000 --- a/samples/Core/TTCoreDemo/TTCoreDemo-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en_US - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/samples/Core/TTCoreDemo/TTCoreDemo.xcodeproj/project.pbxproj b/samples/Core/TTCoreDemo/TTCoreDemo.xcodeproj/project.pbxproj deleted file mode 100755 index 0a223ede92..0000000000 --- a/samples/Core/TTCoreDemo/TTCoreDemo.xcodeproj/project.pbxproj +++ /dev/null @@ -1,366 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 668DCFEB1262FA51004C9828 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 668DCFEA1262FA51004C9828 /* Default@2x.png */; }; - 6E645D6E1187999F00F08CB1 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E645D6B1187999700F08CB1 /* libThree20Core.a */; }; - 6E64601B1187B3CD00F08CB1 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E64601A1187B3CD00F08CB1 /* Three20.bundle */; }; - 6E94C67A116D97FF0012B12C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C678116D97FF0012B12C /* Default.png */; }; - 6E94C67B116D97FF0012B12C /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C679116D97FF0012B12C /* Icon.png */; }; - 6EEFB94411627E29009B479E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EEFB94311627E29009B479E /* UIKit.framework */; }; - 6EEFBAEC11627F2E009B479E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EEFBAEB11627F2E009B479E /* CoreGraphics.framework */; }; - 6EEFBBAB1162829A009B479E /* PlaygroundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EEFBBAA1162829A009B479E /* PlaygroundViewController.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E645D6A1187999700F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645D621187999700F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645D6C1187999700F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645D621187999700F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645D6F118799A600F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645D621187999700F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* TTCoreDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTCoreDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 668DCFEA1262FA51004C9828 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "../../Resources/Default@2x.png"; sourceTree = SOURCE_ROOT; }; - 6E645D621187999700F08CB1 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E645DCD11879B0400F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = ../Configurations/Project.xcconfig; sourceTree = ""; }; - 6E645DCE11879B0400F08CB1 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = ../Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E645DDE11879B3500F08CB1 /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = SOURCE_ROOT; }; - 6E645DED11879D5000F08CB1 /* TTCoreDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTCoreDemo_Prefix.pch; path = Headers/TTCoreDemo_Prefix.pch; sourceTree = ""; }; - 6E64601A1187B3CD00F08CB1 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E6462311187DDDE00F08CB1 /* RelPath.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = RelPath.xcconfig; path = Configurations/RelPath.xcconfig; sourceTree = SOURCE_ROOT; }; - 6E94C678116D97FF0012B12C /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E94C679116D97FF0012B12C /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../../Resources/Icon.png; sourceTree = SOURCE_ROOT; }; - 6EEFB94311627E29009B479E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 6EEFBAEB11627F2E009B479E /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6EEFBB8B11628138009B479E /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = ""; }; - 6EEFBBA91162829A009B479E /* PlaygroundViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaygroundViewController.h; sourceTree = ""; }; - 6EEFBBAA1162829A009B479E /* PlaygroundViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaygroundViewController.m; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* TTCoreDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TTCoreDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 6EEFB94411627E29009B479E /* UIKit.framework in Frameworks */, - 6EEFBAEC11627F2E009B479E /* CoreGraphics.framework in Frameworks */, - 6E645D6E1187999F00F08CB1 /* libThree20Core.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 6EEFBBA811628283009B479E /* Playground Controller */, - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTCoreDemo.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6EEFBB8B11628138009B479E /* README.mdown */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E645DD011879B0A00F08CB1 /* Configurations */, - 6E645DD111879B1400F08CB1 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6E645DED11879D5000F08CB1 /* TTCoreDemo_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 6E64601A1187B3CD00F08CB1 /* Three20.bundle */, - 6E94C678116D97FF0012B12C /* Default.png */, - 668DCFEA1262FA51004C9828 /* Default@2x.png */, - 6E94C679116D97FF0012B12C /* Icon.png */, - 8D1107310486CEB800E47090 /* TTCoreDemo-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 6EEFB94311627E29009B479E /* UIKit.framework */, - 6EEFBAEB11627F2E009B479E /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E645D631187999700F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E645D6B1187999700F08CB1 /* libThree20Core.a */, - 6E645D6D1187999700F08CB1 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E645DD011879B0A00F08CB1 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E645DDE11879B3500F08CB1 /* App.xcconfig */, - 6E645DCD11879B0400F08CB1 /* Project.xcconfig */, - 6E6462311187DDDE00F08CB1 /* RelPath.xcconfig */, - 6E645DCE11879B0400F08CB1 /* UnitTests.xcconfig */, - ); - name = Configurations; - path = Classes; - sourceTree = ""; - }; - 6E645DD111879B1400F08CB1 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E645D621187999700F08CB1 /* Three20Core.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EEFBBA811628283009B479E /* Playground Controller */ = { - isa = PBXGroup; - children = ( - 6EEFBBA91162829A009B479E /* PlaygroundViewController.h */, - 6EEFBBAA1162829A009B479E /* PlaygroundViewController.m */, - ); - name = "Playground Controller"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTCoreDemo */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTCoreDemo" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E645D70118799A600F08CB1 /* PBXTargetDependency */, - ); - name = TTCoreDemo; - productName = TTCoreDemo; - productReference = 1D6058910D05DD3D006BFB54 /* TTCoreDemo.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTCoreDemo" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E645D631187999700F08CB1 /* Products */; - ProjectRef = 6E645D621187999700F08CB1 /* Three20Core.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTCoreDemo */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E645D6B1187999700F08CB1 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E645D6A1187999700F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645D6D1187999700F08CB1 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E645D6C1187999700F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E94C67A116D97FF0012B12C /* Default.png in Resources */, - 6E94C67B116D97FF0012B12C /* Icon.png in Resources */, - 6E64601B1187B3CD00F08CB1 /* Three20.bundle in Resources */, - 668DCFEB1262FA51004C9828 /* Default@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 6EEFBBAB1162829A009B479E /* PlaygroundViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E645D70118799A600F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E645D6F118799A600F08CB1 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E645DDE11879B3500F08CB1 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E645DDE11879B3500F08CB1 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E645DCD11879B0400F08CB1 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E645DCD11879B0400F08CB1 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTCoreDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTCoreDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/Core/TTCoreDemo/main.m b/samples/Core/TTCoreDemo/main.m deleted file mode 100644 index e0f8c871de..0000000000 --- a/samples/Core/TTCoreDemo/main.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/samples/Network/TTNetworkDemo/Classes/AppDelegate.h b/samples/Network/TTNetworkDemo/Classes/AppDelegate.h deleted file mode 100644 index 3ef3eb0265..0000000000 --- a/samples/Network/TTNetworkDemo/Classes/AppDelegate.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@class PlaygroundViewController; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { - UIWindow* _window; - PlaygroundViewController* _controller; -} - -@end - diff --git a/samples/Network/TTNetworkDemo/Classes/AppDelegate.m b/samples/Network/TTNetworkDemo/Classes/AppDelegate.m deleted file mode 100644 index 719feec0a3..0000000000 --- a/samples/Network/TTNetworkDemo/Classes/AppDelegate.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "AppDelegate.h" - -// View Controllers -#import "PlaygroundViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - _window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; - _window.backgroundColor = [UIColor whiteColor]; - - _controller = [[PlaygroundViewController alloc] init]; - [_window addSubview:_controller.view]; - - [_window makeKeyAndVisible]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) dealloc { - TT_RELEASE_SAFELY(_window); - TT_RELEASE_SAFELY(_controller); - [super dealloc]; -} - - -@end diff --git a/samples/Network/TTNetworkDemo/Classes/PlaygroundViewController.h b/samples/Network/TTNetworkDemo/Classes/PlaygroundViewController.h deleted file mode 100644 index e0c28f8ca3..0000000000 --- a/samples/Network/TTNetworkDemo/Classes/PlaygroundViewController.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -@interface PlaygroundViewController : UIViewController { - UIScrollView* _scrollView; - UIButton* _requestButton; - UIButton* _clearCacheButton; - UIImageView* _imageView; -} - -@end diff --git a/samples/Network/TTNetworkDemo/Classes/PlaygroundViewController.m b/samples/Network/TTNetworkDemo/Classes/PlaygroundViewController.m deleted file mode 100644 index ff4e919fb8..0000000000 --- a/samples/Network/TTNetworkDemo/Classes/PlaygroundViewController.m +++ /dev/null @@ -1,166 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "PlaygroundViewController.h" - -static const CGFloat kFramePadding = 10; -static const CGFloat kElementSpacing = 5; -static const CGFloat kGroupSpacing = 10; - -static NSString* kRequestURLPath = @"http://farm3.static.flickr.com/2373/2177444005_0d71df1713.jpg"; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation PlaygroundViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) loadView { - [super loadView]; - - _scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds]; - _scrollView.autoresizingMask = - UIViewAutoresizingFlexibleWidth - | UIViewAutoresizingFlexibleHeight; - - [self.view addSubview:_scrollView]; - - CGFloat yOffset = kFramePadding; - - { - _requestButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; - [_requestButton setTitle: NSLocalizedString(@"TTURLRequest test", @"") - forState: UIControlStateNormal]; - [_requestButton addTarget: self - action: @selector(requestAction) - forControlEvents: UIControlEventTouchUpInside]; - [_requestButton sizeToFit]; - - CGRect frame = _requestButton.frame; - frame.origin.x = kFramePadding; - frame.origin.y = yOffset; - _requestButton.frame = frame; - - [_scrollView addSubview:_requestButton]; - - yOffset += frame.size.height; - } - - { - _clearCacheButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; - [_clearCacheButton setTitle: NSLocalizedString(@"Clear the cache", @"") - forState: UIControlStateNormal]; - [_clearCacheButton addTarget: self - action: @selector(clearCacheAction) - forControlEvents: UIControlEventTouchUpInside]; - [_clearCacheButton sizeToFit]; - - CGRect frame = _clearCacheButton.frame; - frame.origin.x = kFramePadding; - frame.origin.y = yOffset; - _clearCacheButton.frame = frame; - - [_scrollView addSubview:_clearCacheButton]; - - yOffset += frame.size.height; - } - - [_scrollView setContentSize:CGSizeMake(320, yOffset)]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) viewDidUnload { - [super viewDidUnload]; - - TT_RELEASE_SAFELY(_imageView); - TT_RELEASE_SAFELY(_requestButton); - TT_RELEASE_SAFELY(_clearCacheButton); - TT_RELEASE_SAFELY(_scrollView); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - - [_scrollView flashScrollIndicators]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) requestAction { - TTURLRequest* request = [TTURLRequest requestWithURL: kRequestURLPath - delegate: self]; - - // TTURLImageResponse is just one of a set of response types you can use. - // Also available are TTURLDataResponse and TTURLXMLResponse. - request.response = [[[TTURLImageResponse alloc] init] autorelease]; - - [request send]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) clearCacheAction { - [[TTURLCache sharedCache] removeAll:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLRequestDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidStartLoad:(TTURLRequest*)request { - [_requestButton setTitle:@"Loading..." forState:UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidFinishLoad:(TTURLRequest*)request { - TTURLImageResponse* imageResponse = (TTURLImageResponse*)request.response; - - if (nil == _imageView) { - _imageView = [[UIImageView alloc] initWithFrame:CGRectZero]; - [_scrollView addSubview:_imageView]; - } - _imageView.image = imageResponse.image; - [_imageView sizeToFit]; - _imageView.alpha = 0; - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:0.5]; - - _requestButton.alpha = 0; - _clearCacheButton.alpha = 0; - [_scrollView setContentSize:_imageView.frame.size]; - _imageView.alpha = 1; - - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)request:(TTURLRequest*)request didFailLoadWithError:(NSError*)error { - [_requestButton setTitle:@"Failed to load, try again." forState:UIControlStateNormal]; -} - - -@end diff --git a/samples/Network/TTNetworkDemo/Configurations/App.xcconfig b/samples/Network/TTNetworkDemo/Configurations/App.xcconfig deleted file mode 100644 index fbccaba14b..0000000000 --- a/samples/Network/TTNetworkDemo/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTNetworkDemo -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/Network/TTNetworkDemo/Configurations/Project.xcconfig b/samples/Network/TTNetworkDemo/Configurations/Project.xcconfig deleted file mode 100644 index 659d27c976..0000000000 --- a/samples/Network/TTNetworkDemo/Configurations/Project.xcconfig +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" - -REPO_ROOT_PATH = $(SRCROOT)/../../.. diff --git a/samples/Network/TTNetworkDemo/Configurations/RelPath.xcconfig b/samples/Network/TTNetworkDemo/Configurations/RelPath.xcconfig deleted file mode 100644 index 7510c4e4be..0000000000 --- a/samples/Network/TTNetworkDemo/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../../.. diff --git a/samples/Network/TTNetworkDemo/Configurations/UnitTests.xcconfig b/samples/Network/TTNetworkDemo/Configurations/UnitTests.xcconfig deleted file mode 100644 index bb7a159b61..0000000000 --- a/samples/Network/TTNetworkDemo/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTNetworkDemoUnitTests -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/Network/TTNetworkDemo/Headers/TTNetworkDemo_Prefix.pch b/samples/Network/TTNetworkDemo/Headers/TTNetworkDemo_Prefix.pch deleted file mode 100644 index 0d5ecaea8d..0000000000 --- a/samples/Network/TTNetworkDemo/Headers/TTNetworkDemo_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'TTNetworkDemo' target in the 'TTNetworkDemo' project -// - -#ifdef __OBJC__ - #import - #import - #import "Three20Network/Three20Network.h" -#endif diff --git a/samples/Network/TTNetworkDemo/README.mdown b/samples/Network/TTNetworkDemo/README.mdown deleted file mode 100644 index 1766c2a05c..0000000000 --- a/samples/Network/TTNetworkDemo/README.mdown +++ /dev/null @@ -1,15 +0,0 @@ - -TTNetworkDemo Example Project -============================= - -Version: 1.0 - -Created by: Jeff Verkoeyen (github.com/jverkoey && @featherless) - -Three20 technologies used: - -Three20 Core -Three20 Network - -Overview --------- diff --git a/samples/Network/TTNetworkDemo/TTNetworkDemo-Info.plist b/samples/Network/TTNetworkDemo/TTNetworkDemo-Info.plist deleted file mode 100644 index a820c63936..0000000000 --- a/samples/Network/TTNetworkDemo/TTNetworkDemo-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en_US - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/samples/Network/TTNetworkDemo/TTNetworkDemo.xcodeproj/project.pbxproj b/samples/Network/TTNetworkDemo/TTNetworkDemo.xcodeproj/project.pbxproj deleted file mode 100755 index f1ad125cbb..0000000000 --- a/samples/Network/TTNetworkDemo/TTNetworkDemo.xcodeproj/project.pbxproj +++ /dev/null @@ -1,421 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 663DAE791266189B00CF8CEA /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 663DAE781266189B00CF8CEA /* Default@2x.png */; }; - 6E645FE71187B39900F08CB1 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E645FDF1187B38B00F08CB1 /* libThree20Network.a */; }; - 6E645FF01187B3C300F08CB1 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E645FEF1187B3C300F08CB1 /* Three20.bundle */; }; - 6E6460551187B46A00F08CB1 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E645FD21187B38400F08CB1 /* libThree20Core.a */; }; - 6E94C67A116D97FF0012B12C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C678116D97FF0012B12C /* Default.png */; }; - 6E94C67B116D97FF0012B12C /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C679116D97FF0012B12C /* Icon.png */; }; - 6EEFB94411627E29009B479E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EEFB94311627E29009B479E /* UIKit.framework */; }; - 6EEFBAEC11627F2E009B479E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EEFBAEB11627F2E009B479E /* CoreGraphics.framework */; }; - 6EEFBBAB1162829A009B479E /* PlaygroundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EEFBBAA1162829A009B479E /* PlaygroundViewController.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E645FD11187B38400F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645FCC1187B38400F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645FD31187B38400F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645FCC1187B38400F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645FDE1187B38B00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645FD51187B38B00F08CB1 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E645FE01187B38B00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645FD51187B38B00F08CB1 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E6460221187B3F700F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645FD51187B38B00F08CB1 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E6460241187B3F700F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645FCC1187B38400F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* TTNetworkDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTNetworkDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 663DAE781266189B00CF8CEA /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "../../Resources/Default@2x.png"; sourceTree = SOURCE_ROOT; }; - 6E645FA61187B2E400F08CB1 /* TTNetworkDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNetworkDemo_Prefix.pch; path = Headers/TTNetworkDemo_Prefix.pch; sourceTree = ""; }; - 6E645FC01187B30100F08CB1 /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = ""; }; - 6E645FC11187B30100F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E645FC31187B30100F08CB1 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E645FCC1187B38400F08CB1 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E645FD51187B38B00F08CB1 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../../../src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E645FEF1187B3C300F08CB1 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E94C678116D97FF0012B12C /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E94C679116D97FF0012B12C /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../../Resources/Icon.png; sourceTree = SOURCE_ROOT; }; - 6E94CACF11700C370012B12C /* TTNetworkDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TTNetworkDemo-Info.plist"; sourceTree = ""; }; - 6EEFB94311627E29009B479E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 6EEFBAEB11627F2E009B479E /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6EEFBB8B11628138009B479E /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = ""; }; - 6EEFBBA91162829A009B479E /* PlaygroundViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaygroundViewController.h; sourceTree = ""; }; - 6EEFBBAA1162829A009B479E /* PlaygroundViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaygroundViewController.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 6EEFB94411627E29009B479E /* UIKit.framework in Frameworks */, - 6EEFBAEC11627F2E009B479E /* CoreGraphics.framework in Frameworks */, - 6E645FE71187B39900F08CB1 /* libThree20Network.a in Frameworks */, - 6E6460551187B46A00F08CB1 /* libThree20Core.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 6EEFBBA811628283009B479E /* Playground Controller */, - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTNetworkDemo.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6EEFBB8B11628138009B479E /* README.mdown */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E645FBC1187B2F600F08CB1 /* Configurations */, - 6E645FC61187B37300F08CB1 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6E645FA61187B2E400F08CB1 /* TTNetworkDemo_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 6E645FEF1187B3C300F08CB1 /* Three20.bundle */, - 6E94C678116D97FF0012B12C /* Default.png */, - 663DAE781266189B00CF8CEA /* Default@2x.png */, - 6E94C679116D97FF0012B12C /* Icon.png */, - 6E94CACF11700C370012B12C /* TTNetworkDemo-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 6EEFB94311627E29009B479E /* UIKit.framework */, - 6EEFBAEB11627F2E009B479E /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E645FBC1187B2F600F08CB1 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E645FC01187B30100F08CB1 /* App.xcconfig */, - 6E645FC11187B30100F08CB1 /* Project.xcconfig */, - 6E645FC31187B30100F08CB1 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6E645FC61187B37300F08CB1 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E645FCC1187B38400F08CB1 /* Three20Core.xcodeproj */, - 6E645FD51187B38B00F08CB1 /* Three20Network.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E645FCD1187B38400F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E645FD21187B38400F08CB1 /* libThree20Core.a */, - 6E645FD41187B38400F08CB1 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E645FD61187B38B00F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E645FDF1187B38B00F08CB1 /* libThree20Network.a */, - 6E645FE11187B38B00F08CB1 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EEFBBA811628283009B479E /* Playground Controller */ = { - isa = PBXGroup; - children = ( - 6EEFBBA91162829A009B479E /* PlaygroundViewController.h */, - 6EEFBBAA1162829A009B479E /* PlaygroundViewController.m */, - ); - name = "Playground Controller"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTNetworkDemo */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTNetworkDemo" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E6460231187B3F700F08CB1 /* PBXTargetDependency */, - 6E6460251187B3F700F08CB1 /* PBXTargetDependency */, - ); - name = TTNetworkDemo; - productName = TTCoreDemo; - productReference = 1D6058910D05DD3D006BFB54 /* TTNetworkDemo.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTNetworkDemo" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E645FCD1187B38400F08CB1 /* Products */; - ProjectRef = 6E645FCC1187B38400F08CB1 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E645FD61187B38B00F08CB1 /* Products */; - ProjectRef = 6E645FD51187B38B00F08CB1 /* Three20Network.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTNetworkDemo */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E645FD21187B38400F08CB1 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E645FD11187B38400F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645FD41187B38400F08CB1 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E645FD31187B38400F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645FDF1187B38B00F08CB1 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E645FDE1187B38B00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645FE11187B38B00F08CB1 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E645FE01187B38B00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E94C67A116D97FF0012B12C /* Default.png in Resources */, - 6E94C67B116D97FF0012B12C /* Icon.png in Resources */, - 6E645FF01187B3C300F08CB1 /* Three20.bundle in Resources */, - 663DAE791266189B00CF8CEA /* Default@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 6EEFBBAB1162829A009B479E /* PlaygroundViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E6460231187B3F700F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E6460221187B3F700F08CB1 /* PBXContainerItemProxy */; - }; - 6E6460251187B3F700F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E6460241187B3F700F08CB1 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E645FC01187B30100F08CB1 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E645FC01187B30100F08CB1 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E645FC11187B30100F08CB1 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E645FC11187B30100F08CB1 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTNetworkDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTNetworkDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/Network/TTNetworkDemo/main.m b/samples/Network/TTNetworkDemo/main.m deleted file mode 100644 index 1cefab29fe..0000000000 --- a/samples/Network/TTNetworkDemo/main.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/samples/Resources/Default-Landscape.png b/samples/Resources/Default-Landscape.png deleted file mode 100644 index 4a635b1f29..0000000000 Binary files a/samples/Resources/Default-Landscape.png and /dev/null differ diff --git a/samples/Resources/Default-Landscape.psd b/samples/Resources/Default-Landscape.psd deleted file mode 100644 index 2e8318677a..0000000000 Binary files a/samples/Resources/Default-Landscape.psd and /dev/null differ diff --git a/samples/Resources/Default-Portrait.png b/samples/Resources/Default-Portrait.png deleted file mode 100644 index f066dbca81..0000000000 Binary files a/samples/Resources/Default-Portrait.png and /dev/null differ diff --git a/samples/Resources/Default-Portrait.psd b/samples/Resources/Default-Portrait.psd deleted file mode 100644 index 986a1064b1..0000000000 Binary files a/samples/Resources/Default-Portrait.psd and /dev/null differ diff --git a/samples/Resources/Default.png b/samples/Resources/Default.png deleted file mode 100644 index 6ca8e06cb6..0000000000 Binary files a/samples/Resources/Default.png and /dev/null differ diff --git a/samples/Resources/Default.psd b/samples/Resources/Default.psd deleted file mode 100644 index 6222edcb18..0000000000 Binary files a/samples/Resources/Default.psd and /dev/null differ diff --git a/samples/Resources/Default@2x.png b/samples/Resources/Default@2x.png deleted file mode 100644 index a52c5f7b34..0000000000 Binary files a/samples/Resources/Default@2x.png and /dev/null differ diff --git a/samples/Resources/Default@2x.psd b/samples/Resources/Default@2x.psd deleted file mode 100644 index 9b1370021f..0000000000 Binary files a/samples/Resources/Default@2x.psd and /dev/null differ diff --git a/samples/Resources/Icon.psd b/samples/Resources/Icon.psd deleted file mode 100644 index b9f590f9ee..0000000000 Binary files a/samples/Resources/Icon.psd and /dev/null differ diff --git a/samples/Resources/Icon@2x.png b/samples/Resources/Icon@2x.png deleted file mode 100644 index 9843307b93..0000000000 Binary files a/samples/Resources/Icon@2x.png and /dev/null differ diff --git a/samples/Resources/Icon@2x.psd b/samples/Resources/Icon@2x.psd deleted file mode 100644 index c1c9b3d796..0000000000 Binary files a/samples/Resources/Icon@2x.psd and /dev/null differ diff --git a/samples/Style/TTCSSStyleSheets/Classes/AppDelegate.h b/samples/Style/TTCSSStyleSheets/Classes/AppDelegate.h deleted file mode 100644 index f8d3d93ac0..0000000000 --- a/samples/Style/TTCSSStyleSheets/Classes/AppDelegate.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface AppDelegate : NSObject { -} - -@end - diff --git a/samples/Style/TTCSSStyleSheets/Classes/AppDelegate.m b/samples/Style/TTCSSStyleSheets/Classes/AppDelegate.m deleted file mode 100644 index 2d89416828..0000000000 --- a/samples/Style/TTCSSStyleSheets/Classes/AppDelegate.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "AppDelegate.h" - -// View Controllers -#import "StyleSheetViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - [map from:kMainMenuURLPath toViewController:[StyleSheetViewController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:kMainMenuURLPath]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/samples/Style/TTCSSStyleSheets/Classes/Atlas.h b/samples/Style/TTCSSStyleSheets/Classes/Atlas.h deleted file mode 100644 index 9202a84c07..0000000000 --- a/samples/Style/TTCSSStyleSheets/Classes/Atlas.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -extern NSString* kMainMenuURLPath; diff --git a/samples/Style/TTCSSStyleSheets/Classes/Atlas.m b/samples/Style/TTCSSStyleSheets/Classes/Atlas.m deleted file mode 100644 index 678284fbe9..0000000000 --- a/samples/Style/TTCSSStyleSheets/Classes/Atlas.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Atlas.h" - -NSString* kMainMenuURLPath = @"tt://mainmenu"; diff --git a/samples/Style/TTCSSStyleSheets/Classes/StyleSheetViewController.h b/samples/Style/TTCSSStyleSheets/Classes/StyleSheetViewController.h deleted file mode 100644 index 6dc1d236e6..0000000000 --- a/samples/Style/TTCSSStyleSheets/Classes/StyleSheetViewController.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface StyleSheetViewController : TTViewController { -@private - TTCSSStyleSheet* _styleSheet; - - BOOL _loadedSuccessfully; -} - -@end diff --git a/samples/Style/TTCSSStyleSheets/Classes/StyleSheetViewController.m b/samples/Style/TTCSSStyleSheets/Classes/StyleSheetViewController.m deleted file mode 100644 index 15efd3a913..0000000000 --- a/samples/Style/TTCSSStyleSheets/Classes/StyleSheetViewController.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "StyleSheetViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation StyleSheetViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _styleSheet = [[TTCSSStyleSheet alloc] init]; - - _loadedSuccessfully = [_styleSheet - loadFromFilename:TTPathForBundleResource(@"stylesheet.css")]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_styleSheet); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - [super loadView]; - - if (!_loadedSuccessfully) { - self.view.backgroundColor = [UIColor redColor]; - self.title = @"Failed to load"; - return; - } - - self.title = @"Three20 CSS extension"; - - self.view.backgroundColor = [_styleSheet backgroundColorWithCssSelector: @"body" - forState: UIControlStateNormal]; - - UILabel* headerLabel = [[UILabel alloc] initWithFrame:CGRectZero]; - headerLabel.text = @"Header text"; - headerLabel.font = [_styleSheet fontWithCssSelector:@"h1" forState:UIControlStateNormal]; - headerLabel.textColor = [_styleSheet colorWithCssSelector:@"h1" forState:UIControlStateNormal]; - headerLabel.backgroundColor = [_styleSheet backgroundColorWithCssSelector: @"h1" - forState: UIControlStateNormal]; - headerLabel.shadowColor = [_styleSheet textShadowColorWithCssSelector: @"h1" - forState: UIControlStateNormal]; - headerLabel.shadowOffset = [_styleSheet textShadowOffsetWithCssSelector: @"h1" - forState: UIControlStateNormal]; - [headerLabel sizeToFit]; - [self.view addSubview:headerLabel]; - TT_RELEASE_SAFELY(headerLabel); -} - - -@end - diff --git a/samples/Style/TTCSSStyleSheets/Configurations/App.xcconfig b/samples/Style/TTCSSStyleSheets/Configurations/App.xcconfig deleted file mode 100644 index 194e82a226..0000000000 --- a/samples/Style/TTCSSStyleSheets/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTCSSStyleSheets -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/Style/TTCSSStyleSheets/Configurations/Project.xcconfig b/samples/Style/TTCSSStyleSheets/Configurations/Project.xcconfig deleted file mode 100644 index fc1966a5f7..0000000000 --- a/samples/Style/TTCSSStyleSheets/Configurations/Project.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" diff --git a/samples/Style/TTCSSStyleSheets/Configurations/RelPath.xcconfig b/samples/Style/TTCSSStyleSheets/Configurations/RelPath.xcconfig deleted file mode 100644 index e869ea439f..0000000000 --- a/samples/Style/TTCSSStyleSheets/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../../.. diff --git a/samples/Style/TTCSSStyleSheets/Configurations/UnitTests.xcconfig b/samples/Style/TTCSSStyleSheets/Configurations/UnitTests.xcconfig deleted file mode 100644 index fa3d200761..0000000000 --- a/samples/Style/TTCSSStyleSheets/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTCSSStyleSheetsUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/Style/TTCSSStyleSheets/Headers/TTCSSStyleSheets_Prefix.pch b/samples/Style/TTCSSStyleSheets/Headers/TTCSSStyleSheets_Prefix.pch deleted file mode 100644 index 50fceb5312..0000000000 --- a/samples/Style/TTCSSStyleSheets/Headers/TTCSSStyleSheets_Prefix.pch +++ /dev/null @@ -1,11 +0,0 @@ -// -// Prefix header for all source files of the 'TTStylePreview' target in the 'TTStylePreview' project -// - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" - #import "extThree20CSSStyle/extThree20CSSStyle.h" - #import "Atlas.h" -#endif diff --git a/samples/Style/TTCSSStyleSheets/Resources/stylesheet.css b/samples/Style/TTCSSStyleSheets/Resources/stylesheet.css deleted file mode 100644 index f9f859b9e9..0000000000 --- a/samples/Style/TTCSSStyleSheets/Resources/stylesheet.css +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright 2009-2010 Facebook - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -body { - background-color: #111; -} - -h1 { - font-weight: bold; - font-size: 50pt; - color: #666; - background-color: transparent; - text-shadow: 1px 1px 1px #999; /* blur amount (3rd value) doesn't do anything */ -} diff --git a/samples/Style/TTCSSStyleSheets/TTCSSStyleSheets-Info.plist b/samples/Style/TTCSSStyleSheets/TTCSSStyleSheets-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/samples/Style/TTCSSStyleSheets/TTCSSStyleSheets-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/samples/Style/TTCSSStyleSheets/TTCSSStyleSheets.xcodeproj/project.pbxproj b/samples/Style/TTCSSStyleSheets/TTCSSStyleSheets.xcodeproj/project.pbxproj deleted file mode 100755 index 51020ecff5..0000000000 --- a/samples/Style/TTCSSStyleSheets/TTCSSStyleSheets.xcodeproj/project.pbxproj +++ /dev/null @@ -1,809 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 663DB50E1266288E00CF8CEA /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 663DB50D1266288E00CF8CEA /* Default@2x.png */; }; - 6E036BD011B38E550025E8EE /* libextThree20CSSStyle.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E036BCD11B38E520025E8EE /* libextThree20CSSStyle.a */; }; - 6E036BF511B38EDC0025E8EE /* stylesheet.css in Resources */ = {isa = PBXBuildFile; fileRef = 6E036BF411B38EDC0025E8EE /* stylesheet.css */; }; - 6E036BF811B38F3C0025E8EE /* StyleSheetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E036BF711B38F3C0025E8EE /* StyleSheetViewController.m */; }; - 6E0835B411B4C42100B99C32 /* extThree20CSSStyle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E0835B311B4C42100B99C32 /* extThree20CSSStyle.bundle */; }; - 6E37943511B9B5E00011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3793E911B9B59D0011C497 /* libThree20Core.a */; }; - 6E37943611B9B5E10011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3793EF11B9B59D0011C497 /* libThree20Network.a */; }; - 6E37943711B9B5E10011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3793F511B9B59D0011C497 /* libThree20Style.a */; }; - 6E37943811B9B5E20011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37940711B9B59D0011C497 /* libThree20UI.a */; }; - 6E37943911B9B5E20011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3793FB11B9B59D0011C497 /* libThree20UICommon.a */; }; - 6E37943A11B9B5E30011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37940111B9B59D0011C497 /* libThree20UINavigator.a */; }; - 6E850F4F11B1761D0071A4FD /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E850F4E11B1761D0071A4FD /* Three20.bundle */; }; - 6E850F8B11B1762D0071A4FD /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E850F8811B1762B0071A4FD /* libThree20.a */; }; - 6E850FAE11B176F10071A4FD /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E850FAC11B176F10071A4FD /* Default.png */; }; - 6E850FAF11B176F10071A4FD /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E850FAD11B176F10071A4FD /* Icon.png */; }; - 6E850FB811B1795F0071A4FD /* Atlas.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E850FB711B1795F0071A4FD /* Atlas.m */; }; - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E036BCC11B38E520025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036BC711B38E520025E8EE /* extThree20CSSStyle.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = extThree20CSSStyle; - }; - 6E036BCE11B38E520025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036BC711B38E520025E8EE /* extThree20CSSStyle.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E036BE311B38E5F0025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036BC711B38E520025E8EE /* extThree20CSSStyle.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = extThree20CSSStyle; - }; - 6E3793E811B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793D411B9B59D0011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3793EA11B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793D411B9B59D0011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3793EE11B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793D711B9B59D0011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3793F011B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793D711B9B59D0011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3793F411B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793DA11B9B59D0011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3793F611B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793DA11B9B59D0011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3793FA11B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793DD11B9B59D0011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3793FC11B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793DD11B9B59D0011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37940011B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793E011B9B59D0011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37940211B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793E011B9B59D0011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37940611B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793E311B9B59D0011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37940811B9B59D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793E311B9B59D0011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37942711B9B5B70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793DD11B9B59D0011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37942911B9B5B70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793DA11B9B59D0011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37942B11B9B5B70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793D711B9B59D0011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37942D11B9B5B70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793D411B9B59D0011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37942F11B9B5B70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793E011B9B59D0011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37943111B9B5B70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3793E311B9B59D0011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E850F8711B1762B0071A4FD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6E850F8911B1762B0071A4FD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E850F8C11B176330071A4FD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* TTCSSStyleSheets.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTCSSStyleSheets.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 663DB50D1266288E00CF8CEA /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "../../Resources/Default@2x.png"; sourceTree = SOURCE_ROOT; }; - 6E036BC711B38E520025E8EE /* extThree20CSSStyle.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = extThree20CSSStyle.xcodeproj; path = ../../../src/extThree20CSSStyle/extThree20CSSStyle.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E036BF411B38EDC0025E8EE /* stylesheet.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = stylesheet.css; path = Resources/stylesheet.css; sourceTree = ""; }; - 6E036BF611B38F3C0025E8EE /* StyleSheetViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleSheetViewController.h; sourceTree = ""; }; - 6E036BF711B38F3C0025E8EE /* StyleSheetViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyleSheetViewController.m; sourceTree = ""; }; - 6E0835B311B4C42100B99C32 /* extThree20CSSStyle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = extThree20CSSStyle.bundle; path = ../../../src/extThree20CSSStyle/Resources/extThree20CSSStyle.bundle; sourceTree = SOURCE_ROOT; }; - 6E3793D411B9B59D0011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3793D711B9B59D0011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../../../src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3793DA11B9B59D0011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../../../src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3793DD11B9B59D0011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../../../src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3793E011B9B59D0011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../../../src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3793E311B9B59D0011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../../../src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E850F4811B175FD0071A4FD /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = ""; }; - 6E850F4911B175FD0071A4FD /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E850F4A11B175FD0071A4FD /* RelPath.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = RelPath.xcconfig; path = Configurations/RelPath.xcconfig; sourceTree = ""; }; - 6E850F4B11B175FD0071A4FD /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E850F4E11B1761D0071A4FD /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../../../src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E850FAC11B176F10071A4FD /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E850FAD11B176F10071A4FD /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../../Resources/Icon.png; sourceTree = SOURCE_ROOT; }; - 6E850FB611B1795F0071A4FD /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atlas.h; sourceTree = ""; }; - 6E850FB711B1795F0071A4FD /* Atlas.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Atlas.m; sourceTree = ""; }; - 6E8513D111B19B080071A4FD /* TTCSSStyleSheets_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTCSSStyleSheets_Prefix.pch; path = Headers/TTCSSStyleSheets_Prefix.pch; sourceTree = ""; }; - 6E8513D211B19B0E0071A4FD /* TTCSSStyleSheets-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TTCSSStyleSheets-Info.plist"; sourceTree = ""; }; - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */, - 6E850F8B11B1762D0071A4FD /* libThree20.a in Frameworks */, - 6E036BD011B38E550025E8EE /* libextThree20CSSStyle.a in Frameworks */, - 6E37943511B9B5E00011C497 /* libThree20Core.a in Frameworks */, - 6E37943611B9B5E10011C497 /* libThree20Network.a in Frameworks */, - 6E37943711B9B5E10011C497 /* libThree20Style.a in Frameworks */, - 6E37943811B9B5E20011C497 /* libThree20UI.a in Frameworks */, - 6E37943911B9B5E20011C497 /* libThree20UICommon.a in Frameworks */, - 6E37943A11B9B5E30011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 6E850FB211B179250071A4FD /* Controllers */, - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - 6E850FB611B1795F0071A4FD /* Atlas.h */, - 6E850FB711B1795F0071A4FD /* Atlas.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTCSSStyleSheets.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E850F4D11B176030071A4FD /* Configurations */, - 6EF96274118E9502003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6E8513D111B19B080071A4FD /* TTCSSStyleSheets_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 6E850F4E11B1761D0071A4FD /* Three20.bundle */, - 6E0835B311B4C42100B99C32 /* extThree20CSSStyle.bundle */, - 6E8513D211B19B0E0071A4FD /* TTCSSStyleSheets-Info.plist */, - 6E850FAC11B176F10071A4FD /* Default.png */, - 663DB50D1266288E00CF8CEA /* Default@2x.png */, - 6E850FAD11B176F10071A4FD /* Icon.png */, - 6E036BF411B38EDC0025E8EE /* stylesheet.css */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E036BC811B38E520025E8EE /* Products */ = { - isa = PBXGroup; - children = ( - 6E036BCD11B38E520025E8EE /* libextThree20CSSStyle.a */, - 6E036BCF11B38E520025E8EE /* extCSSStyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3793D511B9B59D0011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3793E911B9B59D0011C497 /* libThree20Core.a */, - 6E3793EB11B9B59D0011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3793D811B9B59D0011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3793EF11B9B59D0011C497 /* libThree20Network.a */, - 6E3793F111B9B59D0011C497 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3793DB11B9B59D0011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3793F511B9B59D0011C497 /* libThree20Style.a */, - 6E3793F711B9B59D0011C497 /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3793DE11B9B59D0011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3793FB11B9B59D0011C497 /* libThree20UICommon.a */, - 6E3793FD11B9B59D0011C497 /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3793E111B9B59D0011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37940111B9B59D0011C497 /* libThree20UINavigator.a */, - 6E37940311B9B59D0011C497 /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3793E411B9B59D0011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37940711B9B59D0011C497 /* libThree20UI.a */, - 6E37940911B9B59D0011C497 /* UIUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37940B11B9B59F0011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E3793D411B9B59D0011C497 /* Three20Core.xcodeproj */, - 6E3793D711B9B59D0011C497 /* Three20Network.xcodeproj */, - 6E3793DA11B9B59D0011C497 /* Three20Style.xcodeproj */, - 6E3793DD11B9B59D0011C497 /* Three20UICommon.xcodeproj */, - 6E3793E011B9B59D0011C497 /* Three20UINavigator.xcodeproj */, - 6E3793E311B9B59D0011C497 /* Three20UI.xcodeproj */, - 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E37940C11B9B5A60011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - 6E036BC711B38E520025E8EE /* extThree20CSSStyle.xcodeproj */, - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6E850F4D11B176030071A4FD /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E850F4811B175FD0071A4FD /* App.xcconfig */, - 6E850F4911B175FD0071A4FD /* Project.xcconfig */, - 6E850F4A11B175FD0071A4FD /* RelPath.xcconfig */, - 6E850F4B11B175FD0071A4FD /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6E850F7A11B1762B0071A4FD /* Products */ = { - isa = PBXGroup; - children = ( - 6E850F8811B1762B0071A4FD /* libThree20.a */, - 6E850F8A11B1762B0071A4FD /* Three20UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E850FB211B179250071A4FD /* Controllers */ = { - isa = PBXGroup; - children = ( - 6E036BF611B38F3C0025E8EE /* StyleSheetViewController.h */, - 6E036BF711B38F3C0025E8EE /* StyleSheetViewController.m */, - ); - name = Controllers; - sourceTree = ""; - }; - 6EF96274118E9502003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37940B11B9B59F0011C497 /* Three20 */, - 6E37940C11B9B5A60011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTCSSStyleSheets */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTCSSStyleSheets" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E850F8D11B176330071A4FD /* PBXTargetDependency */, - 6E036BE411B38E5F0025E8EE /* PBXTargetDependency */, - 6E37942811B9B5B70011C497 /* PBXTargetDependency */, - 6E37942A11B9B5B70011C497 /* PBXTargetDependency */, - 6E37942C11B9B5B70011C497 /* PBXTargetDependency */, - 6E37942E11B9B5B70011C497 /* PBXTargetDependency */, - 6E37943011B9B5B70011C497 /* PBXTargetDependency */, - 6E37943211B9B5B70011C497 /* PBXTargetDependency */, - ); - name = TTCSSStyleSheets; - productName = TTStylePreview; - productReference = 1D6058910D05DD3D006BFB54 /* TTCSSStyleSheets.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTCSSStyleSheets" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E036BC811B38E520025E8EE /* Products */; - ProjectRef = 6E036BC711B38E520025E8EE /* extThree20CSSStyle.xcodeproj */; - }, - { - ProductGroup = 6E850F7A11B1762B0071A4FD /* Products */; - ProjectRef = 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E3793D511B9B59D0011C497 /* Products */; - ProjectRef = 6E3793D411B9B59D0011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E3793D811B9B59D0011C497 /* Products */; - ProjectRef = 6E3793D711B9B59D0011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E3793DB11B9B59D0011C497 /* Products */; - ProjectRef = 6E3793DA11B9B59D0011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E3793E411B9B59D0011C497 /* Products */; - ProjectRef = 6E3793E311B9B59D0011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E3793DE11B9B59D0011C497 /* Products */; - ProjectRef = 6E3793DD11B9B59D0011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E3793E111B9B59D0011C497 /* Products */; - ProjectRef = 6E3793E011B9B59D0011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTCSSStyleSheets */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E036BCD11B38E520025E8EE /* libextThree20CSSStyle.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libextThree20CSSStyle.a; - remoteRef = 6E036BCC11B38E520025E8EE /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E036BCF11B38E520025E8EE /* extCSSStyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = extCSSStyleUnitTests.octest; - remoteRef = 6E036BCE11B38E520025E8EE /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3793E911B9B59D0011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E3793E811B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3793EB11B9B59D0011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E3793EA11B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3793EF11B9B59D0011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E3793EE11B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3793F111B9B59D0011C497 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E3793F011B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3793F511B9B59D0011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E3793F411B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3793F711B9B59D0011C497 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E3793F611B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3793FB11B9B59D0011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3793FA11B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3793FD11B9B59D0011C497 /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6E3793FC11B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37940111B9B59D0011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E37940011B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37940311B9B59D0011C497 /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6E37940211B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37940711B9B59D0011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E37940611B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37940911B9B59D0011C497 /* UIUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UIUnitTests.octest; - remoteRef = 6E37940811B9B59D0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E850F8811B1762B0071A4FD /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6E850F8711B1762B0071A4FD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E850F8A11B1762B0071A4FD /* Three20UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = Three20UnitTests.octest; - remoteRef = 6E850F8911B1762B0071A4FD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E850F4F11B1761D0071A4FD /* Three20.bundle in Resources */, - 6E0835B411B4C42100B99C32 /* extThree20CSSStyle.bundle in Resources */, - 6E850FAE11B176F10071A4FD /* Default.png in Resources */, - 6E850FAF11B176F10071A4FD /* Icon.png in Resources */, - 6E036BF511B38EDC0025E8EE /* stylesheet.css in Resources */, - 663DB50E1266288E00CF8CEA /* Default@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 6E850FB811B1795F0071A4FD /* Atlas.m in Sources */, - 6E036BF811B38F3C0025E8EE /* StyleSheetViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E036BE411B38E5F0025E8EE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = extThree20CSSStyle; - targetProxy = 6E036BE311B38E5F0025E8EE /* PBXContainerItemProxy */; - }; - 6E37942811B9B5B70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E37942711B9B5B70011C497 /* PBXContainerItemProxy */; - }; - 6E37942A11B9B5B70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E37942911B9B5B70011C497 /* PBXContainerItemProxy */; - }; - 6E37942C11B9B5B70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E37942B11B9B5B70011C497 /* PBXContainerItemProxy */; - }; - 6E37942E11B9B5B70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E37942D11B9B5B70011C497 /* PBXContainerItemProxy */; - }; - 6E37943011B9B5B70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E37942F11B9B5B70011C497 /* PBXContainerItemProxy */; - }; - 6E37943211B9B5B70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E37943111B9B5B70011C497 /* PBXContainerItemProxy */; - }; - 6E850F8D11B176330071A4FD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6E850F8C11B176330071A4FD /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E850F4811B175FD0071A4FD /* App.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - INFOPLIST_FILE = "TTCSSStyleSheets-Info.plist"; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E850F4811B175FD0071A4FD /* App.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - INFOPLIST_FILE = "TTCSSStyleSheets-Info.plist"; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E850F4911B175FD0071A4FD /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E850F4911B175FD0071A4FD /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTCSSStyleSheets" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTCSSStyleSheets" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/Style/TTCSSStyleSheets/main.m b/samples/Style/TTCSSStyleSheets/main.m deleted file mode 100644 index e0f8c871de..0000000000 --- a/samples/Style/TTCSSStyleSheets/main.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/samples/Style/TTStyleCatalog/Classes/AppDelegate.h b/samples/Style/TTStyleCatalog/Classes/AppDelegate.h deleted file mode 100644 index f8d3d93ac0..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/AppDelegate.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface AppDelegate : NSObject { -} - -@end - diff --git a/samples/Style/TTStyleCatalog/Classes/AppDelegate.m b/samples/Style/TTStyleCatalog/Classes/AppDelegate.m deleted file mode 100644 index d16b022291..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/AppDelegate.m +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "AppDelegate.h" - -// View Controllers -#import "MainMenuViewController.h" -#import "StyleViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - [map from:kMainMenuURLPath toViewController:[MainMenuViewController class]]; - [map from:@"tt://styles/(initWithStyleName:)/(styleType:)" toViewController:[StyleViewController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:kMainMenuURLPath]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/samples/Style/TTStyleCatalog/Classes/Atlas.h b/samples/Style/TTStyleCatalog/Classes/Atlas.h deleted file mode 100644 index 9202a84c07..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/Atlas.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -extern NSString* kMainMenuURLPath; diff --git a/samples/Style/TTStyleCatalog/Classes/Atlas.m b/samples/Style/TTStyleCatalog/Classes/Atlas.m deleted file mode 100644 index 678284fbe9..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/Atlas.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Atlas.h" - -NSString* kMainMenuURLPath = @"tt://mainmenu"; diff --git a/samples/Style/TTStyleCatalog/Classes/MainMenuViewController.h b/samples/Style/TTStyleCatalog/Classes/MainMenuViewController.h deleted file mode 100644 index f64677195d..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/MainMenuViewController.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface MainMenuViewController : TTTableViewController { - -} - -@end diff --git a/samples/Style/TTStyleCatalog/Classes/MainMenuViewController.m b/samples/Style/TTStyleCatalog/Classes/MainMenuViewController.m deleted file mode 100644 index c97318bcf2..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/MainMenuViewController.m +++ /dev/null @@ -1,157 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "MainMenuViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation MainMenuViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nil bundle:nil]) { - self.title = @"Style Catalog"; - //self.variableHeightRows = YES; - self.tableViewStyle = UITableViewStyleGrouped; - - self.dataSource = - [TTSectionedDataSource dataSourceWithObjects: - @"Text Styles", - [TTTableTextItem itemWithText:@"Link Text" - URL:@"tt://styles/linkText:/text"], - [TTTableTextItem itemWithText:@"Mini Badge" - URL:@"tt://styles/miniBadge/text"], - [TTTableTextItem itemWithText:@"Badge" - URL:@"tt://styles/badge/text"], - [TTTableTextItem itemWithText:@"Large Badge" - URL:@"tt://styles/largeBadge/text"], - - @"Views", - [TTTableTextItem itemWithText:@"Post Text Editor" - URL:@"tt://styles/postTextEditor/view"], - [TTTableTextItem itemWithText:@"Photo Caption" - URL:@"tt://styles/photoCaption/view"], - [TTTableTextItem itemWithText:@"Photo Status Label" - URL:@"tt://styles/photoStatusLabel/view"], - [TTTableTextItem itemWithText:@"Page Dot" - URL:@"tt://styles/pageDot:/view"], - [TTTableTextItem itemWithText:@"Highlighted Link" - URL:@"tt://styles/linkHighlighted/view"], - [TTTableTextItem itemWithText:@"Table Header" - URL:@"tt://styles/tableHeader/view"], - [TTTableTextItem itemWithText:@"Picker Cell" - URL:@"tt://styles/pickerCell:/view"], - [TTTableTextItem itemWithText:@"Search Table Shadow" - URL:@"tt://styles/searchTableShadow/view"], - [TTTableTextItem itemWithText:@"Black Bezel" - URL:@"tt://styles/blackBezel/view"], - [TTTableTextItem itemWithText:@"White Bezel" - URL:@"tt://styles/whiteBezel/view"], - [TTTableTextItem itemWithText:@"Black Banner" - URL:@"tt://styles/blackBanner/view"], - [TTTableTextItem itemWithText:@"Tab Bar" - URL:@"tt://styles/tabBar/view"], - [TTTableTextItem itemWithText:@"Tab Strip" - URL:@"tt://styles/tabStrip/view"], - - @"Tab Grid", - [TTTableTextItem itemWithText:@"Tab Grid" - URL:@"tt://styles/tabGrid/view"], - [TTTableTextItem itemWithText:@"Tab Grid Top Left" - URL:@"tt://styles/tabGridTabTopLeft:/view"], - [TTTableTextItem itemWithText:@"Tab Grid Top Right" - URL:@"tt://styles/tabGridTabTopRight:/view"], - [TTTableTextItem itemWithText:@"Tab Grid Bottom Right" - URL:@"tt://styles/tabGridTabBottomRight:/view"], - [TTTableTextItem itemWithText:@"Tab Grid Bottom Left" - URL:@"tt://styles/tabGridTabBottomLeft:/view"], - [TTTableTextItem itemWithText:@"Tab Grid Left" - URL:@"tt://styles/tabGridTabLeft:/view"], - [TTTableTextItem itemWithText:@"Tab Grid Right" - URL:@"tt://styles/tabGridTabRight:/view"], - [TTTableTextItem itemWithText:@"Tab Grid Center" - URL:@"tt://styles/tabGridTabCenter:/view"], - - @"Tabs", - [TTTableTextItem itemWithText:@"Tab" - URL:@"tt://styles/tab:/view"], - [TTTableTextItem itemWithText:@"Round Tab" - URL:@"tt://styles/tabRound:/view"], - [TTTableTextItem itemWithText:@"Tab Left Overflow" - URL:@"tt://styles/tabOverflowLeft/view"], - [TTTableTextItem itemWithText:@"Tab Right Overflow" - URL:@"tt://styles/tabOverflowRight/view"], - - @"Images", - [TTTableTextItem itemWithText:@"Thumb View" - URL:@"tt://styles/thumbView:/image"], - - @"Launcher", - [TTTableTextItem itemWithText:@"Launcher Button" - URL:@"tt://styles/launcherButton:/image"], - [TTTableTextItem itemWithText:@"Launcher Close Button" - URL:@"tt://styles/launcherCloseButton:/view"], - - @"Text Bar", - [TTTableTextItem itemWithText:@"Text Bar" - URL:@"tt://styles/textBar/view"], - [TTTableTextItem itemWithText:@"Text Bar Footer" - URL:@"tt://styles/textBarFooter/view"], - [TTTableTextItem itemWithText:@"Text Bar Text Field" - URL:@"tt://styles/textBarTextField/view"], - [TTTableTextItem itemWithText:@"Text Bar Post Button" - URL:@"tt://styles/textBarPostButton:/text"], - - @"Toolbars", - [TTTableTextItem itemWithText:@"Toolbar Button" - URL:@"tt://styles/toolbarButton:/view"], - [TTTableTextItem itemWithText:@"Toolbar Back Button" - URL:@"tt://styles/toolbarBackButton:/view"], - [TTTableTextItem itemWithText:@"Toolbar Forward Button" - URL:@"tt://styles/toolbarForwardButton:/view"], - [TTTableTextItem itemWithText:@"Toolbar Round Button" - URL:@"tt://styles/toolbarRoundButton:/view"], - [TTTableTextItem itemWithText:@"Black Toolbar Button" - URL:@"tt://styles/blackToolbarButton:/view"], - [TTTableTextItem itemWithText:@"Gray Toolbar Button" - URL:@"tt://styles/grayToolbarButton:/view"], - [TTTableTextItem itemWithText:@"Black Toolbar Forward Button" - URL:@"tt://styles/blackToolbarForwardButton:/view"], - [TTTableTextItem itemWithText:@"Black Toolbar Round Button" - URL:@"tt://styles/blackToolbarRoundButton:/view"], - - @"Search", - [TTTableTextItem itemWithText:@"Search Text Field" - URL:@"tt://styles/searchTextField/view"], - [TTTableTextItem itemWithText:@"Search Bar" - URL:@"tt://styles/searchBar/view"], - [TTTableTextItem itemWithText:@"Search Bar Bottom" - URL:@"tt://styles/searchBarBottom/view"], - [TTTableTextItem itemWithText:@"Black Search Bar" - URL:@"tt://styles/blackSearchBar/view"], - - nil]; - } - - return self; -} - - -@end - diff --git a/samples/Style/TTStyleCatalog/Classes/StyleView.h b/samples/Style/TTStyleCatalog/Classes/StyleView.h deleted file mode 100644 index 8650e405d8..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/StyleView.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface StyleView : TTView { - NSString* _text; -} - -@property (nonatomic, copy) NSString* text; - -@end diff --git a/samples/Style/TTStyleCatalog/Classes/StyleView.m b/samples/Style/TTStyleCatalog/Classes/StyleView.m deleted file mode 100644 index f3ad8eb12a..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/StyleView.m +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "StyleView.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation StyleView - -@synthesize text = _text; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - // We override this in order to provide some faux padding to the content area. - // hack hack hack - - TTStyle* style = self.style; - if (nil != style) { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - context.frame = TTRectInset(self.bounds, UIEdgeInsetsMake(10, 10, 10, 10)); - context.contentFrame = self.bounds; - - [style draw:context]; - if (!context.didDrawContent) { - [self drawContent:self.bounds]; - } - - } else { - [self drawContent:self.bounds]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)textForLayerWithStyle:(TTTextStyle*)style { - return _text; -} - - -@end - diff --git a/samples/Style/TTStyleCatalog/Classes/StyleViewController.h b/samples/Style/TTStyleCatalog/Classes/StyleViewController.h deleted file mode 100644 index c9d0093073..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/StyleViewController.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface StyleViewController : TTViewController { -@private - TTStyle* _style; - TTStyle* _styleHighlight; - TTStyle* _styleDisabled; - TTStyle* _styleSelected; - NSString* _styleType; -} - -@end diff --git a/samples/Style/TTStyleCatalog/Classes/StyleViewController.m b/samples/Style/TTStyleCatalog/Classes/StyleViewController.m deleted file mode 100644 index 7018b5efe7..0000000000 --- a/samples/Style/TTStyleCatalog/Classes/StyleViewController.m +++ /dev/null @@ -1,185 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "StyleViewController.h" - -#import "StyleView.h" - -NSString* kTextStyleType = @"text"; -NSString* kViewStyleType = @"view"; -NSString* kImageStyleType = @"image"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation StyleViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyleName:(NSString*)name styleType:(NSString*)styleType { - if (self = [super initWithNibName:nil bundle:nil]) { - self.title = name; - - _style = [[[TTStyleSheet globalStyleSheet] styleWithSelector:name] retain]; - _styleHighlight = [[[TTStyleSheet globalStyleSheet] - styleWithSelector: name - forState: UIControlStateHighlighted] retain]; - _styleDisabled = [[[TTStyleSheet globalStyleSheet] - styleWithSelector: name - forState: UIControlStateDisabled] retain]; - _styleSelected = [[[TTStyleSheet globalStyleSheet] - styleWithSelector: name - forState: UIControlStateSelected] retain]; - - _styleType = [styleType copy]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_style); - TT_RELEASE_SAFELY(_styleHighlight); - TT_RELEASE_SAFELY(_styleDisabled); - TT_RELEASE_SAFELY(_styleSelected); - TT_RELEASE_SAFELY(_styleType); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTextView:(NSString*)title frame:(CGRect)frame style:(TTStyle*)style { - CGRect textFrame = TTRectInset(frame, UIEdgeInsetsMake(20, 20, 20, 20)); - StyleView* text = [[StyleView alloc] - initWithFrame:textFrame]; - text.text = title; - TTStyleContext* context = [[TTStyleContext alloc] init]; - context.frame = frame; - context.delegate = text; - context.font = [UIFont systemFontOfSize:[UIFont systemFontSize]]; - CGSize size = [style addToSize:CGSizeZero context:context]; - TT_RELEASE_SAFELY(context); - - size.width += 20; - size.height += 20; - textFrame.size = size; - text.frame = textFrame; - - text.style = style; - text.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:1 alpha:1]; - text.autoresizingMask = - UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; - - [self.view addSubview:text]; - TT_RELEASE_SAFELY(text); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addView:(CGRect)frame style:(TTStyle*)style { - CGRect viewFrame = TTRectInset(frame, UIEdgeInsetsMake(20, 20, 20, 20)); - StyleView* view = [[StyleView alloc] - initWithFrame:viewFrame]; - - view.style = style; - view.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:1 alpha:1]; - view.autoresizingMask = - UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; - - [self.view addSubview:view]; - TT_RELEASE_SAFELY(view); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addImageView:(CGRect)frame style:(TTStyle*)style { - CGRect viewFrame = TTRectInset(frame, UIEdgeInsetsMake(20, 20, 20, 20)); - TTImageView* view = [[TTImageView alloc] - initWithFrame:viewFrame]; - - view.urlPath = @"bundle://Icon.png"; - view.style = style; - view.backgroundColor = [UIColor colorWithRed:0.9 green:0.9 blue:1 alpha:1]; - view.autoresizingMask = - UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin; - CGRect imageFrame = view.frame; - imageFrame.size = view.image.size; - view.frame = imageFrame; - - [self.view addSubview:view]; - TT_RELEASE_SAFELY(view); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - [super loadView]; - - CGRect frame = self.view.bounds; - frame.size.height /= 4; - - if ([_styleType isEqualToString:kTextStyleType]) { - [self addTextView:@"UIControlStateNormal" frame:frame style:_style]; - - frame.origin.y += frame.size.height; - [self addTextView:@"UIControlStateHighlighted" frame:frame style:_styleHighlight]; - - frame.origin.y += frame.size.height; - [self addTextView:@"UIControlStateDisabled" frame:frame style:_styleDisabled]; - - frame.origin.y += frame.size.height; - [self addTextView:@"UIControlStateSelected" frame:frame style:_styleSelected]; - - } else if ([_styleType isEqualToString:kViewStyleType]) { - [self addView:frame style:_style]; - - frame.origin.y += frame.size.height; - [self addView:frame style:_styleHighlight]; - - frame.origin.y += frame.size.height; - [self addView:frame style:_styleDisabled]; - - frame.origin.y += frame.size.height; - [self addView:frame style:_styleSelected]; - - } else if ([_styleType isEqualToString:kImageStyleType]) { - [self addImageView:frame style:_style]; - - frame.origin.y += frame.size.height; - [self addImageView:frame style:_styleHighlight]; - - frame.origin.y += frame.size.height; - [self addImageView:frame style:_styleDisabled]; - - frame.origin.y += frame.size.height; - [self addImageView:frame style:_styleSelected]; - - } -} - - -@end - diff --git a/samples/Style/TTStyleCatalog/Configurations/App.xcconfig b/samples/Style/TTStyleCatalog/Configurations/App.xcconfig deleted file mode 100644 index 2d70dac123..0000000000 --- a/samples/Style/TTStyleCatalog/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTStyleCatalog -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/Style/TTStyleCatalog/Configurations/Project.xcconfig b/samples/Style/TTStyleCatalog/Configurations/Project.xcconfig deleted file mode 100644 index fc1966a5f7..0000000000 --- a/samples/Style/TTStyleCatalog/Configurations/Project.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" diff --git a/samples/Style/TTStyleCatalog/Configurations/RelPath.xcconfig b/samples/Style/TTStyleCatalog/Configurations/RelPath.xcconfig deleted file mode 100644 index e869ea439f..0000000000 --- a/samples/Style/TTStyleCatalog/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../../.. diff --git a/samples/Style/TTStyleCatalog/Configurations/UnitTests.xcconfig b/samples/Style/TTStyleCatalog/Configurations/UnitTests.xcconfig deleted file mode 100644 index 1b2fd344db..0000000000 --- a/samples/Style/TTStyleCatalog/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -PRODUCT_NAME = TTStyleCatalogUnitTests -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/Style/TTStyleCatalog/Headers/TTStyleCatalog_Prefix.pch b/samples/Style/TTStyleCatalog/Headers/TTStyleCatalog_Prefix.pch deleted file mode 100644 index 7fd84b69b3..0000000000 --- a/samples/Style/TTStyleCatalog/Headers/TTStyleCatalog_Prefix.pch +++ /dev/null @@ -1,10 +0,0 @@ -// -// Prefix header for all source files of the 'TTStylePreview' target in the 'TTStylePreview' project -// - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" - #import "Atlas.h" -#endif diff --git a/samples/Style/TTStyleCatalog/TTStyleCatalog-Info.plist b/samples/Style/TTStyleCatalog/TTStyleCatalog-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/samples/Style/TTStyleCatalog/TTStyleCatalog-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/samples/Style/TTStyleCatalog/TTStyleCatalog.xcodeproj/project.pbxproj b/samples/Style/TTStyleCatalog/TTStyleCatalog.xcodeproj/project.pbxproj deleted file mode 100755 index 17d02f2d82..0000000000 --- a/samples/Style/TTStyleCatalog/TTStyleCatalog.xcodeproj/project.pbxproj +++ /dev/null @@ -1,762 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 665E980D12662D0C0025FA42 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 665E980C12662D0C0025FA42 /* Default@2x.png */; }; - 6E37949111B9B63E0011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37946E11B9B6300011C497 /* libThree20Core.a */; }; - 6E37949211B9B63E0011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37947411B9B6300011C497 /* libThree20Network.a */; }; - 6E37949311B9B63F0011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37947A11B9B6300011C497 /* libThree20Style.a */; }; - 6E37949411B9B63F0011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37948C11B9B6300011C497 /* libThree20UI.a */; }; - 6E37949511B9B6400011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37948011B9B6300011C497 /* libThree20UICommon.a */; }; - 6E37949611B9B6410011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37948611B9B6300011C497 /* libThree20UINavigator.a */; }; - 6E850F4F11B1761D0071A4FD /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E850F4E11B1761D0071A4FD /* Three20.bundle */; }; - 6E850F8B11B1762D0071A4FD /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E850F8811B1762B0071A4FD /* libThree20.a */; }; - 6E850FAE11B176F10071A4FD /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E850FAC11B176F10071A4FD /* Default.png */; }; - 6E850FAF11B176F10071A4FD /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E850FAD11B176F10071A4FD /* Icon.png */; }; - 6E850FB511B179400071A4FD /* MainMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E850FB411B179400071A4FD /* MainMenuViewController.m */; }; - 6E850FB811B1795F0071A4FD /* Atlas.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E850FB711B1795F0071A4FD /* Atlas.m */; }; - 6E850FD211B17A450071A4FD /* StyleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E850FD111B17A450071A4FD /* StyleViewController.m */; }; - 6E850FFC11B17CBE0071A4FD /* StyleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E850FFB11B17CBE0071A4FD /* StyleView.m */; }; - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E37946D11B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945911B9B6300011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37946F11B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945911B9B6300011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37947311B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945C11B9B6300011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37947511B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945C11B9B6300011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37947911B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945F11B9B6300011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37947B11B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945F11B9B6300011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37947F11B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946211B9B6300011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37948111B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946211B9B6300011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37948511B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946511B9B6300011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37948711B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946511B9B6300011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37948B11B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946811B9B6300011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37948D11B9B6300011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946811B9B6300011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37949711B9B64D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945C11B9B6300011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37949911B9B64D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945911B9B6300011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37949B11B9B64D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946211B9B6300011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37949D11B9B64D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37945F11B9B6300011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37949F11B9B64D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946511B9B6300011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3794A111B9B64D0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37946811B9B6300011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E850F8711B1762B0071A4FD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6E850F8911B1762B0071A4FD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E850F8C11B176330071A4FD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* TTStyleCatalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTStyleCatalog.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 665E980C12662D0C0025FA42 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "../../Resources/Default@2x.png"; sourceTree = SOURCE_ROOT; }; - 6E37945911B9B6300011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37945C11B9B6300011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../../../src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37945F11B9B6300011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../../../src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37946211B9B6300011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../../../src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37946511B9B6300011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../../../src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37946811B9B6300011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../../../src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E850F4811B175FD0071A4FD /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = ""; }; - 6E850F4911B175FD0071A4FD /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E850F4A11B175FD0071A4FD /* RelPath.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = RelPath.xcconfig; path = Configurations/RelPath.xcconfig; sourceTree = ""; }; - 6E850F4B11B175FD0071A4FD /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E850F4E11B1761D0071A4FD /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../../../src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E850FAC11B176F10071A4FD /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E850FAD11B176F10071A4FD /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../../Resources/Icon.png; sourceTree = SOURCE_ROOT; }; - 6E850FB311B179400071A4FD /* MainMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainMenuViewController.h; sourceTree = ""; }; - 6E850FB411B179400071A4FD /* MainMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainMenuViewController.m; sourceTree = ""; }; - 6E850FB611B1795F0071A4FD /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atlas.h; sourceTree = ""; }; - 6E850FB711B1795F0071A4FD /* Atlas.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Atlas.m; sourceTree = ""; }; - 6E850FD011B17A450071A4FD /* StyleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleViewController.h; sourceTree = ""; }; - 6E850FD111B17A450071A4FD /* StyleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyleViewController.m; sourceTree = ""; }; - 6E850FFA11B17CBE0071A4FD /* StyleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleView.h; sourceTree = ""; }; - 6E850FFB11B17CBE0071A4FD /* StyleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyleView.m; sourceTree = ""; }; - 6E8513D111B19B080071A4FD /* TTStyleCatalog_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyleCatalog_Prefix.pch; path = Headers/TTStyleCatalog_Prefix.pch; sourceTree = ""; }; - 6E8513D211B19B0E0071A4FD /* TTStyleCatalog-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TTStyleCatalog-Info.plist"; sourceTree = ""; }; - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */, - 6E850F8B11B1762D0071A4FD /* libThree20.a in Frameworks */, - 6E37949111B9B63E0011C497 /* libThree20Core.a in Frameworks */, - 6E37949211B9B63E0011C497 /* libThree20Network.a in Frameworks */, - 6E37949311B9B63F0011C497 /* libThree20Style.a in Frameworks */, - 6E37949411B9B63F0011C497 /* libThree20UI.a in Frameworks */, - 6E37949511B9B6400011C497 /* libThree20UICommon.a in Frameworks */, - 6E37949611B9B6410011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 6E850FB211B179250071A4FD /* Controllers */, - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - 6E850FB611B1795F0071A4FD /* Atlas.h */, - 6E850FB711B1795F0071A4FD /* Atlas.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTStyleCatalog.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E850F4D11B176030071A4FD /* Configurations */, - 6EF96274118E9502003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6E8513D111B19B080071A4FD /* TTStyleCatalog_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 6E850F4E11B1761D0071A4FD /* Three20.bundle */, - 6E8513D211B19B0E0071A4FD /* TTStyleCatalog-Info.plist */, - 6E850FAC11B176F10071A4FD /* Default.png */, - 665E980C12662D0C0025FA42 /* Default@2x.png */, - 6E850FAD11B176F10071A4FD /* Icon.png */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37945A11B9B6300011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37946E11B9B6300011C497 /* libThree20Core.a */, - 6E37947011B9B6300011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37945D11B9B6300011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37947411B9B6300011C497 /* libThree20Network.a */, - 6E37947611B9B6300011C497 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37946011B9B6300011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37947A11B9B6300011C497 /* libThree20Style.a */, - 6E37947C11B9B6300011C497 /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37946311B9B6300011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37948011B9B6300011C497 /* libThree20UICommon.a */, - 6E37948211B9B6300011C497 /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37946611B9B6300011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37948611B9B6300011C497 /* libThree20UINavigator.a */, - 6E37948811B9B6300011C497 /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37946911B9B6300011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37948C11B9B6300011C497 /* libThree20UI.a */, - 6E37948E11B9B6300011C497 /* UIUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37949011B9B6320011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E37945911B9B6300011C497 /* Three20Core.xcodeproj */, - 6E37945C11B9B6300011C497 /* Three20Network.xcodeproj */, - 6E37945F11B9B6300011C497 /* Three20Style.xcodeproj */, - 6E37946211B9B6300011C497 /* Three20UICommon.xcodeproj */, - 6E37946511B9B6300011C497 /* Three20UINavigator.xcodeproj */, - 6E37946811B9B6300011C497 /* Three20UI.xcodeproj */, - 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E850F4D11B176030071A4FD /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E850F4811B175FD0071A4FD /* App.xcconfig */, - 6E850F4911B175FD0071A4FD /* Project.xcconfig */, - 6E850F4A11B175FD0071A4FD /* RelPath.xcconfig */, - 6E850F4B11B175FD0071A4FD /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6E850F7A11B1762B0071A4FD /* Products */ = { - isa = PBXGroup; - children = ( - 6E850F8811B1762B0071A4FD /* libThree20.a */, - 6E850F8A11B1762B0071A4FD /* Three20UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E850FB211B179250071A4FD /* Controllers */ = { - isa = PBXGroup; - children = ( - 6E850FCE11B17A280071A4FD /* Main Menu */, - 6E850FCF11B17A2E0071A4FD /* Styles */, - ); - name = Controllers; - sourceTree = ""; - }; - 6E850FCE11B17A280071A4FD /* Main Menu */ = { - isa = PBXGroup; - children = ( - 6E850FB311B179400071A4FD /* MainMenuViewController.h */, - 6E850FB411B179400071A4FD /* MainMenuViewController.m */, - ); - name = "Main Menu"; - sourceTree = ""; - }; - 6E850FCF11B17A2E0071A4FD /* Styles */ = { - isa = PBXGroup; - children = ( - 6E850FF911B17CB50071A4FD /* Style View */, - 6E850FD011B17A450071A4FD /* StyleViewController.h */, - 6E850FD111B17A450071A4FD /* StyleViewController.m */, - ); - name = Styles; - sourceTree = ""; - }; - 6E850FF911B17CB50071A4FD /* Style View */ = { - isa = PBXGroup; - children = ( - 6E850FFA11B17CBE0071A4FD /* StyleView.h */, - 6E850FFB11B17CBE0071A4FD /* StyleView.m */, - ); - name = "Style View"; - sourceTree = ""; - }; - 6EF96274118E9502003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37949011B9B6320011C497 /* Three20 */, - ); - name = Dependencies; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTStyleCatalog */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTStyleCatalog" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E37949A11B9B64D0011C497 /* PBXTargetDependency */, - 6E37949811B9B64D0011C497 /* PBXTargetDependency */, - 6E37949E11B9B64D0011C497 /* PBXTargetDependency */, - 6E37949C11B9B64D0011C497 /* PBXTargetDependency */, - 6E3794A011B9B64D0011C497 /* PBXTargetDependency */, - 6E3794A211B9B64D0011C497 /* PBXTargetDependency */, - 6E850F8D11B176330071A4FD /* PBXTargetDependency */, - ); - name = TTStyleCatalog; - productName = TTStylePreview; - productReference = 1D6058910D05DD3D006BFB54 /* TTStyleCatalog.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTStyleCatalog" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E850F7A11B1762B0071A4FD /* Products */; - ProjectRef = 6E850F7911B1762B0071A4FD /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37945A11B9B6300011C497 /* Products */; - ProjectRef = 6E37945911B9B6300011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37945D11B9B6300011C497 /* Products */; - ProjectRef = 6E37945C11B9B6300011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37946011B9B6300011C497 /* Products */; - ProjectRef = 6E37945F11B9B6300011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37946911B9B6300011C497 /* Products */; - ProjectRef = 6E37946811B9B6300011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37946311B9B6300011C497 /* Products */; - ProjectRef = 6E37946211B9B6300011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37946611B9B6300011C497 /* Products */; - ProjectRef = 6E37946511B9B6300011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTStyleCatalog */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E37946E11B9B6300011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37946D11B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37947011B9B6300011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37946F11B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37947411B9B6300011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37947311B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37947611B9B6300011C497 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E37947511B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37947A11B9B6300011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E37947911B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37947C11B9B6300011C497 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E37947B11B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37948011B9B6300011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E37947F11B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37948211B9B6300011C497 /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6E37948111B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37948611B9B6300011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E37948511B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37948811B9B6300011C497 /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6E37948711B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37948C11B9B6300011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E37948B11B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37948E11B9B6300011C497 /* UIUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UIUnitTests.octest; - remoteRef = 6E37948D11B9B6300011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E850F8811B1762B0071A4FD /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6E850F8711B1762B0071A4FD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E850F8A11B1762B0071A4FD /* Three20UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = Three20UnitTests.octest; - remoteRef = 6E850F8911B1762B0071A4FD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E850F4F11B1761D0071A4FD /* Three20.bundle in Resources */, - 6E850FAE11B176F10071A4FD /* Default.png in Resources */, - 6E850FAF11B176F10071A4FD /* Icon.png in Resources */, - 665E980D12662D0C0025FA42 /* Default@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 6E850FB511B179400071A4FD /* MainMenuViewController.m in Sources */, - 6E850FB811B1795F0071A4FD /* Atlas.m in Sources */, - 6E850FD211B17A450071A4FD /* StyleViewController.m in Sources */, - 6E850FFC11B17CBE0071A4FD /* StyleView.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E37949811B9B64D0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E37949711B9B64D0011C497 /* PBXContainerItemProxy */; - }; - 6E37949A11B9B64D0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E37949911B9B64D0011C497 /* PBXContainerItemProxy */; - }; - 6E37949C11B9B64D0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E37949B11B9B64D0011C497 /* PBXContainerItemProxy */; - }; - 6E37949E11B9B64D0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E37949D11B9B64D0011C497 /* PBXContainerItemProxy */; - }; - 6E3794A011B9B64D0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E37949F11B9B64D0011C497 /* PBXContainerItemProxy */; - }; - 6E3794A211B9B64D0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3794A111B9B64D0011C497 /* PBXContainerItemProxy */; - }; - 6E850F8D11B176330071A4FD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6E850F8C11B176330071A4FD /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E850F4811B175FD0071A4FD /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E850F4811B175FD0071A4FD /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E850F4911B175FD0071A4FD /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E850F4911B175FD0071A4FD /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTStyleCatalog" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTStyleCatalog" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/Style/TTStyleCatalog/main.m b/samples/Style/TTStyleCatalog/main.m deleted file mode 100644 index e0f8c871de..0000000000 --- a/samples/Style/TTStyleCatalog/main.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/samples/TTCatalog/Classes/ActivityTestController.h b/samples/TTCatalog/Classes/ActivityTestController.h deleted file mode 100644 index f2edb8131c..0000000000 --- a/samples/TTCatalog/Classes/ActivityTestController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface ActivityTestController : TTViewController -@end - diff --git a/samples/TTCatalog/Classes/ActivityTestController.m b/samples/TTCatalog/Classes/ActivityTestController.m deleted file mode 100644 index 51d911693b..0000000000 --- a/samples/TTCatalog/Classes/ActivityTestController.m +++ /dev/null @@ -1,93 +0,0 @@ - -#import "ActivityTestController.h" -#import -#import - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation ActivityTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.title = @"Activity Labels"; - } - return self; -} - -- (void)dealloc { - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (void)addActivityLabelWithStyle:(TTActivityLabelStyle)style progress:(BOOL)progress { - TTActivityLabel* label = [[[TTActivityLabel alloc] initWithStyle:style] autorelease]; - UIView* lastView = [self.view.subviews lastObject]; - label.text = @"Loading..."; - if (progress) { - label.progress = 0.3; - } - [label sizeToFit]; - label.frame = CGRectMake(0, lastView.bottom+10, self.view.width, label.height); - [self.view addSubview:label]; -} - --(void)showLabelsWithProgress:(BOOL)progress { - UIScrollView* scrollView = (UIScrollView*)self.view; - [scrollView removeAllSubviews]; - - if (progress) { - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"No Progress" - style:UIBarButtonItemStyleBordered target:self action:@selector(hideProgress)] autorelease]; - } else { - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Progress" - style:UIBarButtonItemStyleBordered target:self action:@selector(showProgress)] autorelease]; - } - - TTSearchlightLabel* label = [[[TTSearchlightLabel alloc] init] autorelease]; - label.text = @"Searchlight Label"; - label.font = [UIFont systemFontOfSize:25]; - label.textAlignment = UITextAlignmentCenter; - label.contentMode = UIViewContentModeCenter; - label.backgroundColor = [UIColor blackColor]; - [label sizeToFit]; - label.frame = CGRectMake(0, 0, self.view.width, label.height + 40); - [self.view addSubview:label]; - [label startAnimating]; - - [self addActivityLabelWithStyle:TTActivityLabelStyleWhiteBox progress:progress]; - [self addActivityLabelWithStyle:TTActivityLabelStyleBlackBox progress:progress]; - [self addActivityLabelWithStyle:TTActivityLabelStyleWhiteBezel progress:progress]; - [self addActivityLabelWithStyle:TTActivityLabelStyleBlackBezel progress:progress]; - [self addActivityLabelWithStyle:TTActivityLabelStyleGray progress:progress]; - [self addActivityLabelWithStyle:TTActivityLabelStyleWhite progress:progress]; - [self addActivityLabelWithStyle:TTActivityLabelStyleBlackBanner progress:progress]; - - UIView* lastView = [scrollView.subviews lastObject]; - scrollView.contentSize = CGSizeMake(scrollView.width, lastView.bottom); -} - -- (void)showProgress { - [self showLabelsWithProgress:YES]; -} - -- (void)hideProgress { - [self showLabelsWithProgress:NO]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIView - -- (void)loadView { - UIScrollView* scrollView = [[[UIScrollView alloc] initWithFrame:TTNavigationFrame()] autorelease]; - scrollView.backgroundColor = [UIColor groupTableViewBackgroundColor]; - self.view = scrollView; - - [self showLabelsWithProgress:NO]; -} - -@end diff --git a/samples/TTCatalog/Classes/AppDelegate.h b/samples/TTCatalog/Classes/AppDelegate.h deleted file mode 100644 index f43a5b71ac..0000000000 --- a/samples/TTCatalog/Classes/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -@interface AppDelegate : NSObject - -@end - diff --git a/samples/TTCatalog/Classes/AppDelegate.m b/samples/TTCatalog/Classes/AppDelegate.m deleted file mode 100644 index 6107fa6cb7..0000000000 --- a/samples/TTCatalog/Classes/AppDelegate.m +++ /dev/null @@ -1,196 +0,0 @@ -#import "AppDelegate.h" -#import "SplitCatalogController.h" -#import "CatalogController.h" -#import "PhotoTest1Controller.h" -#import "PhotoTest2Controller.h" -#import "ImageTest1Controller.h" -#import "TableImageTestController.h" -#import "YouTubeTestController.h" -#import "TableItemTestController.h" -#import "TableControlsTestController.h" -#import "TableTestController.h" -#import "TableWithBannerController.h" -#import "TableWithShadowController.h" -#import "TableDragRefreshController.h" -#import "SearchTestController.h" -#import "MessageTestController.h" -#import "ActivityTestController.h" -#import "ScrollViewTestController.h" -#import "LauncherViewTestController.h" -#import "StyledTextTestController.h" -#import "StyledTextTableTestController.h" -#import "StyleTestController.h" -#import "ButtonTestController.h" -#import "TabBarTestController.h" -#import "DownloadProgressTestController.h" - -@implementation AppDelegate - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIApplicationDelegate - -- (void)applicationDidFinishLaunching:(UIApplication*)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.supportsShakeToReload = YES; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - [map from:@"*" toViewController:[TTWebController class]]; - - - if (TTIsPad()) { - [map from: @"tt://catalog" - toSharedViewController: [SplitCatalogController class]]; - - SplitCatalogController* controller = - (SplitCatalogController*)[[TTNavigator navigator] viewControllerForURL:@"tt://catalog"]; - TTDASSERT([controller isKindOfClass:[SplitCatalogController class]]); - map = controller.rightNavigator.URLMap; - - } else { - [map from: @"tt://catalog" - toSharedViewController: [CatalogController class]]; - } - - [map from: @"tt://photoTest1" - parent: @"tt://catalog" - toViewController: [PhotoTest1Controller class] - selector: nil - transition: 0]; - [map from: @"tt://photoTest2" - parent: @"tt://catalog" - toViewController: [PhotoTest2Controller class] - selector: nil - transition: 0]; - - [map from: @"tt://imageTest1" - parent: @"tt://catalog" - toViewController: [ImageTest1Controller class] - selector: nil - transition: 0]; - - [map from: @"tt://tableTest" - parent: @"tt://catalog" - toViewController: [TableTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://tableItemTest" - parent: @"tt://catalog" - toViewController: [TableItemTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://tableControlsTest" - parent: @"tt://catalog" - toViewController: [TableControlsTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://styledTextTableTest" - parent: @"tt://catalog" - toViewController: [StyledTextTableTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://tableWithShadow" - parent: @"tt://catalog" - toViewController: [TableWithShadowController class] - selector: nil - transition: 0]; - - [map from: @"tt://tableWithBanner" - parent: @"tt://catalog" - toViewController: [TableWithBannerController class] - selector: nil - transition: 0]; - - [map from: @"tt://tableDragRefresh" - parent: @"tt://catalog" - toViewController: [TableDragRefreshController class] - selector: nil - transition: 0]; - - [map from: @"tt://composerTest" - parent: @"tt://catalog" - toViewController: [MessageTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://searchTest" - parent: @"tt://catalog" - toViewController: [SearchTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://activityTest" - parent: @"tt://catalog" - toViewController: [ActivityTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://styleTest" - parent: @"tt://catalog" - toViewController: [StyleTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://styledTextTest" - parent: @"tt://catalog" - toViewController: [StyledTextTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://buttonTest" - parent: @"tt://catalog" - toViewController: [ButtonTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://tabBarTest" - parent: @"tt://catalog" - toViewController: [TabBarTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://youTubeTest" - parent: @"tt://catalog" - toViewController: [YouTubeTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://imageTest2" - parent: @"tt://catalog" - toViewController: [TableImageTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://scrollViewTest" - parent: @"tt://catalog" - toViewController: [ScrollViewTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://launcherTest" - parent: @"tt://catalog" - toViewController: [LauncherViewTestController class] - selector: nil - transition: 0]; - - [map from: @"tt://dlprogress" - parent: @"tt://catalog" - toViewController: [DownloadProgressTestController class] - selector: nil - transition: 0]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://catalog"]]; - } -} - -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - -@end diff --git a/samples/TTCatalog/Classes/ButtonTestController.h b/samples/TTCatalog/Classes/ButtonTestController.h deleted file mode 100644 index a4833431af..0000000000 --- a/samples/TTCatalog/Classes/ButtonTestController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -@interface ButtonTestController : TTViewController { - CGFloat _fontSize; -} - -@end diff --git a/samples/TTCatalog/Classes/ButtonTestController.m b/samples/TTCatalog/Classes/ButtonTestController.m deleted file mode 100644 index 4740636f21..0000000000 --- a/samples/TTCatalog/Classes/ButtonTestController.m +++ /dev/null @@ -1,166 +0,0 @@ -#import "ButtonTestController.h" -#import - -@interface ButtonTestStyleSheet : TTDefaultStyleSheet -@end - -@implementation ButtonTestStyleSheet - -- (TTStyle*)blackForwardButton:(UIControlState)state { - TTShape* shape = [TTRoundedRightArrowShape shapeWithRadius:4.5]; - UIColor* tintColor = RGBCOLOR(0, 0, 0); - return [TTSTYLESHEET toolbarButtonForState:state shape:shape tintColor:tintColor font:nil]; -} - -- (TTStyle*)blueToolbarButton:(UIControlState)state { - TTShape* shape = [TTRoundedRectangleShape shapeWithRadius:4.5]; - UIColor* tintColor = RGBCOLOR(30, 110, 255); - return [TTSTYLESHEET toolbarButtonForState:state shape:shape tintColor:tintColor font:nil]; -} - -- (TTStyle*)embossedButton:(UIControlState)state { - if (state == UIControlStateNormal) { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0, 0, 1, 0) next: - [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0) blur:1 offset:CGSizeMake(0, 1) next: - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(255, 255, 255) - color2:RGBCOLOR(216, 221, 231) next: - [TTSolidBorderStyle styleWithColor:RGBCOLOR(161, 167, 178) width:1 next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(10, 12, 9, 12) next: - [TTTextStyle styleWithFont:nil color:TTSTYLEVAR(linkTextColor) - shadowColor:[UIColor colorWithWhite:255 alpha:0.4] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]]]; - } else if (state == UIControlStateHighlighted) { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0, 0, 1, 0) next: - [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0.9) blur:1 offset:CGSizeMake(0, 1) next: - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(225, 225, 225) - color2:RGBCOLOR(196, 201, 221) next: - [TTSolidBorderStyle styleWithColor:RGBCOLOR(161, 167, 178) width:1 next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(10, 12, 9, 12) next: - [TTTextStyle styleWithFont:nil color:[UIColor whiteColor] - shadowColor:[UIColor colorWithWhite:255 alpha:0.4] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]]]; - } else { - return nil; - } -} - -- (TTStyle*)dropButton:(UIControlState)state { - if (state == UIControlStateNormal) { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next: - [TTShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.7) blur:3 offset:CGSizeMake(2, 2) next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0.25, 0.25, 0.25, 0.25) next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-0.25, -0.25, -0.25, -0.25) next: - [TTSolidBorderStyle styleWithColor:RGBCOLOR(161, 167, 178) width:1 next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(2, 0, 0, 0) next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(11, 10, 9, 10) next: - [TTTextStyle styleWithFont:nil color:TTSTYLEVAR(linkTextColor) - shadowColor:[UIColor colorWithWhite:255 alpha:0.4] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]]]]]; - } else if (state == UIControlStateHighlighted) { - return - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(3, 3, 0, 0) next: - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTSolidBorderStyle styleWithColor:RGBCOLOR(161, 167, 178) width:1 next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(2, 0, 0, 0) next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(11, 10, 9, 10) next: - [TTTextStyle styleWithFont:nil color:TTSTYLEVAR(linkTextColor) - shadowColor:[UIColor colorWithWhite:255 alpha:0.4] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]]]; - } else { - return nil; - } -} - -@end - -@implementation ButtonTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (void)layout { - TTFlowLayout* flowLayout = [[[TTFlowLayout alloc] init] autorelease]; - flowLayout.padding = 20; - flowLayout.spacing = 20; - CGSize size = [flowLayout layoutSubviews:self.view.subviews forView:self.view]; - - UIScrollView* scrollView = (UIScrollView*)self.view; - scrollView.contentSize = CGSizeMake(scrollView.width, size.height); -} - -- (void)increaseFont { - _fontSize += 4; - - for (UIView* view in self.view.subviews) { - if ([view isKindOfClass:[TTButton class]]) { - TTButton* button = (TTButton*)view; - button.font = [UIFont boldSystemFontOfSize:_fontSize]; - [button sizeToFit]; - } - } - [self layout]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _fontSize = 12; - - [TTStyleSheet setGlobalStyleSheet:[[[ButtonTestStyleSheet alloc] init] autorelease]]; - } - return self; -} - -- (void)dealloc { - [TTStyleSheet setGlobalStyleSheet:nil]; - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - self.navigationItem.rightBarButtonItem - = [[[UIBarButtonItem alloc] initWithTitle:@"Increase Font" style:UIBarButtonItemStyleBordered - target:self action:@selector(increaseFont)] autorelease]; - - UIScrollView* scrollView = [[[UIScrollView alloc] initWithFrame:TTNavigationFrame()] autorelease]; - scrollView.autoresizesSubviews = YES; - scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - scrollView.backgroundColor = RGBCOLOR(216, 221, 231); - //scrollView.backgroundColor = RGBCOLOR(119, 140, 168); - scrollView.canCancelContentTouches = NO; - scrollView.delaysContentTouches = NO; - self.view = scrollView; - - NSArray* buttons = [NSArray arrayWithObjects: - [TTButton buttonWithStyle:@"toolbarButton:" title:@"Toolbar Button"], - [TTButton buttonWithStyle:@"toolbarRoundButton:" title:@"Round Button"], - [TTButton buttonWithStyle:@"toolbarBackButton:" title:@"Back Button"], - [TTButton buttonWithStyle:@"toolbarForwardButton:" title:@"Forward Button"], - - [TTButton buttonWithStyle:@"blackForwardButton:" title:@"Black Button"], - [TTButton buttonWithStyle:@"blueToolbarButton:" title:@"Blue Button"], - [TTButton buttonWithStyle:@"embossedButton:" title:@"Embossed Button"], - [TTButton buttonWithStyle:@"dropButton:" title:@"Shadow Button"], - nil]; - - for (TTButton* button in buttons) { - button.font = [UIFont boldSystemFontOfSize:_fontSize]; - [button sizeToFit]; - [scrollView addSubview:button]; - } - - [self layout]; -} - -@end diff --git a/samples/TTCatalog/Classes/CatalogController.h b/samples/TTCatalog/Classes/CatalogController.h deleted file mode 100644 index 2b9f0dd091..0000000000 --- a/samples/TTCatalog/Classes/CatalogController.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface CatalogController : TTTableViewController -@end diff --git a/samples/TTCatalog/Classes/CatalogController.m b/samples/TTCatalog/Classes/CatalogController.m deleted file mode 100644 index 7023466844..0000000000 --- a/samples/TTCatalog/Classes/CatalogController.m +++ /dev/null @@ -1,62 +0,0 @@ -#import "CatalogController.h" - -@implementation CatalogController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.title = @"Three20 Catalog"; - self.navigationItem.backBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle:@"Catalog" style:UIBarButtonItemStyleBordered - target:nil action:nil] autorelease]; - - self.tableViewStyle = UITableViewStyleGrouped; - } - return self; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTModelViewController - -- (void)createModel { - self.dataSource = [TTSectionedDataSource dataSourceWithObjects: - @"Photos", - [TTTableTextItem itemWithText:@"Photo Browser" URL:@"tt://photoTest1"], - [TTTableTextItem itemWithText:@"Photo Thumbnails" URL:@"tt://photoTest2"], - - @"Styles", - [TTTableTextItem itemWithText:@"Styled Views" URL:@"tt://styleTest"], - [TTTableTextItem itemWithText:@"Styled Labels" URL:@"tt://styledTextTest"], - - @"Controls", - [TTTableTextItem itemWithText:@"Buttons" URL:@"tt://buttonTest"], - [TTTableTextItem itemWithText:@"Tabs" URL:@"tt://tabBarTest"], - [TTTableTextItem itemWithText:@"Composers" URL:@"tt://composerTest"], - - @"Tables", - [TTTableTextItem itemWithText:@"Table Items" URL:@"tt://tableItemTest"], - [TTTableTextItem itemWithText:@"Table Controls" URL:@"tt://tableControlsTest"], - [TTTableTextItem itemWithText:@"Styled Labels in Table" URL:@"tt://styledTextTableTest"], - [TTTableTextItem itemWithText:@"Web Images in Table" URL:@"tt://imageTest2"], - [TTTableTextItem itemWithText:@"Table With Banner" URL:@"tt://tableWithBanner"], - [TTTableTextItem itemWithText:@"Table With Shadow" URL:@"tt://tableWithShadow"], - [TTTableTextItem itemWithText:@"Table With Drag Refresh" URL:@"tt://tableDragRefresh"], - - @"Models", - [TTTableTextItem itemWithText:@"Model Search" URL:@"tt://searchTest"], - [TTTableTextItem itemWithText:@"Model States" URL:@"tt://tableTest"], - - @"General", - [TTTableTextItem itemWithText:@"Web Image" URL:@"tt://imageTest1"], - [TTTableTextItem itemWithText:@"YouTube Player" URL:@"tt://youTubeTest"], - [TTTableTextItem itemWithText:@"Web Browser" URL:@"http://github.com/joehewitt/three20"], - [TTTableTextItem itemWithText:@"Activity Labels" URL:@"tt://activityTest"], - [TTTableTextItem itemWithText:@"Download Progress" URL:@"tt://dlprogress"], - [TTTableTextItem itemWithText:@"Scroll View" URL:@"tt://scrollViewTest"], - [TTTableTextItem itemWithText:@"Launcher" URL:@"tt://launcherTest"], - nil]; -} - -@end diff --git a/samples/TTCatalog/Classes/DownloadProgressTestController.h b/samples/TTCatalog/Classes/DownloadProgressTestController.h deleted file mode 100644 index 2150205521..0000000000 --- a/samples/TTCatalog/Classes/DownloadProgressTestController.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -@class DownloadTestModel; -@interface DownloadProgressTestController : TTViewController { - NSUInteger _defaultMaxContentLength; - TTActivityLabel *_activityLabel; - DownloadTestModel *_loadingModel; - NSTimer *_progressTimer; -} -@end diff --git a/samples/TTCatalog/Classes/DownloadProgressTestController.m b/samples/TTCatalog/Classes/DownloadProgressTestController.m deleted file mode 100644 index ea387d261c..0000000000 --- a/samples/TTCatalog/Classes/DownloadProgressTestController.m +++ /dev/null @@ -1,142 +0,0 @@ -#import "DownloadProgressTestController.h" -#import -#import "DownloadTestModel.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation DownloadProgressTestController - -static const NSString *k1MBDownloadUrl = @"http://cachefly.cachefly.net/1mb.test"; -static const NSString *k5MBDownloadUrl = @"http://cachefly.cachefly.net/5mb.test"; -static const NSString *k10MBDownloadUrl = @"http://cachefly.cachefly.net/10mb.test"; - -static const NSString *k1MBDownloadTitle = @"Download 1MB File"; -static const NSString *k5MBDownloadTitle = @"Download 5MB File"; -static const NSString *k10MBDownloadTitle = @"Download 10MB File"; -/////////////////////////////////////////////////////////////////////////////////////////////////// -// initiation - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.title = @"Download Progress"; - } - return self; -} - -- (void)dealloc { - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (void)loadWithUrl:(NSString*)url { - TT_RELEASE_SAFELY(_loadingModel); - _loadingModel = [[DownloadTestModel alloc] init]; - [_loadingModel.delegates addObject: self]; - [_loadingModel setDownloadUrl: url]; - [_loadingModel load: TTURLRequestCachePolicyNoCache more: NO]; -} - -- (void)updateProgress:(NSTimer*)timer { - [_activityLabel setProgress: [_loadingModel downloadProgress]]; -} - -- (void)layout { - TTGridLayout *gridLayout = [[[TTGridLayout alloc] init] autorelease]; - [gridLayout setColumnCount: 1]; - [gridLayout setSpacing: 20.0f]; - [gridLayout setPadding: 10.0f]; - - CGSize size = [gridLayout layoutSubviews:self.view.subviews forView:self.view]; - - UIScrollView *scrollView = (UIScrollView*)self.view; - scrollView.contentSize = CGSizeMake(scrollView.width, size.height); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [self setView: [[[UIScrollView alloc] initWithFrame:TTNavigationFrame()] autorelease]]; - [self.view setBackgroundColor: [UIColor groupTableViewBackgroundColor]]; - - TT_RELEASE_SAFELY(_activityLabel); - _activityLabel = [[TTActivityLabel alloc] initWithStyle: TTActivityLabelStyleBlackBezel]; - [_activityLabel setText: @"View Loaded"]; - [self.view addSubview: _activityLabel]; - - NSArray *buttons = [NSArray arrayWithObjects: - [TTButton buttonWithStyle:@"toolbarRoundButton:" title:[k1MBDownloadTitle copy]], - [TTButton buttonWithStyle:@"toolbarRoundButton:" title:[k5MBDownloadTitle copy]], - [TTButton buttonWithStyle:@"toolbarRoundButton:" title:[k10MBDownloadTitle copy]], - nil]; - for (TTButton* button in buttons) { - [button setFont: [UIFont systemFontOfSize: 16.0f]]; - [button sizeToFit]; - [button addTarget:self action:@selector(downloadButtonAction:) forControlEvents: UIControlEventTouchUpInside]; - [self.view addSubview: button]; - } - - [self layout]; -} - -- (void)viewDidAppear:(BOOL)animated { - _defaultMaxContentLength = [[TTURLRequestQueue mainQueue] maxContentLength]; - [[TTURLRequestQueue mainQueue] setMaxContentLength: 0]; - [[TTURLRequestQueue mainQueue] setSuspended: NO]; -} - -- (void)viewWillDisappear:(BOOL)animated { - TT_RELEASE_SAFELY(_loadingModel); - [[TTURLRequestQueue mainQueue] setMaxContentLength: _defaultMaxContentLength]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// public - -- (void)downloadButtonAction:(TTButton*)button { - if ([[button titleForState:UIControlStateNormal] isEqualToString: [k1MBDownloadTitle copy]]) { - [self loadWithUrl: [k1MBDownloadUrl copy]]; - } - else if ([[button titleForState:UIControlStateNormal] isEqualToString: [k5MBDownloadTitle copy]]) { - [self loadWithUrl: [k5MBDownloadUrl copy]]; - } - else if ([[button titleForState:UIControlStateNormal] isEqualToString: [k10MBDownloadTitle copy]]) { - [self loadWithUrl: [k10MBDownloadUrl copy]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTURLRequestDelegate - - -- (void)modelDidStartLoad:(id )model { - TT_INVALIDATE_TIMER(_progressTimer); - _progressTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0f/24.0f) target:self selector:@selector(updateProgress:) userInfo:nil repeats: YES]; - [_activityLabel setText:@"Download Started"]; - [_activityLabel setProgress: 0.0f]; -} - -- (void)modelDidFinishLoad:(id )model { - TT_INVALIDATE_TIMER(_progressTimer); - [_activityLabel setText:@"Download Finished"]; - [_activityLabel setProgress: 1.0f]; -} - -- (void)model:(id )model didFailLoadWithError:(NSError *)error { - TT_INVALIDATE_TIMER(_progressTimer); - [_activityLabel setText:@"Download Failed"]; - [_activityLabel setProgress: 0.0f]; -} - -- (void)modelDidCancelLoad:(id )model { - TT_INVALIDATE_TIMER(_progressTimer); - [_activityLabel setText:@"Download Canceled"]; - [_activityLabel setProgress: 0.0f]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@end diff --git a/samples/TTCatalog/Classes/DownloadTestModel.h b/samples/TTCatalog/Classes/DownloadTestModel.h deleted file mode 100644 index 66d0cfe5be..0000000000 --- a/samples/TTCatalog/Classes/DownloadTestModel.h +++ /dev/null @@ -1,10 +0,0 @@ -#import - -@interface DownloadTestModel : TTURLRequestModel { - NSString *_downloadUrl; -} - -@property (nonatomic, assign) NSString* downloadUrl; - -@end - diff --git a/samples/TTCatalog/Classes/DownloadTestModel.m b/samples/TTCatalog/Classes/DownloadTestModel.m deleted file mode 100644 index 7516e72ae8..0000000000 --- a/samples/TTCatalog/Classes/DownloadTestModel.m +++ /dev/null @@ -1,34 +0,0 @@ -#import "DownloadTestModel.h" -#import - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation DownloadTestModel - -@synthesize downloadUrl = _downloadUrl; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// initiation - -- (id)init { - if (self = [super init]) { - } - return self; -} - -- (void)dealloc { - TT_RELEASE_SAFELY(_downloadUrl); - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTURLRequestModel - -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { - TTURLRequest *request = [[[TTURLRequest alloc] initWithURL: _downloadUrl delegate: self] autorelease]; - [request setResponse: [[[TTURLDataResponse alloc] init] autorelease]]; - [request setCachePolicy: cachePolicy]; - [request send]; -} - -@end diff --git a/samples/TTCatalog/Classes/ImageTest1Controller.h b/samples/TTCatalog/Classes/ImageTest1Controller.h deleted file mode 100644 index 1d2b5da21f..0000000000 --- a/samples/TTCatalog/Classes/ImageTest1Controller.h +++ /dev/null @@ -1,8 +0,0 @@ -#import - -@interface ImageTest1Controller : UIViewController { - -} - -@end - diff --git a/samples/TTCatalog/Classes/ImageTest1Controller.m b/samples/TTCatalog/Classes/ImageTest1Controller.m deleted file mode 100644 index 54ef62e94c..0000000000 --- a/samples/TTCatalog/Classes/ImageTest1Controller.m +++ /dev/null @@ -1,21 +0,0 @@ - -#import "ImageTest1Controller.h" - -@implementation ImageTest1Controller - -- (void)loadView { - self.view = [[[UIView alloc] init] autorelease]; - self.view.backgroundColor = [UIColor whiteColor]; - - TTImageView* imageView = [[[TTImageView alloc] initWithFrame:CGRectMake(30, 30, 0, 0)] - autorelease]; - imageView.autoresizesToImage = YES; - imageView.urlPath = @"http://farm4.static.flickr.com/3163/3110335722_7a906f9d8b_m.jpg"; - [self.view addSubview:imageView]; -} - -- (void)dealloc { - [super dealloc]; -} - -@end diff --git a/samples/TTCatalog/Classes/LauncherViewTestController.h b/samples/TTCatalog/Classes/LauncherViewTestController.h deleted file mode 100644 index 333a57223a..0000000000 --- a/samples/TTCatalog/Classes/LauncherViewTestController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -@interface LauncherViewTestController : TTViewController { - TTLauncherView* _launcherView; -} - -@end diff --git a/samples/TTCatalog/Classes/LauncherViewTestController.m b/samples/TTCatalog/Classes/LauncherViewTestController.m deleted file mode 100644 index 5b07f7949b..0000000000 --- a/samples/TTCatalog/Classes/LauncherViewTestController.m +++ /dev/null @@ -1,99 +0,0 @@ -#import "LauncherViewTestController.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation LauncherViewTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.title = @"Launcher"; - } - return self; -} - -- (void)dealloc { - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [super loadView]; - - _launcherView = [[TTLauncherView alloc] initWithFrame:self.view.bounds]; - _launcherView.backgroundColor = [UIColor blackColor]; - _launcherView.delegate = self; - _launcherView.columnCount = 4; - _launcherView.pages = [NSArray arrayWithObjects: - [NSArray arrayWithObjects: - [[[TTLauncherItem alloc] initWithTitle:@"Button 1" - image:@"bundle://Icon.png" - URL:nil canDelete:YES] autorelease], - [[[TTLauncherItem alloc] initWithTitle:@"Button 2" - image:@"bundle://Icon.png" - URL:nil canDelete:YES] autorelease], - [[[TTLauncherItem alloc] initWithTitle:@"Button 3" - image:@"bundle://Icon.png" - URL:@"fb://item3" canDelete:YES] autorelease], - [[[TTLauncherItem alloc] initWithTitle:@"Button 4" - image:@"bundle://Icon.png" - URL:@"fb://item4" canDelete:YES] autorelease], - [[[TTLauncherItem alloc] initWithTitle:@"Button 5" - image:@"bundle://Icon.png" - URL:@"fb://item5" canDelete:YES] autorelease], - [[[TTLauncherItem alloc] initWithTitle:@"Button 6" - image:@"bundle://Icon.png" - URL:@"fb://item6" canDelete:YES] autorelease], - [[[TTLauncherItem alloc] initWithTitle:@"Button 7" - image:@"bundle://Icon.png" - URL:@"fb://item7" canDelete:YES] autorelease], - nil], - [NSArray arrayWithObjects: - [[[TTLauncherItem alloc] initWithTitle:@"Button 8" - image:@"bundle://Icon.png" - URL:nil canDelete:YES] autorelease], - [[[TTLauncherItem alloc] initWithTitle:@"Button 9" - image:@"bundle://Icon.png" - URL:nil canDelete:YES] autorelease], - nil], - nil - ]; - [self.view addSubview:_launcherView]; - - TTLauncherItem* item = [_launcherView itemWithURL:@"fb://item3"]; - item.badgeNumber = 4; - - item = [_launcherView itemWithURL:@"fb://item4"]; - item.badgeNumber = 0; - - item = [_launcherView itemWithURL:@"fb://item5"]; - item.badgeValue = @"100!"; - - item = [_launcherView itemWithURL:@"fb://item6"]; - item.badgeValue = @"Off"; - - item = [_launcherView itemWithURL:@"fb://item7"]; - item.badgeNumber = 300; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTLauncherViewDelegate - -- (void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item { -} - -- (void)launcherViewDidBeginEditing:(TTLauncherView*)launcher { - [self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc] - initWithBarButtonSystemItem:UIBarButtonSystemItemDone - target:_launcherView action:@selector(endEditing)] autorelease] animated:YES]; -} - -- (void)launcherViewDidEndEditing:(TTLauncherView*)launcher { - [self.navigationItem setRightBarButtonItem:nil animated:YES]; -} - -@end diff --git a/samples/TTCatalog/Classes/MessageTestController.h b/samples/TTCatalog/Classes/MessageTestController.h deleted file mode 100644 index 7d5c76b310..0000000000 --- a/samples/TTCatalog/Classes/MessageTestController.h +++ /dev/null @@ -1,11 +0,0 @@ -#import "SearchTestController.h" - -@class MockDataSource; - -@interface MessageTestController : TTViewController - { - NSTimer* _sendTimer; -} - -@end - diff --git a/samples/TTCatalog/Classes/MessageTestController.m b/samples/TTCatalog/Classes/MessageTestController.m deleted file mode 100644 index bee8d24a57..0000000000 --- a/samples/TTCatalog/Classes/MessageTestController.m +++ /dev/null @@ -1,145 +0,0 @@ - -#import "MessageTestController.h" -#import "SearchTestController.h" -#import "MockDataSource.h" -#import - -@implementation MessageTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (UIViewController*)composeTo:(NSString*)recipient { - TTTableTextItem* item = [TTTableTextItem itemWithText:recipient URL:nil]; - - TTMessageController* controller = - [[[TTMessageController alloc] initWithRecipients:[NSArray arrayWithObject:item]] autorelease]; - controller.dataSource = [[[MockSearchDataSource alloc] init] autorelease]; - controller.delegate = self; - - return controller; -} - -- (UIViewController*)post:(NSDictionary*)query { - TTPostController* controller = [[[TTPostController alloc] initWithNavigatorURL:nil - query: - [NSDictionary dictionaryWithObjectsAndKeys:@"Default Text", @"text", nil]] - autorelease]; - controller.originView = [query objectForKey:@"__target__"]; - return controller; -} - -- (void)cancelAddressBook { - [[TTNavigator navigator].visibleViewController dismissModalViewControllerAnimated:YES]; -} - -- (void)sendDelayed:(NSTimer*)timer { - _sendTimer = nil; - - NSArray* fields = timer.userInfo; - UIView* lastView = [self.view.subviews lastObject]; - CGFloat y = lastView.bottom + 20; - - TTMessageRecipientField* toField = [fields objectAtIndex:0]; - for (id recipient in toField.recipients) { - UILabel* label = [[[UILabel alloc] init] autorelease]; - label.backgroundColor = self.view.backgroundColor; - label.text = [NSString stringWithFormat:@"Sent to: %@", recipient]; - [label sizeToFit]; - label.frame = CGRectMake(30, y, label.width, label.height); - y += label.height; - [self.view addSubview:label]; - } - - [self.modalViewController dismissModalViewControllerAnimated:YES]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _sendTimer = nil; - - [[TTNavigator navigator].URLMap from:@"tt://compose?to=(composeTo:)" - toModalViewController:self selector:@selector(composeTo:)]; - - [[TTNavigator navigator].URLMap from:@"tt://post" - toViewController:self selector:@selector(post:)]; - } - return self; -} - -- (void)dealloc { - [[TTNavigator navigator].URLMap removeURL:@"tt://compose?to=(composeTo:)"]; - [[TTNavigator navigator].URLMap removeURL:@"tt://post"]; - [_sendTimer invalidate]; - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - CGRect appFrame = [UIScreen mainScreen].applicationFrame; - self.view = [[[UIView alloc] initWithFrame:appFrame] autorelease];; - self.view.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1]; - - UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - [button setTitle:@"Show TTMessageController" forState:UIControlStateNormal]; - [button addTarget:@"tt://compose?to=Alan%20Jones" action:@selector(openURL) - forControlEvents:UIControlEventTouchUpInside]; - button.frame = CGRectMake(20, 20, appFrame.size.width - 40, 50); - [self.view addSubview:button]; - - UIButton* button2 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - [button2 setTitle:@"Show TTPostController" forState:UIControlStateNormal]; - [button2 addTarget:@"tt://post" action:@selector(openURLFromButton:) - forControlEvents:UIControlEventTouchUpInside]; - button2.frame = CGRectMake(20, button.bottom + 20, appFrame.size.width - 40, 50); - [self.view addSubview:button2]; -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return TTIsSupportedOrientation(interfaceOrientation); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTMessageControllerDelegate - -- (void)composeController:(TTMessageController*)controller didSendFields:(NSArray*)fields { - _sendTimer = [NSTimer scheduledTimerWithTimeInterval:2 target:self - selector:@selector(sendDelayed:) userInfo:fields repeats:NO]; -} - -- (void)composeControllerDidCancel:(TTMessageController*)controller { - [_sendTimer invalidate]; - _sendTimer = nil; - - [controller dismissModalViewControllerAnimated:YES]; -} - -- (void)composeControllerShowRecipientPicker:(TTMessageController*)controller { - SearchTestController* searchController = [[[SearchTestController alloc] init] autorelease]; - searchController.delegate = self; - searchController.title = @"Address Book"; - searchController.navigationItem.prompt = @"Select a recipient"; - searchController.navigationItem.rightBarButtonItem = - [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel - target:self action:@selector(cancelAddressBook)] autorelease]; - - UINavigationController* navController = [[[UINavigationController alloc] init] autorelease]; - [navController pushViewController:searchController animated:NO]; - [controller presentModalViewController:navController animated:YES]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// SearchTestControllerDelegate - -- (void)searchTestController:(SearchTestController*)controller didSelectObject:(id)object { - TTMessageController* composeController = (TTMessageController*)self.modalViewController; - [composeController addRecipient:object forFieldAtIndex:0]; - [controller dismissModalViewControllerAnimated:YES]; -} - -@end diff --git a/samples/TTCatalog/Classes/MockDataSource.h b/samples/TTCatalog/Classes/MockDataSource.h deleted file mode 100644 index 9f98b0e995..0000000000 --- a/samples/TTCatalog/Classes/MockDataSource.h +++ /dev/null @@ -1,46 +0,0 @@ -#import - -/* - * a searchable model which can be configured with a - * loading and/or search time - */ -@interface MockAddressBook : NSObject { - NSMutableArray* _delegates; - NSMutableArray* _names; - NSArray* _allNames; - NSTimer* _fakeSearchTimer; - NSTimeInterval _fakeSearchDuration; - NSTimer* _fakeLoadingTimer; - NSTimeInterval _fakeLoadingDuration; -} - -@property(nonatomic,retain) NSArray* names; -@property(nonatomic) NSTimeInterval fakeSearchDuration; -@property(nonatomic) NSTimeInterval fakeLoadingDuration; - -+ (NSMutableArray*)fakeNames; - -- (id)initWithNames:(NSArray*)names; - - -- (void)search:(NSString*)text; - -@end - -@interface MockDataSource : TTSectionedDataSource { - MockAddressBook* _addressBook; -} - -@property(nonatomic,readonly) MockAddressBook* addressBook; - -@end - -@interface MockSearchDataSource : TTSectionedDataSource { - MockAddressBook* _addressBook; -} - -@property(nonatomic,readonly) MockAddressBook* addressBook; - -- (id)initWithDuration:(NSTimeInterval)duration; - -@end diff --git a/samples/TTCatalog/Classes/MockDataSource.m b/samples/TTCatalog/Classes/MockDataSource.m deleted file mode 100644 index 44f307f2de..0000000000 --- a/samples/TTCatalog/Classes/MockDataSource.m +++ /dev/null @@ -1,577 +0,0 @@ - -#import "MockDataSource.h" - -@interface MockAddressBook () -- (void) loadNames; -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MockAddressBook - -@synthesize names = _names, fakeSearchDuration = _fakeSearchDuration, fakeLoadingDuration = _fakeLoadingDuration; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// class public - -+ (NSMutableArray*)fakeNames { - return [NSMutableArray arrayWithObjects: - @"Hector Lewis", - @"Juanita Fredrick", - @"Richard Raymond", - @"Marcia Myer", - @"Shannon Mahoney", - @"James Steiner", - @"Daniel Lloyd", - @"Fredrick Hutchins", - @"Tracey Smith", - @"Brandon Rutherford", - @"Megan Lopez", - @"Jean Trujillo", - @"Franklin Diamond", - @"Mildred Jacobsen", - @"Sandra Adams", - @"Debra Pugliese", - @"Cynthia Hall", - @"Joshua Hicks", - @"Lorenzo Evatt", - @"Erica Dozier", - @"Barbara Lazarus", - @"Joye Hocker", - @"Henry Arana", - @"Glen Cabrales", - @"Mai Valdez", - @"Travis Book", - @"John Ibanez", - @"Barbara White", - @"Cassandra Smith", - @"Virginia Costilla", - @"Rachel Baker", - @"Mildred Foley", - @"Todd Nevels", - @"William Boes", - @"Claire Harrell", - @"Charlotte Espinoza", - @"Gerald Miller", - @"Lucille Lankford", - @"Lloyd Fritz", - @"Charlie Cabrera", - @"Shane Vogt", - @"Cynthia Simon", - @"Clayton Land", - @"Roy Stahl", - @"Helen Peralta", - @"Reinaldo Self", - @"Thomas Carter", - @"Anthony Hebert", - @"Timothy Abernathy", - @"Rob Magruder", - @"Ira Kaplan", - @"Dixie Gurney", - @"Darrin Pritchard", - @"Patrick Brooks", - @"Norman Sanchez", - @"Vickie Robbins", - @"Santiago Chiles", - @"Douglas Bearden", - @"Cora Jones", - @"Donald Kennedy", - @"Henry Nelson", - @"Rosa Judge", - @"Andrew Khan", - @"Lauretta Rose", - @"Mildred Nance", - @"Antoinette Delarosa", - @"Stephanie Johnson", - @"Geoffrey Perry", - @"Sally Houston", - @"Pamela Pellegrin", - @"Nereida Faul", - @"Nichole Moore", - @"David Thompson", - @"Rob Burt", - @"Mary Gelb", - @"Glenda Stgeorge", - @"Lydia Freeman", - @"Otto Brown", - @"Erica Cooke", - @"Evelyn Stephens", - @"Vanessa Ayers", - @"Jeffrey Kirk", - @"Christine Stradford", - @"John Murphy", - @"Paul Pederson", - @"Genevieve Barrett", - @"Stanley Kelly", - @"Marie Noel", - @"Mike Mathis", - @"Albert Gary", - @"Alice Thomas", - @"Anna Bond", - @"Bobby Gaines", - @"Helen Ellis", - @"Bobbie Thayer", - @"Dorothy Totten", - @"Laura Wegener", - @"Pam Hackett", - @"Arlene Blount", - @"James Clark", - @"Richard Harris", - @"Joseph Cain", - @"Stacy Jones", - @"Bonnie Gonzalez", - @"Maria Bailey", - @"Francis Caldwell", - @"Anthony Gale", - @"John Zackery", - @"Patricia Taylor", - @"Kimberly Jarrett", - @"Carol Dennie", - @"Betty Zager", - @"Ellen Godines", - @"Edward Adams", - @"Ricky Salamanca", - @"Elizabeth Ruvalcaba", - @"Veronica Esposito", - @"Russel Owen", - @"Harry Plascencia", - @"Thomas Dewalt", - @"Robert Eldred", - @"Frank Buerger", - @"Phillip James", - @"James Beverly", - @"Michael Mcallister", - @"George Nichols", - @"Richard Larson", - @"Patricia Ramirez", - @"Rob Govan", - @"Charles Johnston", - @"David Rogers", - @"Homer Allen", - @"Carolyn Green", - @"Velma Beery", - @"Ida Garcia", - @"Jasmine Creighton", - @"Ozie Templin", - @"Julia Hudson", - @"David Cortez", - @"Tina Henderson", - @"Janette Bray", - @"Michael Hamilton", - @"Andrew Bennett", - @"Margarita Lehmann", - @"Stephanie Whitehead", - @"Mary Saladino", - @"Nicholas Alaniz", - @"John Escobedo", - @"Macie Workman", - @"Michelle Thomas", - @"Robert Carvalho", - @"Allen Johnson", - @"Will Norris", - @"Matthew Mabrey", - @"Vicki Howard", - @"Annie Campbell", - @"Stephen Anderson", - @"Leah Scott", - @"Dominic Winters", - @"Catherine Rondeau", - @"Amanda Hall", - @"Michael Hucks", - @"Truman Vidal", - @"Jennifer Worley", - @"Jack Fiore", - @"Douglas Irby", - @"Ana Bonilla", - @"Jacob Lankford", - @"Robert Garcia", - @"Helene Arispe", - @"Ola Barnhill", - @"Rosario Delaney", - @"Robert Estes", - @"Karen Carter", - @"Hazel Thompson", - @"Rebecca Mack", - @"Lashawn Rice", - @"Harry Davis", - @"Matilda Woodbury", - @"Celia Barnhart", - @"Ava Murray", - @"John Williams", - @"Debbie Watts", - @"Karen Borel", - @"Neta Yingst", - @"Roy Carter", - @"Leon Roberts", - @"Evette Jones", - @"Dianna Adams", - @"Brian Reed", - @"Joyce Ritter", - @"Stephen Diaz", - @"Elizabeth Shealey", - @"Barbara Hatch", - @"Doug Harrison", - @"Sharon Castro", - @"Juan Frakes", - @"Gary Berry", - @"Helen Zamora", - @"Sarah Woodard", - @"Phillip Hebert", - @"Weldon Goldsmith", - @"Lisa Segura", - @"Adrienne Pedroza", - @"Alfred Ransom", - @"Everett Rambo", - @"John Phillips", - @"Carol Mccabe", - @"James Martinez", - @"Trang Strickland", - @"Linda Brown", - @"Shayla Hodgson", - @"Magdalena Moore", - @"Gwendolyn Meyers", - @"Stephen Williams", - @"Pamela Radford", - @"Jeffrey Hooker", - @"David Catania", - @"Marvin Miller", - @"Laura Murray", - @"Dorothy James", - @"Susannah Gibson", - @"Melissa Owens", - @"Deborah Horrell", - @"Franklin Williams", - @"Scott Brown", - @"Adam Gautreaux", - @"Joseph Byers", - @"Deborah Barker", - @"Linda Virgin", - @"Patricia Mitchell", - @"John Donovan", - @"Robert Hamill", - @"Jamel Mcmillen", - @"Patty Guzzi", - @"Mildred Leon", - @"Benjamin Mapes", - @"Allen Cave", - @"Patrick Sims", - @"Patrick Mercado", - @"Joyce Orozco", - @"Gloria Bell", - @"Gerard Kelley", - @"Molly Grant", - @"Patrick Perez", - @"John Corey", - @"Ryan Clemmer", - @"James Davis", - @"Kevin Scarborough", - @"Frankie Montagna", - @"Terry Joseph", - @"Ira Boyle", - @"Kathryn Hildebrandt", - @"James Larson", - @"Shelia Easter", - @"Gabriel Dorsett", - @"Irene Mcbroom", - @"Robert Hardin", - @"Sue Grossi", - @"Rebecca Stock", - @"Ruby Kiefer", - @"John Sandoval", - @"Peter King", - @"Joseph Fleming", - @"Joan Swenson", - @"Conrad Savory", - @"Grant Kowalewski", - @"Shirley Garcia", - @"Dorris West", - @"Jane Tran", - @"Meaghan Lam", - @"Jorge White", - @"Catherine Whittaker", - @"Katherine Hope", - @"Maria Underwood", - @"Rose Ray", - @"Samatha Sedlacek", - @"Jerri Sampson", - @"Loren Bourdeau", - @"William Wilson", - @"Stephen Canady", - @"Elaine Ruth", - @"Marcus Martin", - @"Aileen Kemp", - @"Kevin Maupin", - @"Martha Vanwinkle", - @"Kelly Munk", - @"Lisa Rosato", - @"Marcella Jett", - @"Barbara Murphy", - @"Edward Sherrod", - @"Jane Cushing", - @"Clara Sims", - @"Velma Moreno", - @"Eric Noguera", - @"Shirley Williams", - @"Gina Millard", - @"Edward Deputy", - @"Jennifer Myers", - @"Mary Spurgeon", - nil]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (void)fakeSearch:(NSString*)text { - self.names = [NSMutableArray array]; - - if (text.length) { - text = [text lowercaseString]; - for (NSString* name in _allNames) { - if ([[name lowercaseString] rangeOfString:text].location == 0) { - [_names addObject:name]; - } - } - } - - [_delegates perform:@selector(modelDidFinishLoad:) withObject:self]; -} - -- (void)fakeSearchReady:(NSTimer*)timer { - _fakeSearchTimer = nil; - - NSString* text = timer.userInfo; - [self fakeSearch:text]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNames:(NSArray*)names { - if (self = [super init]) { - _delegates = nil; - _allNames = [names copy]; - _names = nil; - _fakeSearchTimer = nil; - _fakeSearchDuration = 0; - } - return self; -} - -- (void)dealloc { - TT_INVALIDATE_TIMER(_fakeSearchTimer); - TT_INVALIDATE_TIMER(_fakeLoadingTimer) - TT_RELEASE_SAFELY(_delegates); - TT_RELEASE_SAFELY(_allNames); - TT_RELEASE_SAFELY(_names); - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTModel - -- (NSMutableArray*)delegates { - if (!_delegates) { - _delegates = TTCreateNonRetainingArray(); - } - return _delegates; -} - -- (BOOL)isLoadingMore { - return NO; -} - -- (BOOL)isOutdated { - return NO; -} - -- (BOOL)isLoaded { - return !!_names; -} - -- (BOOL)isLoading { - return !!_fakeSearchTimer || !!_fakeLoadingTimer; -} - -- (BOOL)isEmpty { - return !_names.count; -} - -- (void) fakeLoadingReady { - _fakeLoadingTimer = nil; - - [self loadNames]; - - [_delegates perform:@selector(modelDidFinishLoad:) withObject:self]; -} - -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { - [_delegates perform:@selector(modelDidStartLoad:) withObject:self]; - if (_fakeLoadingDuration) { - TT_INVALIDATE_TIMER(_fakeLoadingTimer); - _fakeLoadingTimer = [NSTimer scheduledTimerWithTimeInterval:_fakeLoadingDuration target:self - selector:@selector(fakeLoadingReady) userInfo:nil repeats:NO]; - [_delegates perform:@selector(modelDidStartLoad:) withObject:self]; - } else { - [self loadNames]; - [_delegates perform:@selector(modelDidFinishLoad:) withObject:self]; - } -} - -- (void)invalidate:(BOOL)erase { -} - -- (void)cancel { - if (_fakeSearchTimer) { - TT_INVALIDATE_TIMER(_fakeSearchTimer); - [_delegates perform:@selector(modelDidCancelLoad:) withObject:self]; - } else if(_fakeLoadingTimer) { - TT_INVALIDATE_TIMER(_fakeLoadingTimer); - [_delegates perform:@selector(modelDidCancelLoad:) withObject:self]; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// public - -- (void)loadNames { - TT_RELEASE_SAFELY(_names); - _names = [_allNames mutableCopy]; -} - -- (void)search:(NSString*)text { - [self cancel]; - - TT_RELEASE_SAFELY(_names); - if (text.length) { - if (_fakeSearchDuration) { - TT_INVALIDATE_TIMER(_fakeSearchTimer); - _fakeSearchTimer = [NSTimer scheduledTimerWithTimeInterval:_fakeSearchDuration target:self - selector:@selector(fakeSearchReady:) userInfo:text repeats:NO]; - [_delegates perform:@selector(modelDidStartLoad:) withObject:self]; - } else { - [self fakeSearch:text]; - [_delegates perform:@selector(modelDidFinishLoad:) withObject:self]; - } - } else { - [_delegates perform:@selector(modelDidChange:) withObject:self]; - } -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MockDataSource - -@synthesize addressBook = _addressBook; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)init { - if (self = [super init]) { - _addressBook = [[MockAddressBook alloc] initWithNames:[MockAddressBook fakeNames]]; - self.model = _addressBook; - } - return self; -} - -- (void)dealloc { - TT_RELEASE_SAFELY(_addressBook); - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UITableViewDataSource - -- (NSArray*)sectionIndexTitlesForTableView:(UITableView*)tableView { - return [TTTableViewDataSource lettersForSectionsWithSearch:YES summary:NO]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTTableViewDataSource - -- (void)tableViewDidLoadModel:(UITableView*)tableView { - self.items = [NSMutableArray array]; - self.sections = [NSMutableArray array]; - - NSMutableDictionary* groups = [NSMutableDictionary dictionary]; - for (NSString* name in _addressBook.names) { - NSString* letter = [NSString stringWithFormat:@"%C", [name characterAtIndex:0]]; - NSMutableArray* section = [groups objectForKey:letter]; - if (!section) { - section = [NSMutableArray array]; - [groups setObject:section forKey:letter]; - } - - TTTableItem* item = [TTTableTextItem itemWithText:name URL:nil]; - [section addObject:item]; - } - - NSArray* letters = [groups.allKeys sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; - for (NSString* letter in letters) { - NSArray* items = [groups objectForKey:letter]; - [_sections addObject:letter]; - [_items addObject:items]; - } -} - -- (id)model { - return _addressBook; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MockSearchDataSource - -@synthesize addressBook = _addressBook; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithDuration:(NSTimeInterval)duration { - if (self = [super init]) { - _addressBook = [[MockAddressBook alloc] initWithNames:[MockAddressBook fakeNames]]; - _addressBook.fakeSearchDuration = duration; - self.model = _addressBook; - } - return self; -} - -- (id)init { - return [self initWithDuration:0]; -} - -- (void)dealloc { - TT_RELEASE_SAFELY(_addressBook); - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTTableViewDataSource - -- (void)tableViewDidLoadModel:(UITableView*)tableView { - self.items = [NSMutableArray array]; - - for (NSString* name in _addressBook.names) { - TTTableItem* item = [TTTableTextItem itemWithText:name URL:@"http://google.com"]; - [_items addObject:item]; - } -} - -- (void)search:(NSString*)text { - [_addressBook search:text]; -} - -- (NSString*)titleForLoading:(BOOL)reloading { - return @"Searching..."; -} - -- (NSString*)titleForNoData { - return @"No names found"; -} - -@end diff --git a/samples/TTCatalog/Classes/MockPhotoSource.h b/samples/TTCatalog/Classes/MockPhotoSource.h deleted file mode 100644 index ab1f0f96a4..0000000000 --- a/samples/TTCatalog/Classes/MockPhotoSource.h +++ /dev/null @@ -1,44 +0,0 @@ -#import - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -typedef enum { - MockPhotoSourceNormal = 0, - MockPhotoSourceDelayed = 1, - MockPhotoSourceVariableCount = 2, - MockPhotoSourceLoadError = 4, -} MockPhotoSourceType; - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface MockPhotoSource : TTURLRequestModel { - MockPhotoSourceType _type; - NSString* _title; - NSMutableArray* _photos; - NSArray* _tempPhotos; - NSTimer* _fakeLoadTimer; -} - -- (id)initWithType:(MockPhotoSourceType)type title:(NSString*)title - photos:(NSArray*)photos photos2:(NSArray*)photos2; - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface MockPhoto : NSObject { - id _photoSource; - NSString* _thumbURL; - NSString* _smallURL; - NSString* _URL; - CGSize _size; - NSInteger _index; - NSString* _caption; -} - -- (id)initWithURL:(NSString*)URL smallURL:(NSString*)smallURL size:(CGSize)size; - -- (id)initWithURL:(NSString*)URL smallURL:(NSString*)smallURL size:(CGSize)size - caption:(NSString*)caption; - -@end diff --git a/samples/TTCatalog/Classes/MockPhotoSource.m b/samples/TTCatalog/Classes/MockPhotoSource.m deleted file mode 100644 index f2fa83d01e..0000000000 --- a/samples/TTCatalog/Classes/MockPhotoSource.m +++ /dev/null @@ -1,192 +0,0 @@ -#import "MockPhotoSource.h" - -@implementation MockPhotoSource - -@synthesize title = _title; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (void)fakeLoadReady { - _fakeLoadTimer = nil; - - if (_type & MockPhotoSourceLoadError) { - [_delegates perform: @selector(model:didFailLoadWithError:) - withObject: self - withObject: nil]; - } else { - NSMutableArray* newPhotos = [NSMutableArray array]; - - for (int i = 0; i < _photos.count; ++i) { - id photo = [_photos objectAtIndex:i]; - if ((NSNull*)photo != [NSNull null]) { - [newPhotos addObject:photo]; - } - } - - [newPhotos addObjectsFromArray:_tempPhotos]; - TT_RELEASE_SAFELY(_tempPhotos); - - [_photos release]; - _photos = [newPhotos retain]; - - for (int i = 0; i < _photos.count; ++i) { - id photo = [_photos objectAtIndex:i]; - if ((NSNull*)photo != [NSNull null]) { - photo.photoSource = self; - photo.index = i; - } - } - - [_delegates perform:@selector(modelDidFinishLoad:) withObject:self]; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithType:(MockPhotoSourceType)type title:(NSString*)title photos:(NSArray*)photos - photos2:(NSArray*)photos2 { - if (self = [super init]) { - _type = type; - _title = [title copy]; - _photos = photos2 ? [photos mutableCopy] : [[NSMutableArray alloc] init]; - _tempPhotos = photos2 ? [photos2 retain] : [photos retain]; - _fakeLoadTimer = nil; - - for (int i = 0; i < _photos.count; ++i) { - id photo = [_photos objectAtIndex:i]; - if ((NSNull*)photo != [NSNull null]) { - photo.photoSource = self; - photo.index = i; - } - } - - if (!(_type & MockPhotoSourceDelayed || photos2)) { - [self performSelector:@selector(fakeLoadReady)]; - } - } - return self; -} - -- (id)init { - return [self initWithType:MockPhotoSourceNormal title:nil photos:nil photos2:nil]; -} - -- (void)dealloc { - [_fakeLoadTimer invalidate]; - TT_RELEASE_SAFELY(_photos); - TT_RELEASE_SAFELY(_tempPhotos); - TT_RELEASE_SAFELY(_title); - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTModel - -- (BOOL)isLoading { - return !!_fakeLoadTimer; -} - -- (BOOL)isLoaded { - return !!_photos; -} - -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { - if (cachePolicy & TTURLRequestCachePolicyNetwork) { - [_delegates perform:@selector(modelDidStartLoad:) withObject:self]; - - TT_RELEASE_SAFELY(_photos); - _fakeLoadTimer = [NSTimer scheduledTimerWithTimeInterval:2 target:self - selector:@selector(fakeLoadReady) userInfo:nil repeats:NO]; - } -} - -- (void)cancel { - [_fakeLoadTimer invalidate]; - _fakeLoadTimer = nil; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTPhotoSource - -- (NSInteger)numberOfPhotos { - if (_tempPhotos) { - return _photos.count + (_type & MockPhotoSourceVariableCount ? 0 : _tempPhotos.count); - } else { - return _photos.count; - } -} - -- (NSInteger)maxPhotoIndex { - return _photos.count-1; -} - -- (id)photoAtIndex:(NSInteger)photoIndex { - if (photoIndex < _photos.count) { - id photo = [_photos objectAtIndex:photoIndex]; - if (photo == [NSNull null]) { - return nil; - } else { - return photo; - } - } else { - return nil; - } -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation MockPhoto - -@synthesize photoSource = _photoSource, size = _size, index = _index, caption = _caption; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithURL:(NSString*)URL smallURL:(NSString*)smallURL size:(CGSize)size { - return [self initWithURL:URL smallURL:smallURL size:size caption:nil]; -} - -- (id)initWithURL:(NSString*)URL smallURL:(NSString*)smallURL size:(CGSize)size - caption:(NSString*)caption { - if (self = [super init]) { - _photoSource = nil; - _URL = [URL copy]; - _smallURL = [smallURL copy]; - _thumbURL = [smallURL copy]; - _size = size; - _caption = [caption copy]; - _index = NSIntegerMax; - } - return self; -} - -- (void)dealloc { - TT_RELEASE_SAFELY(_URL); - TT_RELEASE_SAFELY(_smallURL); - TT_RELEASE_SAFELY(_thumbURL); - TT_RELEASE_SAFELY(_caption); - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTPhoto - -- (NSString*)URLForVersion:(TTPhotoVersion)version { - if (version == TTPhotoVersionLarge) { - return _URL; - } else if (version == TTPhotoVersionMedium) { - return _URL; - } else if (version == TTPhotoVersionSmall) { - return _smallURL; - } else if (version == TTPhotoVersionThumbnail) { - return _thumbURL; - } else { - return nil; - } -} - -@end diff --git a/samples/TTCatalog/Classes/PhotoTest1Controller.h b/samples/TTCatalog/Classes/PhotoTest1Controller.h deleted file mode 100644 index e82d4b5ff2..0000000000 --- a/samples/TTCatalog/Classes/PhotoTest1Controller.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface PhotoTest1Controller : TTPhotoViewController -@end diff --git a/samples/TTCatalog/Classes/PhotoTest1Controller.m b/samples/TTCatalog/Classes/PhotoTest1Controller.m deleted file mode 100644 index b0fe2df478..0000000000 --- a/samples/TTCatalog/Classes/PhotoTest1Controller.m +++ /dev/null @@ -1,107 +0,0 @@ -#import "PhotoTest1Controller.h" -#import "MockPhotoSource.h" - -@implementation PhotoTest1Controller - -- (void)viewDidLoad { - self.photoSource = [[[MockPhotoSource alloc] - initWithType:MockPhotoSourceNormal - //initWithType:MockPhotoSourceDelayed - // initWithType:MockPhotoSourceLoadError - // initWithType:MockPhotoSourceDelayed|MockPhotoSourceLoadError - title:@"Flickr Photos" - photos:[NSArray arrayWithObjects: - // Request fails immediately due to DNS error -// [[[MockPhoto alloc] -// initWithURL:@"http://example.com" -// smallURL:@"http://example.com" -// size:CGSizeMake(320, 480)] autorelease], - - // 404 on both URL and thumbnail -// [[[MockPhoto alloc] -// initWithURL:@"http://farm4.static.flickr.com/3425/3214x620333_daf56d25e5.jpg?v=0" -// smallURL:@"http://farm4.static.flickr.com/3425/3214620333_daf56d25e5_t.jpg" -// size:CGSizeMake(320, 480)] autorelease], - - // Returns HTML instead of image -// [[[MockPhoto alloc] -// initWithURL:@"http://flickr.com" -// smallURL:@"http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg" -// size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg" - size:CGSizeMake(320, 480) - caption:@"This is a caption."] autorelease], - - // Uncomment to cause photo viewer to ask photo source to load itself - // [NSNull null], - - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1134/3172884000_84bc6a841e.jpg?v=0" - smallURL:@"http://farm2.static.flickr.com/1134/3172884000_84bc6a841e_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123.jpg?v=0" - smallURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123_t.jpg" - size:CGSizeMake(320, 480) - caption:@"A hike."] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b_t.jpg" - size:CGSizeMake(320, 480) - caption:@"This is a really long caption to show how long captions are wrapped and \ -truncated. This maximum number of lines is six, so captions have to be pretty \ -darned verbose to get clipped. I am probably going to suffer from a repetitive stress injury \ -just from typing this! Are we truncated yet? Just a few more characters I guess."] autorelease], - - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3246/2957580101_33c799fc09_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3246/2957580101_d63ef56b15_t.jpg" - size:CGSizeMake(960, 1280)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e.jpg" - smallURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e_t.jpg" - size:CGSizeMake(383, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41.jpg" - smallURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4.jpg" - smallURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4_t.jpg" - size:CGSizeMake(407, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889.jpg" - smallURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889_t.jpg" - size:CGSizeMake(500, 406)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7.jpg" - smallURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7_t.jpg" - size:CGSizeMake(500, 372)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4.jpg" - smallURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - - nil] - - photos2:nil - ] autorelease]; -} - -@end diff --git a/samples/TTCatalog/Classes/PhotoTest2Controller.h b/samples/TTCatalog/Classes/PhotoTest2Controller.h deleted file mode 100644 index a40b22fd11..0000000000 --- a/samples/TTCatalog/Classes/PhotoTest2Controller.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -@interface PhotoTest2Controller : TTThumbsViewController { -} - -@end diff --git a/samples/TTCatalog/Classes/PhotoTest2Controller.m b/samples/TTCatalog/Classes/PhotoTest2Controller.m deleted file mode 100644 index 21d1f27476..0000000000 --- a/samples/TTCatalog/Classes/PhotoTest2Controller.m +++ /dev/null @@ -1,279 +0,0 @@ -#import "PhotoTest2Controller.h" -#import "MockPhotoSource.h" - -@implementation PhotoTest2Controller - -- (void)viewDidLoad { - self.photoSource = [[MockPhotoSource alloc] - initWithType:MockPhotoSourceNormal - //initWithType:MockPhotoSourceDelayed - // initWithType:MockPhotoSourceLoadError - // initWithType:MockPhotoSourceDelayed|MockPhotoSourceLoadError - title:@"Flickr Photos" - photos:[[NSArray alloc] initWithObjects: - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3246/2957580101_33c799fc09_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3246/2957580101_d63ef56b15_t.jpg" - size:CGSizeMake(960, 1280)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg" - size:CGSizeMake(320, 480) - caption:@"These are the wood tiles that we had installed after the accident."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123.jpg?v=0" - smallURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123_t.jpg" - size:CGSizeMake(320, 480) - caption:@"A hike."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e.jpg" - smallURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e_t.jpg" - size:CGSizeMake(383, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41.jpg" - smallURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4.jpg" - smallURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4_t.jpg" - size:CGSizeMake(407, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889.jpg" - smallURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889_t.jpg" - size:CGSizeMake(500, 406)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7.jpg" - smallURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7_t.jpg" - size:CGSizeMake(500, 372)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4.jpg" - smallURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3246/2957580101_33c799fc09_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3246/2957580101_d63ef56b15_t.jpg" - size:CGSizeMake(960, 1280)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg" - size:CGSizeMake(320, 480) - caption:@"These are the wood tiles that we had installed after the accident."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123.jpg?v=0" - smallURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123_t.jpg" - size:CGSizeMake(320, 480) - caption:@"A hike."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e.jpg" - smallURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e_t.jpg" - size:CGSizeMake(383, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41.jpg" - smallURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4.jpg" - smallURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4_t.jpg" - size:CGSizeMake(407, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889.jpg" - smallURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889_t.jpg" - size:CGSizeMake(500, 406)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7.jpg" - smallURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7_t.jpg" - size:CGSizeMake(500, 372)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4.jpg" - smallURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3246/2957580101_33c799fc09_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3246/2957580101_d63ef56b15_t.jpg" - size:CGSizeMake(960, 1280)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg" - size:CGSizeMake(320, 480) - caption:@"These are the wood tiles that we had installed after the accident."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123.jpg?v=0" - smallURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123_t.jpg" - size:CGSizeMake(320, 480) - caption:@"A hike."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e.jpg" - smallURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e_t.jpg" - size:CGSizeMake(383, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41.jpg" - smallURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4.jpg" - smallURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4_t.jpg" - size:CGSizeMake(407, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889.jpg" - smallURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889_t.jpg" - size:CGSizeMake(500, 406)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7.jpg" - smallURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7_t.jpg" - size:CGSizeMake(500, 372)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4.jpg" - smallURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3246/2957580101_33c799fc09_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3246/2957580101_d63ef56b15_t.jpg" - size:CGSizeMake(960, 1280)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg" - size:CGSizeMake(320, 480) - caption:@"These are the wood tiles that we had installed after the accident."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123.jpg?v=0" - smallURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123_t.jpg" - size:CGSizeMake(320, 480) - caption:@"A hike."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e.jpg" - smallURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e_t.jpg" - size:CGSizeMake(383, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41.jpg" - smallURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4.jpg" - smallURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4_t.jpg" - size:CGSizeMake(407, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889.jpg" - smallURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889_t.jpg" - size:CGSizeMake(500, 406)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7.jpg" - smallURL:@"http://farm2.static.flickr.com/1004/3174172875_1e7a34ccb7_t.jpg" - size:CGSizeMake(500, 372)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4.jpg" - smallURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3246/2957580101_33c799fc09_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3246/2957580101_d63ef56b15_t.jpg" - size:CGSizeMake(960, 1280)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg" - smallURL:@"http://farm4.static.flickr.com/3444/3223645618_f5e2fa7fea_t.jpg" - size:CGSizeMake(320, 480) - caption:@"These are the wood tiles that we had installed after the accident."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123.jpg?v=0" - smallURL:@"http://farm2.static.flickr.com/1124/3164979509_bcfdd72123_t.jpg" - size:CGSizeMake(320, 480) - caption:@"A hike."] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3106/3203111597_d849ef615b_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3099/3164979221_6c0e583f7d_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2.jpg?v=0" - smallURL:@"http://farm4.static.flickr.com/3081/3164978791_3c292029f2_t.jpg" - size:CGSizeMake(320, 480)] autorelease], - - [[[MockPhoto alloc] - initWithURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e.jpg" - smallURL:@"http://farm3.static.flickr.com/2358/2179913094_3a1591008e_t.jpg" - size:CGSizeMake(383, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41.jpg" - smallURL:@"http://farm4.static.flickr.com/3162/2677417507_e5d0007e41_t.jpg" - size:CGSizeMake(391, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4.jpg" - smallURL:@"http://farm4.static.flickr.com/3334/3334095096_ffdce92fc4_t.jpg" - size:CGSizeMake(407, 500)] autorelease], - [[[MockPhoto alloc] - initWithURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889.jpg" - smallURL:@"http://farm4.static.flickr.com/3118/3122869991_c15255d889_t.jpg" - size:CGSizeMake(500, 406)] autorelease], - - nil - ] - - photos2:nil -// photos2:[[NSArray alloc] initWithObjects: -// [[[MockPhoto alloc] -// initWithURL:@"http://farm4.static.flickr.com/3280/2949707060_e639b539c5_o.jpg" -// smallURL:@"http://farm4.static.flickr.com/3280/2949707060_8139284ba5_t.jpg" -// size:CGSizeMake(800, 533)] autorelease], -// nil] - ]; -} - -@end diff --git a/samples/TTCatalog/Classes/ScrollViewTestController.h b/samples/TTCatalog/Classes/ScrollViewTestController.h deleted file mode 100644 index ab6f4877e9..0000000000 --- a/samples/TTCatalog/Classes/ScrollViewTestController.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface ScrollViewTestController : TTViewController { - TTScrollView* _scrollView; - TTPageControl* _pageControl; - NSArray* _colors; -} - -@end diff --git a/samples/TTCatalog/Classes/ScrollViewTestController.m b/samples/TTCatalog/Classes/ScrollViewTestController.m deleted file mode 100644 index 6e649c2dc9..0000000000 --- a/samples/TTCatalog/Classes/ScrollViewTestController.m +++ /dev/null @@ -1,116 +0,0 @@ -#import "ScrollViewTestController.h" -#import "MockPhotoSource.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation ScrollViewTestController - -- (void)dealloc { - _scrollView.delegate = nil; - _scrollView.dataSource = nil; - TT_RELEASE_SAFELY(_scrollView); - TT_RELEASE_SAFELY(_pageControl); - TT_RELEASE_SAFELY(_colors); - [super dealloc]; -} - -- (id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - self = [super initWithNibName:nil bundle:nil]; - if ( self ){ - _colors = [[NSArray arrayWithObjects: - [UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:1], - [UIColor blueColor], - [UIColor redColor], - [UIColor yellowColor], - [UIColor orangeColor], - [UIColor cyanColor], - [UIColor purpleColor], - [UIColor brownColor], - [UIColor magentaColor], - [UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:1], - nil - ] retain]; - } - return self; -} - -- (void)loadView { - CGRect appFrame = [UIScreen mainScreen].applicationFrame; - CGRect frame = CGRectMake(0, 0, appFrame.size.width, appFrame.size.height - 44); - self.view = [[[UIView alloc] initWithFrame:frame] autorelease]; - - _pageControl = [[TTPageControl alloc] initWithFrame:CGRectMake(0,0, self.view.width, 20)]; - _pageControl.autoresizingMask = UIViewAutoresizingFlexibleWidth; - _pageControl.backgroundColor = [UIColor grayColor]; - _pageControl.currentPage = 0; - _pageControl.numberOfPages = [_colors count]; - [_pageControl addTarget:self action:@selector(changePage:) forControlEvents:UIControlEventValueChanged]; - [self.view addSubview:_pageControl]; - - _scrollView = [[TTScrollView alloc] initWithFrame:CGRectMake(0,_pageControl.bottom, self.view.bounds.size.width, self.view.bounds.size.height - _pageControl.height - 5.f)]; - _scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth; - _scrollView.dataSource = self; - _scrollView.delegate = self; - _scrollView.backgroundColor = [UIColor whiteColor]; - [self.view addSubview:_scrollView]; - - -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTScrollViewDataSource - -- (NSInteger)numberOfPagesInScrollView:(TTScrollView*)scrollView { - return _colors.count; -} - -- (UIView*)scrollView:(TTScrollView*)scrollView pageAtIndex:(NSInteger)pageIndex { - TTView* pageView = nil; - if (!pageView) { - pageView = [[[TTView alloc] init] autorelease]; - pageView.backgroundColor = [UIColor clearColor]; - pageView.userInteractionEnabled = NO; - //pageView.contentMode = UIViewContentModeLeft; - } - - pageView.style = - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:30] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(10, 10, 10, 10) next: - [TTLinearGradientFillStyle styleWithColor1:[_colors objectAtIndex:pageIndex] - color2:[UIColor whiteColor] next: - [TTSolidBorderStyle styleWithColor:[UIColor blueColor] width:1 next: - nil]]]]; - - return pageView; -} - -- (CGSize)scrollView:(TTScrollView*)scrollView sizeOfPageAtIndex:(NSInteger)pageIndex { - return CGSizeMake(320, 416); -} - -#pragma mark - -#pragma mark TTScrollViewDelegate - -- (void)scrollView:(TTScrollView*)scrollView didMoveToPageAtIndex:(NSInteger)pageIndex { - _pageControl.currentPage = pageIndex; -} - -#pragma mark - -#pragma mark UIViewController overrides -- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { - return YES; -} - -- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; -} - -#pragma mark - -#pragma mark TTPageControl - -- (IBAction)changePage:(id)sender { - int page = _pageControl.currentPage; - [_scrollView setCenterPageIndex:page]; -} - -@end diff --git a/samples/TTCatalog/Classes/SearchTestController.h b/samples/TTCatalog/Classes/SearchTestController.h deleted file mode 100644 index 3b9e8610ff..0000000000 --- a/samples/TTCatalog/Classes/SearchTestController.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -@protocol SearchTestControllerDelegate; -@class MockDataSource; - -@interface SearchTestController : TTTableViewController { - id _delegate; -} - -@property(nonatomic,assign) id delegate; - -@end - -@protocol SearchTestControllerDelegate - -- (void)searchTestController:(SearchTestController*)controller didSelectObject:(id)object; - -@end diff --git a/samples/TTCatalog/Classes/SearchTestController.m b/samples/TTCatalog/Classes/SearchTestController.m deleted file mode 100644 index 32d9b93b15..0000000000 --- a/samples/TTCatalog/Classes/SearchTestController.m +++ /dev/null @@ -1,52 +0,0 @@ - -#import "SearchTestController.h" -#import "MockDataSource.h" - -@implementation SearchTestController - -@synthesize delegate = _delegate; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _delegate = nil; - - self.title = @"Search Test"; - self.dataSource = [[[MockDataSource alloc] init] autorelease]; - } - return self; -} - -- (void)dealloc { - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [super loadView]; - - TTTableViewController* searchController = [[[TTTableViewController alloc] init] autorelease]; - searchController.dataSource = [[[MockSearchDataSource alloc] initWithDuration:1.5] autorelease]; - self.searchViewController = searchController; - self.tableView.tableHeaderView = _searchController.searchBar; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTTableViewController - -- (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - [_delegate searchTestController:self didSelectObject:object]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTSearchTextFieldDelegate - -- (void)textField:(TTSearchTextField*)textField didSelectObject:(id)object { - [_delegate searchTestController:self didSelectObject:object]; -} - -@end diff --git a/samples/TTCatalog/Classes/SplitCatalogController.h b/samples/TTCatalog/Classes/SplitCatalogController.h deleted file mode 100644 index 88ea3dca21..0000000000 --- a/samples/TTCatalog/Classes/SplitCatalogController.h +++ /dev/null @@ -1,5 +0,0 @@ - -@interface SplitCatalogController : TTSplitViewController { -} - -@end diff --git a/samples/TTCatalog/Classes/SplitCatalogController.m b/samples/TTCatalog/Classes/SplitCatalogController.m deleted file mode 100644 index 35c054702f..0000000000 --- a/samples/TTCatalog/Classes/SplitCatalogController.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "SplitCatalogController.h" - -#import "CatalogController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface SplitCatalogController() - -- (void)setupURLRouting; - -@end - - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation SplitCatalogController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - [self setupURLRouting]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - [self.leftNavigator openURLs:@"tt://catalog", nil]; - [self.rightNavigator openURLs:@"http://three20.info/", nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)willOpenUrlPath:(NSURL*)url { - [self.rightNavigator openURLAction:[TTURLAction actionWithURLPath:[url absoluteString]]]; - - [self.popoverSplitController dismissPopoverAnimated:YES]; - - // We need to do this because the right navigator clobbered the right navigation controller - // and our button along with it. - [self updateSplitViewButton]; - - // Don't create a view controller here; we're forwarding the URL routing. - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)routeLeftNavigator { - TTURLMap* map = self.leftNavigator.URLMap; - - // Forward all unhandled URL actions to the right navigator. - [map from: @"*" - toObject: self - selector: @selector(willOpenUrlPath:)]; - - [map from: @"tt://catalog" - toViewController: [CatalogController class]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)routeRightNavigator { - TTURLMap* map = self.rightNavigator.URLMap; - - - [map from: @"*" - toViewController: [TTWebController class]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setupURLRouting { - [self routeLeftNavigator]; - [self routeRightNavigator]; -} - - -@end - diff --git a/samples/TTCatalog/Classes/StyleTestController.h b/samples/TTCatalog/Classes/StyleTestController.h deleted file mode 100644 index e86e970d8f..0000000000 --- a/samples/TTCatalog/Classes/StyleTestController.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface StyleTestController : TTViewController -@end diff --git a/samples/TTCatalog/Classes/StyleTestController.m b/samples/TTCatalog/Classes/StyleTestController.m deleted file mode 100644 index 7b7a654cb9..0000000000 --- a/samples/TTCatalog/Classes/StyleTestController.m +++ /dev/null @@ -1,150 +0,0 @@ -#import "StyleTestController.h" -#import -#import - -@implementation StyleTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - UIScrollView* scrollView = [[[UIScrollView alloc] initWithFrame:TTNavigationFrame()] autorelease]; - scrollView.autoresizesSubviews = YES; - scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - scrollView.backgroundColor = RGBCOLOR(216, 221, 231); - self.view = scrollView; - - UIColor* black = RGBCOLOR(158, 163, 172); - UIColor* blue = RGBCOLOR(191, 197, 208); - UIColor* darkBlue = RGBCOLOR(109, 132, 162); - - NSArray* styles = [NSArray arrayWithObjects: - // Rectangle - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTSolidBorderStyle styleWithColor:black width:1 next:nil]], - - // Rounded rectangle - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:10] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTSolidBorderStyle styleWithColor:black width:1 next:nil]]], - - // Gradient border - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:10] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTLinearGradientBorderStyle styleWithColor1:RGBCOLOR(0, 0, 0) - color2:RGBCOLOR(216, 221, 231) width:2 next:nil]]], - - // Rounded left arrow - [TTShapeStyle styleWithShape:[TTRoundedLeftArrowShape shapeWithRadius:5] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTSolidBorderStyle styleWithColor:black width:1 next:nil]]], - - // Partially rounded rectangle - [TTShapeStyle styleWithShape: - [TTRoundedRectangleShape shapeWithTopLeft:0 topRight:0 bottomRight:10 bottomLeft:10] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTSolidBorderStyle styleWithColor:black width:1 next:nil]]], - - // SpeechBubble - [TTShapeStyle styleWithShape:[TTSpeechBubbleShape shapeWithRadius:5 pointLocation:60 - pointAngle:90 - pointSize:CGSizeMake(20,10)] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTSolidBorderStyle styleWithColor:black width:1 next:nil]]], - - // SpeechBubble - [TTShapeStyle styleWithShape:[TTSpeechBubbleShape shapeWithRadius:5 pointLocation:290 - pointAngle:270 - pointSize:CGSizeMake(20,10)] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTSolidBorderStyle styleWithColor:black width:1 next:nil]]], - - // Drop shadow - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:10] next: - [TTShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.5) blur:5 offset:CGSizeMake(2, 2) next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0.25, 0.25, 0.25, 0.25) next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-0.25, -0.25, -0.25, -0.25) next: - [TTSolidBorderStyle styleWithColor:black width:1 next:nil]]]]]], - - // Inner shadow - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:10] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next: - [TTInnerShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.5) blur:6 offset:CGSizeMake(1, 1) next: - [TTSolidBorderStyle styleWithColor:black width:1 next:nil]]]], - - // Chiseled button - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:10] next: - [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0.9) blur:1 offset:CGSizeMake(0, 1) next: - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(255, 255, 255) - color2:RGBCOLOR(216, 221, 231) next: - [TTSolidBorderStyle styleWithColor:blue width:1 next:nil]]]], - - // Embossed button - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:10] next: - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(255, 255, 255) - color2:RGBCOLOR(216, 221, 231) next: - [TTFourBorderStyle styleWithTop:blue right:black bottom:black left:blue width:1 next:nil]]], - - // Toolbar button - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:4.5] next: - [TTShadowStyle styleWithColor:RGBCOLOR(255,255,255) blur:1 offset:CGSizeMake(0, 1) next: - [TTReflectiveFillStyle styleWithColor:darkBlue next: - [TTBevelBorderStyle styleWithHighlight:[darkBlue shadow] - shadow:[darkBlue multiplyHue:1 saturation:0.5 value:0.5] - width:1 lightSource:270 next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0, -1, 0, -1) next: - [TTBevelBorderStyle styleWithHighlight:nil shadow:RGBACOLOR(0,0,0,0.15) - width:1 lightSource:270 next:nil]]]]]], - - // Back button - [TTShapeStyle styleWithShape:[TTRoundedLeftArrowShape shapeWithRadius:4.5] next: - [TTShadowStyle styleWithColor:RGBCOLOR(255,255,255) blur:1 offset:CGSizeMake(0, 1) next: - [TTReflectiveFillStyle styleWithColor:darkBlue next: - [TTBevelBorderStyle styleWithHighlight:[darkBlue shadow] - shadow:[darkBlue multiplyHue:1 saturation:0.5 value:0.5] - width:1 lightSource:270 next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0, -1, 0, -1) next: - [TTBevelBorderStyle styleWithHighlight:nil shadow:RGBACOLOR(0,0,0,0.15) - width:1 lightSource:270 next:nil]]]]]], - - // Badge - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(1.5, 1.5, 1.5, 1.5) next: - [TTShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.8) blur:3 offset:CGSizeMake(0, 5) next: - [TTReflectiveFillStyle styleWithColor:[UIColor redColor] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-1.5, -1.5, -1.5, -1.5) next: - [TTSolidBorderStyle styleWithColor:[UIColor whiteColor] width:3 next:nil]]]]]], - - // Mask - [TTMaskStyle styleWithMask:TTIMAGE(@"bundle://mask.png") next: - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(0, 180, 231) - color2:RGBCOLOR(0, 0, 255) next:nil]], - - nil]; - - CGFloat padding = 10; - CGFloat viewWidth = scrollView.width/2 - padding*2; - CGFloat viewHeight = TT_ROW_HEIGHT; - - CGFloat x = padding; - CGFloat y = padding; - for (TTStyle* style in styles) { - if (x + viewWidth >= scrollView.width) { - x = padding; - y += viewHeight + padding; - } - - CGRect frame = CGRectMake(x, y, viewWidth, viewHeight); - TTView* view = [[[TTView alloc] initWithFrame:frame] autorelease]; - view.backgroundColor = scrollView.backgroundColor; - view.style = style; - [scrollView addSubview:view]; - - x += frame.size.width + padding; - } - - scrollView.contentSize = CGSizeMake(scrollView.width, y + viewHeight + padding); -} - -@end diff --git a/samples/TTCatalog/Classes/StyledTextTableTestController.h b/samples/TTCatalog/Classes/StyledTextTableTestController.h deleted file mode 100644 index 7f51fc8257..0000000000 --- a/samples/TTCatalog/Classes/StyledTextTableTestController.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface StyledTextTableTestController : TTTableViewController -@end diff --git a/samples/TTCatalog/Classes/StyledTextTableTestController.m b/samples/TTCatalog/Classes/StyledTextTableTestController.m deleted file mode 100644 index e3d291b57c..0000000000 --- a/samples/TTCatalog/Classes/StyledTextTableTestController.m +++ /dev/null @@ -1,52 +0,0 @@ -#import "StyledTextTableTestController.h" - -@implementation StyledTextTableTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.autoresizesForKeyboard = YES; - self.variableHeightRows = YES; - - // Uncomment this to see how the table cells look against a custom background color - //self.tableView.backgroundColor = [UIColor yellowColor]; - - NSArray* strings = [NSArray arrayWithObjects: - [TTStyledText textFromXHTML:@"This is a whole bunch of text made from \ -characters and followed by this URL http://bit.ly/1234"], - [TTStyledText textFromXHTML:@"Here we have a URL http://www.h0tlinkz.com \ -followed by another http://www.internets.com"], - [TTStyledText textFromXHTML:@"http://www.cnn.com is a URL and the words you \ -are now reading are the text that follows"], - [TTStyledText textFromXHTML:@"Here is text that has absolutely no styles. \ -Move along now. Nothing to see here. Goodbye now."], - // @"Let's test out some line breaks.\n\nOh yeah.", - // @"This is a message with a long URL in it http://www.foo.com/abra/cadabra/abrabra/dabarababa", - nil]; - - TTListDataSource* dataSource = [[[TTListDataSource alloc] init] autorelease]; - for (int i = 0; i < 50; ++i) { - TTStyledText* text = [strings objectAtIndex:i % strings.count]; - - [dataSource.items addObject:[TTTableStyledTextItem itemWithText:text URL:nil]]; - } - self.dataSource = dataSource; - } - return self; -} - -- (void)dealloc { - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTTableViewController - -- (void)loadView { - [super loadView]; - self.tableView.allowsSelection = NO; -} - -@end diff --git a/samples/TTCatalog/Classes/StyledTextTestController.h b/samples/TTCatalog/Classes/StyledTextTestController.h deleted file mode 100644 index ec940ec393..0000000000 --- a/samples/TTCatalog/Classes/StyledTextTestController.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface StyledTextTestController : TTViewController -@end diff --git a/samples/TTCatalog/Classes/StyledTextTestController.m b/samples/TTCatalog/Classes/StyledTextTestController.m deleted file mode 100644 index 88f9a61fbc..0000000000 --- a/samples/TTCatalog/Classes/StyledTextTestController.m +++ /dev/null @@ -1,121 +0,0 @@ -#import "StyledTextTestController.h" - -@interface TextTestStyleSheet : TTDefaultStyleSheet -@end - -@implementation TextTestStyleSheet - -- (TTStyle*)blueText { - return [TTTextStyle styleWithColor:[UIColor blueColor] next:nil]; -} - -- (TTStyle*)largeText { - return [TTTextStyle styleWithFont:[UIFont systemFontOfSize:32] next:nil]; -} - -- (TTStyle*)smallText { - return [TTTextStyle styleWithFont:[UIFont systemFontOfSize:12] next:nil]; -} - -- (TTStyle*)floated { - return [TTBoxStyle styleWithMargin:UIEdgeInsetsMake(0, 0, 5, 5) - padding:UIEdgeInsetsMake(0, 0, 0, 0) - minSize:CGSizeZero position:TTPositionFloatLeft next:nil]; -} - -- (TTStyle*)blueBox { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:6] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0, -5, -4, -6) next: - [TTShadowStyle styleWithColor:[UIColor grayColor] blur:2 offset:CGSizeMake(1,1) next: - [TTSolidFillStyle styleWithColor:[UIColor cyanColor] next: - [TTSolidBorderStyle styleWithColor:[UIColor grayColor] width:1 next:nil]]]]]; -} - -- (TTStyle*)inlineBox { - return - [TTSolidFillStyle styleWithColor:[UIColor blueColor] next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(5,13,5,13) next: - [TTSolidBorderStyle styleWithColor:[UIColor blackColor] width:1 next:nil]]]; -} - -- (TTStyle*)inlineBox2 { - return - [TTSolidFillStyle styleWithColor:[UIColor cyanColor] next: - [TTBoxStyle styleWithMargin:UIEdgeInsetsMake(5,50,0,50) - padding:UIEdgeInsetsMake(0,13,0,13) next:nil]]; -} - -@end - -@implementation StyledTextTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (id) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - self = [super initWithNibName:nil bundle:nil]; - if (self) { - [TTStyleSheet setGlobalStyleSheet:[[[TextTestStyleSheet alloc] init] autorelease]]; - } - return self; -} - -- (void)dealloc { - [TTStyleSheet setGlobalStyleSheet:nil]; - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [super loadView]; - -// NSString* kText = @"\ -//Thisisareallylongwordthatshouldwrapisareallylongwordthatshouldwrapisareallylongwordthatshould\ -//wrapisareallylongwordthatshouldwrapisareallylongwordthatshouldwrap"; - NSString* kText = @"\ -This is a test of styled labels. Styled labels support \ -bold text, italic text, colored text, \ -font sizes, \ -spans with backgrounds, inline images \ -, and hyperlinks you can \ -actually touch. URLs are automatically converted into links, like this: http://www.foo.com\ -
You can enclose blocks within an HTML div.
\ -Both line break characters\n\nand HTML line breaks
are respected."; -// NSString* kText = @"\ -//font sizesa"; -// NSString* kText = @"bahhyper links"; -// NSString* kText = @"blah blah blah black sheep blah \ -//hyperlinks blah fun"; -// NSString* kText = @"\ -//
You can enclose blocks within an HTML div.
"; -// NSString* kText = @"\ -//You can enclose blocks within an HTML div.x"; -// NSString* kText = @"bold text font http://foo.com sizes"; -// NSString* kText = @" This is some text"; -// NSString* kText = @"\ -//This \ -//is a test of floats. This is still a test of floats. This text will wrap itself around \ -//the image that is being floated on the left. I repeat, this is a test of floats."; -// NSString* kText = @"\ -//This \ -//is a test of floats. This is still a test of floats. This text will wrap itself around \ -//the image that is being floated on the left. I repeat, this is a test of floats."; -// NSString* kText = @"\ -//Bob Bobbers at 4:30 pm
Testing"; - - // XXXjoe This illustrates the need to calculate a line's descender height as well @1079 - // NSString* kText = @"bah humbug"; - - TTStyledTextLabel* label1 = [[[TTStyledTextLabel alloc] initWithFrame:self.view.bounds] autorelease]; - label1.font = [UIFont systemFontOfSize:17]; - label1.text = [TTStyledText textFromXHTML:kText lineBreaks:YES URLs:YES]; - label1.contentInset = UIEdgeInsetsMake(10, 10, 10, 10); - //label1.backgroundColor = [UIColor grayColor]; - [label1 sizeToFit]; - [self.view addSubview:label1]; -} - -@end diff --git a/samples/TTCatalog/Classes/TabBarTestController.h b/samples/TTCatalog/Classes/TabBarTestController.h deleted file mode 100644 index 76d3a58a5e..0000000000 --- a/samples/TTCatalog/Classes/TabBarTestController.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface TabBarTestController : TTViewController { - TTTabBar* _tabBar1; - TTTabBar* _tabBar2; - TTTabBar* _tabBar3; -} - -@end diff --git a/samples/TTCatalog/Classes/TabBarTestController.m b/samples/TTCatalog/Classes/TabBarTestController.m deleted file mode 100644 index ccaf0aa835..0000000000 --- a/samples/TTCatalog/Classes/TabBarTestController.m +++ /dev/null @@ -1,66 +0,0 @@ -#import "TabBarTestController.h" -#import - -@implementation TabBarTestController - -- (void)dealloc { - TT_RELEASE_SAFELY(_tabBar1); - TT_RELEASE_SAFELY(_tabBar2); - TT_RELEASE_SAFELY(_tabBar3); - [super dealloc]; -} - -- (void)loadView { - CGRect applicationFrame = [UIScreen mainScreen].applicationFrame; - - self.view = [[[UIView alloc] initWithFrame:applicationFrame] autorelease]; - self.view.backgroundColor = TTSTYLEVAR(tabTintColor); - - _tabBar1 = [[TTTabStrip alloc] initWithFrame:CGRectMake(0, 0, applicationFrame.size.width, 41)]; - _tabBar1.tabItems = [NSArray arrayWithObjects: - [[[TTTabItem alloc] initWithTitle:@"Item 1"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 2"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 3"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 4"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 5"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 6"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 7"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 8"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 9"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Item 10"] autorelease], - nil]; - [self.view addSubview:_tabBar1]; - - _tabBar2 = [[TTTabBar alloc] initWithFrame:CGRectMake(0, _tabBar1.bottom, applicationFrame.size.width, 40)]; - _tabBar2.tabItems = [NSArray arrayWithObjects: - [[[TTTabItem alloc] initWithTitle:@"Banana"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Cherry"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Orange"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Grape"] autorelease], - nil]; - _tabBar2.selectedTabIndex = 2; - [self.view addSubview:_tabBar2]; - - TTTabItem* item = [_tabBar2.tabItems objectAtIndex:1]; - item.badgeNumber = 2; - - _tabBar3 = [[TTTabGrid alloc] initWithFrame:CGRectMake(10, _tabBar2.bottom+10, applicationFrame.size.width - 20, 0)]; - _tabBar3.backgroundColor = [UIColor clearColor]; - _tabBar3.tabItems = [NSArray arrayWithObjects: - [[[TTTabItem alloc] initWithTitle:@"Banana"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Cherry"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Orange"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Pineapple"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Grape"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Mango"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Blueberry"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Apple"] autorelease], - [[[TTTabItem alloc] initWithTitle:@"Peach"] autorelease], - nil]; - [_tabBar3 sizeToFit]; - [self.view addSubview:_tabBar3]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@end diff --git a/samples/TTCatalog/Classes/TableControlsTestController.h b/samples/TTCatalog/Classes/TableControlsTestController.h deleted file mode 100644 index 4cd51de9b7..0000000000 --- a/samples/TTCatalog/Classes/TableControlsTestController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface TableControlsTestController : TTTableViewController - -@end diff --git a/samples/TTCatalog/Classes/TableControlsTestController.m b/samples/TTCatalog/Classes/TableControlsTestController.m deleted file mode 100644 index 19b7380fc3..0000000000 --- a/samples/TTCatalog/Classes/TableControlsTestController.m +++ /dev/null @@ -1,55 +0,0 @@ -#import "TableControlsTestController.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation TableControlsTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.tableViewStyle = UITableViewStyleGrouped; - self.autoresizesForKeyboard = YES; - self.variableHeightRows = YES; - - UITextField* textField = [[[UITextField alloc] init] autorelease]; - textField.placeholder = @"UITextField"; - textField.font = TTSTYLEVAR(font); - - UITextField* textField2 = [[[UITextField alloc] init] autorelease]; - textField2.font = TTSTYLEVAR(font); - textField2.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; - TTTableControlItem* textFieldItem = [TTTableControlItem itemWithCaption:@"TTTableControlItem" - control:textField2]; - - UITextView* textView = [[[UITextView alloc] init] autorelease]; - textView.text = @"UITextView"; - textView.font = TTSTYLEVAR(font); - - TTTextEditor* editor = [[[TTTextEditor alloc] init] autorelease]; - editor.font = TTSTYLEVAR(font); - editor.backgroundColor = TTSTYLEVAR(backgroundColor); - editor.autoresizesToText = NO; - editor.minNumberOfLines = 3; - editor.placeholder = @"TTTextEditor"; - - UISwitch* switchy = [[[UISwitch alloc] init] autorelease]; - TTTableControlItem* switchItem = [TTTableControlItem itemWithCaption:@"UISwitch" control:switchy]; - - UISlider* slider = [[[UISlider alloc] init] autorelease]; - TTTableControlItem* sliderItem = [TTTableControlItem itemWithCaption:@"UISlider" control:slider]; - - self.dataSource = [TTListDataSource dataSourceWithObjects: - textField, - editor, - textView, - textFieldItem, - switchItem, - sliderItem, - nil]; - } - return self; -} - -@end diff --git a/samples/TTCatalog/Classes/TableDragRefreshController.h b/samples/TTCatalog/Classes/TableDragRefreshController.h deleted file mode 100644 index 6dca7a9084..0000000000 --- a/samples/TTCatalog/Classes/TableDragRefreshController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface TableDragRefreshController : TTTableViewController - -@end diff --git a/samples/TTCatalog/Classes/TableDragRefreshController.m b/samples/TTCatalog/Classes/TableDragRefreshController.m deleted file mode 100644 index 0f70f09bab..0000000000 --- a/samples/TTCatalog/Classes/TableDragRefreshController.m +++ /dev/null @@ -1,39 +0,0 @@ - -#import "TableDragRefreshController.h" -#import "MockDataSource.h" - -@implementation TableDragRefreshController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - } - return self; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [super loadView]; -} - -- (void) createModel { - MockDataSource *ds = [[MockDataSource alloc] init]; - ds.addressBook.fakeLoadingDuration = 1.0; - self.dataSource = ds; - [ds release]; -} - -- (id) createDelegate { - - TTTableViewDragRefreshDelegate *delegate = [[TTTableViewDragRefreshDelegate alloc] initWithController:self]; - - return [delegate autorelease]; -} - -@end - diff --git a/samples/TTCatalog/Classes/TableImageTestController.h b/samples/TTCatalog/Classes/TableImageTestController.h deleted file mode 100644 index 3671a4b466..0000000000 --- a/samples/TTCatalog/Classes/TableImageTestController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface TableImageTestController : TTTableViewController - -@end diff --git a/samples/TTCatalog/Classes/TableImageTestController.m b/samples/TTCatalog/Classes/TableImageTestController.m deleted file mode 100644 index 357a79ffbd..0000000000 --- a/samples/TTCatalog/Classes/TableImageTestController.m +++ /dev/null @@ -1,61 +0,0 @@ - -#import "TableImageTestController.h" - -@implementation TableImageTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (TTTableImageItem*)itemForURL:(NSString*)URL { - return [TTTableSubtitleItem itemWithText:@"Table Row" subtitle:nil imageURL:URL - defaultImage:TTIMAGE(@"bundle://defaultMusic.png") - URL:nil accessoryURL:nil]; -} - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.dataSource = [TTListDataSource dataSourceWithObjects: - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2266/2178246585_11d761324b_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2349/2179041484_f741b2bbe5_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2114/2178249889_bd17a48000_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2389/2179043790_317c14339f_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2148/2179047350_2ea15c0c10_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2055/2178254411_b945d90b0c_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2266/2178246585_11d761324b_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2349/2179041484_f741b2bbe5_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2114/2178249889_bd17a48000_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2389/2179043790_317c14339f_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2148/2179047350_2ea15c0c10_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2055/2178254411_b945d90b0c_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2266/2178246585_11d761324b_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2349/2179041484_f741b2bbe5_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2114/2178249889_bd17a48000_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2389/2179043790_317c14339f_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2148/2179047350_2ea15c0c10_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2300/2179038972_65f1e5f8c4_s.jpg"], - [self itemForURL:@"http://farm3.static.flickr.com/2055/2178254411_b945d90b0c_s.jpg"], - nil]; - } - return self; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [super loadView]; - - self.tableView.rowHeight = 90; -} - - -@end - diff --git a/samples/TTCatalog/Classes/TableItemTestController.h b/samples/TTCatalog/Classes/TableItemTestController.h deleted file mode 100644 index 5ec4ade855..0000000000 --- a/samples/TTCatalog/Classes/TableItemTestController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import - -@interface TableItemTestController : TTTableViewController - -@end diff --git a/samples/TTCatalog/Classes/TableItemTestController.m b/samples/TTCatalog/Classes/TableItemTestController.m deleted file mode 100644 index ab46dbd269..0000000000 --- a/samples/TTCatalog/Classes/TableItemTestController.m +++ /dev/null @@ -1,87 +0,0 @@ -#import "TableItemTestController.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -static NSString* kLoremIpsum = @"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do\ - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud\ - exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."; -//Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla\ - pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt\ - mollit anim id est laborum. - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation TableItemTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.title = @"Table Items"; - self.variableHeightRows = YES; - - // Uncomment this to see how the table looks with the grouped style - //self.tableViewStyle = UITableViewStyleGrouped; - - // Uncomment this to see how the table cells look against a custom background color - //self.tableView.backgroundColor = [UIColor yellowColor]; - - NSString* localImage = @"bundle://tableIcon.png"; - NSString* remoteImage = @"http://profile.ak.fbcdn.net/v223/35/117/q223792_6978.jpg"; - UIImage* defaultPerson = TTIMAGE(@"bundle://defaultPerson.png"); - - // This demonstrates how to create a table with standard table "fields". Many of these - // fields with URLs that will be visited when the row is selected - self.dataSource = [TTSectionedDataSource dataSourceWithObjects: - @"Links and Buttons", - [TTTableTextItem itemWithText:@"TTTableTextItem" URL:@"tt://tableItemTest" - accessoryURL:@"http://www.google.com"], - [TTTableLink itemWithText:@"TTTableLink" URL:@"tt://tableItemTest"], - [TTTableButton itemWithText:@"TTTableButton"], - [TTTableCaptionItem itemWithText:@"TTTableCaptionItem" caption:@"caption" - URL:@"tt://tableItemTest"], - [TTTableSubtitleItem itemWithText:@"TTTableSubtitleItem" subtitle:kLoremIpsum - URL:@"tt://tableItemTest"], - [TTTableMessageItem itemWithTitle:@"Bob Jones" caption:@"TTTableMessageItem" - text:kLoremIpsum timestamp:[NSDate date] URL:@"tt://tableItemTest"], - [TTTableMoreButton itemWithText:@"TTTableMoreButton"], - - @"Images", - [TTTableImageItem itemWithText:@"TTTableImageItem" imageURL:localImage - URL:@"tt://tableItemTest"], - [TTTableRightImageItem itemWithText:@"TTTableRightImageItem" imageURL:localImage - defaultImage:nil imageStyle:TTSTYLE(rounded) - URL:@"tt://tableItemTest"], - [TTTableSubtitleItem itemWithText:@"TTTableSubtitleItem" subtitle:kLoremIpsum - imageURL:remoteImage defaultImage:defaultPerson - URL:@"tt://tableItemTest" accessoryURL:nil], - [TTTableMessageItem itemWithTitle:@"Bob Jones" caption:@"TTTableMessageItem" - text:kLoremIpsum timestamp:[NSDate date] - imageURL:remoteImage URL:@"tt://tableItemTest"], - - @"Static Text", - [TTTableTextItem itemWithText:@"TTTableTextItem"], - [TTTableCaptionItem itemWithText:@"TTTableCaptionItem which wraps to several lines" - caption:@"Text"], - [TTTableSubtextItem itemWithText:@"TTTableSubtextItem" - caption:kLoremIpsum], - [TTTableLongTextItem itemWithText:[@"TTTableLongTextItem " - stringByAppendingString:kLoremIpsum]], - [TTTableGrayTextItem itemWithText:[@"TTTableGrayTextItem " - stringByAppendingString:kLoremIpsum]], - [TTTableSummaryItem itemWithText:@"TTTableSummaryItem"], - - @"", - [TTTableActivityItem itemWithText:@"TTTableActivityItem"], - - nil]; - } - return self; -} - -- (void)dealloc { - [super dealloc]; -} - -@end diff --git a/samples/TTCatalog/Classes/TableTestController.h b/samples/TTCatalog/Classes/TableTestController.h deleted file mode 100644 index 634d5acb60..0000000000 --- a/samples/TTCatalog/Classes/TableTestController.h +++ /dev/null @@ -1,4 +0,0 @@ -#import - -@interface TableTestController : TTTableViewController -@end diff --git a/samples/TTCatalog/Classes/TableTestController.m b/samples/TTCatalog/Classes/TableTestController.m deleted file mode 100644 index 0d3f8e0cdb..0000000000 --- a/samples/TTCatalog/Classes/TableTestController.m +++ /dev/null @@ -1,89 +0,0 @@ - -#import "TableTestController.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface TableTestDataSource : TTListDataSource -@end - -@implementation TableTestDataSource - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTTableViewDataSource - -- (UIImage*)imageForEmpty { - return TTIMAGE(@"bundle://Three20.bundle/images/empty.png"); -} - -- (NSString*)titleForEmpty { - return NSLocalizedString(@"No Friends", @""); -} - -- (NSString*)subtitleForEmpty { - return NSLocalizedString(@"Try getting some friends.", @""); -} - -- (UIImage*)imageForError:(NSError*)error { - return TTIMAGE(@"bundle://Three20.bundle/images/error.png"); -} - -- (NSString*)subtitleForError:(NSError*)error { - return NSLocalizedString(@"There was an error loading your friends.", @""); -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@implementation TableTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (void)cycleModelState { -// if (self.modelState == TTModelStateNone) { -// self.modelState = TTModelStateLoading; -// } else if (self.modelState == TTModelStateLoading) { -// self.modelState = TTModelStateLoaded; -// } else if (self.modelState == TTModelStateLoaded) { -// self.modelState = TTModelStateLoaded|TTModelStateReloading; -// } else if (self.modelState == TTModelStateLoaded|TTModelStateReloading) { -// self.modelState = TTModelStateLoadedError; -// } else if (self.modelState == TTModelStateLoadedError) { -// self.modelState = TTModelStateNone; -// } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [super loadView]; - - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] - initWithTitle:@"Next" style:UIBarButtonItemStyleBordered target:self - action:@selector(cycleModelState)] autorelease]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTModelViewController - -- (void)createModel { - self.dataSource = [[[TableTestDataSource alloc] init] autorelease]; -} - -- (void)modelDidChangeState { -// if (self.modelState == TTModelStateNone) { -// self.title = @"None"; -// } else if (self.modelState == TTModelStateLoading) { -// self.title = @"Loading"; -// } else if (self.modelState == TTModelStateLoaded) { -// self.title = @"Loaded"; -// } else if (self.modelState == TTModelStateLoaded|TTModelStateReloading) { -// self.title = @"Reloading"; -// } else if (self.modelState == TTModelStateLoadedError) { -// self.title = @"LoadedError"; -// } -} - -@end diff --git a/samples/TTCatalog/Classes/TableWithBannerController.h b/samples/TTCatalog/Classes/TableWithBannerController.h deleted file mode 100644 index 2f9f640697..0000000000 --- a/samples/TTCatalog/Classes/TableWithBannerController.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TableWithBannerController : TTTableViewController { - -} - -@end diff --git a/samples/TTCatalog/Classes/TableWithBannerController.m b/samples/TTCatalog/Classes/TableWithBannerController.m deleted file mode 100644 index 192056f6c5..0000000000 --- a/samples/TTCatalog/Classes/TableWithBannerController.m +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TableWithBannerController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TableWithBannerController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - } - return self; -} - -- (void) createModel { - //add enough items to see changes for content and scrollindicator insets - self.dataSource = - [TTListDataSource dataSourceWithObjects: - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - nil]; -} - -- (void) viewDidLoad { - [super viewDidLoad]; - - UIBarButtonItem *bannerItem = [[UIBarButtonItem alloc] initWithTitle:@"Toggle Banner" style:UIBarButtonItemStyleBordered target:self action:@selector(toggleBanner)]; - self.navigationItem.rightBarButtonItem = bannerItem; - [bannerItem release]; -} - -- (void) toggleBanner { - if(self.tableBannerView) { - [self setTableBannerView:nil animated:YES]; - } else { - //bannerview is adjusted by the TTTableView. it takes the full width - //and gets its height from TTStyleSheet - TTImageView *imageView = [[TTImageView alloc] initWithFrame:CGRectZero]; - [self setTableBannerView:imageView animated:YES]; - [imageView release]; - } -} -@end - diff --git a/samples/TTCatalog/Classes/TableWithShadowController.h b/samples/TTCatalog/Classes/TableWithShadowController.h deleted file mode 100644 index ae3f1efccd..0000000000 --- a/samples/TTCatalog/Classes/TableWithShadowController.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TableWithShadowController : TTTableViewController { - -} - -@end diff --git a/samples/TTCatalog/Classes/TableWithShadowController.m b/samples/TTCatalog/Classes/TableWithShadowController.m deleted file mode 100644 index 5e7a6922ba..0000000000 --- a/samples/TTCatalog/Classes/TableWithShadowController.m +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TableWithShadowController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TableWithShadowController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.showTableShadows = YES; - - self.dataSource = - [TTListDataSource dataSourceWithObjects: - [TTTableTextItem itemWithText:@"Drag down to see gutter shadow"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Drag up to see gutter shadow"], - [TTTableTextItem itemWithText:@"Table Item"], - [TTTableTextItem itemWithText:@"Table Item"], - nil]; - } - - return self; -} - - -@end - diff --git a/samples/TTCatalog/Classes/YouTubeTestController.h b/samples/TTCatalog/Classes/YouTubeTestController.h deleted file mode 100644 index 96323a5093..0000000000 --- a/samples/TTCatalog/Classes/YouTubeTestController.h +++ /dev/null @@ -1,7 +0,0 @@ -#import - -@interface YouTubeTestController : TTViewController { - TTYouTubeView* youTubeView; -} - -@end diff --git a/samples/TTCatalog/Classes/YouTubeTestController.m b/samples/TTCatalog/Classes/YouTubeTestController.m deleted file mode 100644 index 2a8a6ad17a..0000000000 --- a/samples/TTCatalog/Classes/YouTubeTestController.m +++ /dev/null @@ -1,42 +0,0 @@ -#import "YouTubeTestController.h" -#import - -@implementation YouTubeTestController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - youTubeView = nil; - } - return self; -} - -- (void)dealloc { - TT_RELEASE_SAFELY(youTubeView); - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [super loadView]; - self.view.backgroundColor = [UIColor redColor]; - - youTubeView = [[TTYouTubeView alloc] initWithURLPath:@"http://www.youtube.com/watch?v=g8thp78oXsg"]; - youTubeView.center = CGPointMake(self.view.width/2, 150); - [self.view addSubview:youTubeView]; - - UILabel* label = [[[UILabel alloc] init] autorelease]; - label.text = @"TTYouTubeView does not work in the iPhone Simulator"; - label.frame = CGRectMake(10, 10, 300, 30); - label.backgroundColor = [UIColor redColor]; - label.textColor = [UIColor whiteColor]; - label.font = [UIFont boldSystemFontOfSize:11]; - label.textAlignment = UITextAlignmentCenter; - [self.view addSubview:label]; -} - -@end diff --git a/samples/TTCatalog/Configurations/App.xcconfig b/samples/TTCatalog/Configurations/App.xcconfig deleted file mode 100644 index 50efa07749..0000000000 --- a/samples/TTCatalog/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTCatalog -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/TTCatalog/Configurations/Project.xcconfig b/samples/TTCatalog/Configurations/Project.xcconfig deleted file mode 100644 index 0f02ea7f79..0000000000 --- a/samples/TTCatalog/Configurations/Project.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" diff --git a/samples/TTCatalog/Configurations/RelPath.xcconfig b/samples/TTCatalog/Configurations/RelPath.xcconfig deleted file mode 100644 index e7425443d8..0000000000 --- a/samples/TTCatalog/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../.. diff --git a/samples/TTCatalog/Configurations/UnitTests.xcconfig b/samples/TTCatalog/Configurations/UnitTests.xcconfig deleted file mode 100644 index 2095a22ad9..0000000000 --- a/samples/TTCatalog/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -PRODUCT_NAME = TTCatalogUnitTests -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/TTCatalog/Headers/TTCatalog_Prefix.pch b/samples/TTCatalog/Headers/TTCatalog_Prefix.pch deleted file mode 100644 index d0b56ae5ca..0000000000 --- a/samples/TTCatalog/Headers/TTCatalog_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'TTCatalog' target in the 'TTCatalog' project -// - -#ifdef __OBJC__ - #import - #import - #import -#endif diff --git a/samples/TTCatalog/TTCatalog-Info.plist b/samples/TTCatalog/TTCatalog-Info.plist deleted file mode 100644 index adcab91ebf..0000000000 --- a/samples/TTCatalog/TTCatalog-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/samples/TTCatalog/TTCatalog.xcodeproj/project.pbxproj b/samples/TTCatalog/TTCatalog.xcodeproj/project.pbxproj deleted file mode 100755 index b5f7dae69b..0000000000 --- a/samples/TTCatalog/TTCatalog.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1147 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; - 28C286E10D94DF7D0034E888 /* CatalogController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* CatalogController.m */; }; - 666E183012944D23001C1D97 /* SplitCatalogController.m in Sources */ = {isa = PBXBuildFile; fileRef = 666E182F12944D23001C1D97 /* SplitCatalogController.m */; }; - 6675F5F412945622008DE0A6 /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 6675F5F012945622008DE0A6 /* Default-Landscape.png */; }; - 6675F5F512945622008DE0A6 /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = 6675F5F112945622008DE0A6 /* Default-Portrait.png */; }; - 6675F5F612945622008DE0A6 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6675F5F212945622008DE0A6 /* Default@2x.png */; }; - 6675F5F712945622008DE0A6 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6675F5F312945622008DE0A6 /* Icon@2x.png */; }; - 6E002567116A6D1A00D1F0CB /* TableWithShadowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E002566116A6D1A00D1F0CB /* TableWithShadowController.m */; }; - 6E3794F511B9B6DB0011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3794D411B9B6D70011C497 /* libThree20Core.a */; }; - 6E3794F611B9B6DC0011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3794DA11B9B6D70011C497 /* libThree20Network.a */; }; - 6E3794F711B9B6DC0011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3794E011B9B6D70011C497 /* libThree20Style.a */; }; - 6E3794F811B9B6DD0011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3794F211B9B6D70011C497 /* libThree20UI.a */; }; - 6E3794F911B9B6DD0011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3794EC11B9B6D70011C497 /* libThree20UINavigator.a */; }; - 6E3794FA11B9B6DE0011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3794E611B9B6D70011C497 /* libThree20UICommon.a */; }; - 6E7F97A9118E37C700443B46 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7F977E118E37BB00443B46 /* libThree20.a */; }; - 6E94C6AD116D98220012B12C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C6AB116D98220012B12C /* Default.png */; }; - 6E94C6AE116D98220012B12C /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C6AC116D98220012B12C /* Icon.png */; }; - 7000C4C0130CCAE3006D7ADE /* DownloadTestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7000C4BE130CCAE3006D7ADE /* DownloadTestModel.m */; }; - 7000C4C1130CCAE3006D7ADE /* DownloadProgressTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7000C4BF130CCAE3006D7ADE /* DownloadProgressTestController.m */; }; - BE1288310F8973CD00F65EA2 /* StyleTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE1288300F8973CD00F65EA2 /* StyleTestController.m */; }; - BE1289C20F91811E00F65EA2 /* mask.png in Resources */ = {isa = PBXBuildFile; fileRef = BE1289C10F91811E00F65EA2 /* mask.png */; }; - BE1D843A0F8D104B00EC8BB8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE1D84390F8D104B00EC8BB8 /* QuartzCore.framework */; }; - BE20A49C0FF418B2008791F4 /* TableControlsTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE20A49B0FF418B2008791F4 /* TableControlsTestController.m */; }; - BE3188A10F822E2C00E3067D /* smiley.png in Resources */ = {isa = PBXBuildFile; fileRef = BE3188A00F822E2C00E3067D /* smiley.png */; }; - BE5F25920EBA5F0400FD59A6 /* PhotoTest2Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = BE5F25910EBA5F0400FD59A6 /* PhotoTest2Controller.m */; }; - BE69B7590F62874900C02928 /* TableTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE69B7580F62874900C02928 /* TableTestController.m */; }; - BE6E46EC0F4578BA001CE9B4 /* TabBarTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE6E46EB0F4578BA001CE9B4 /* TabBarTestController.m */; }; - BE6E4AA50F4655A4001CE9B4 /* TableItemTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE6E4AA40F4655A4001CE9B4 /* TableItemTestController.m */; }; - BE6E4DC00F46A352001CE9B4 /* tableIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = BE6E4DBF0F46A352001CE9B4 /* tableIcon.png */; }; - BE80E24A0EAEFF6100743358 /* MockPhotoSource.m in Sources */ = {isa = PBXBuildFile; fileRef = BE80E2490EAEFF6100743358 /* MockPhotoSource.m */; }; - BE80E3710EAF0F3000743358 /* TableImageTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE80E3700EAF0F3000743358 /* TableImageTestController.m */; }; - BE80E3A70EAF108500743358 /* ImageTest1Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = BE80E3A60EAF108500743358 /* ImageTest1Controller.m */; }; - BE8C0F7D0F2018C600EB0E98 /* YouTubeTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE8C0F7C0F2018C600EB0E98 /* YouTubeTestController.m */; }; - BEA6BA7F101431DA00B83B3A /* defaultPerson.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA6BA7E101431DA00B83B3A /* defaultPerson.png */; }; - BEA6BAAD101436AC00B83B3A /* defaultMusic.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA6BAAC101436AC00B83B3A /* defaultMusic.png */; }; - BEC5EC680F8C307E007622CD /* ButtonTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEC5EC670F8C307E007622CD /* ButtonTestController.m */; }; - BEC787631040A430005C00CF /* LauncherViewTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEC787621040A430005C00CF /* LauncherViewTestController.m */; }; - BECB1CC20F46AE9600AE5B52 /* person.jpg in Resources */ = {isa = PBXBuildFile; fileRef = BECB1CC10F46AE9600AE5B52 /* person.jpg */; }; - BEDCFBB40F4FFF820060B7D1 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BEDCFBB30F4FFF820060B7D1 /* Three20.bundle */; }; - BEE0FDDB0EB2A6850052C05F /* PhotoTest1Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = BEE0FDDA0EB2A6850052C05F /* PhotoTest1Controller.m */; }; - BEE341B40F480C76008C826E /* MessageTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEE341B30F480C76008C826E /* MessageTestController.m */; }; - BEE346BC0F48F15C008C826E /* SearchTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEE346BB0F48F15C008C826E /* SearchTestController.m */; }; - BEE348AC0F490F43008C826E /* MockDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = BEE348AB0F490F43008C826E /* MockDataSource.m */; }; - BEE38E810EB288BA00189902 /* ActivityTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEE38E800EB288BA00189902 /* ActivityTestController.m */; }; - BEF199220F818E720010D36E /* StyledTextTableTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEF1991F0F818E720010D36E /* StyledTextTableTestController.m */; }; - BEF199230F818E720010D36E /* StyledTextTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEF199210F818E720010D36E /* StyledTextTestController.m */; }; - BEF6EC370F280CB300CF4096 /* ScrollViewTestController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEF6EC360F280CB300CF4096 /* ScrollViewTestController.m */; }; - E46662FE127F91A4001A0F20 /* TableWithBannerController.m in Sources */ = {isa = PBXBuildFile; fileRef = E46662FD127F91A4001A0F20 /* TableWithBannerController.m */; }; - E4D1D1D61306D2670090AE0C /* TableDragRefreshController.m in Sources */ = {isa = PBXBuildFile; fileRef = E4D1D1D51306D2670090AE0C /* TableDragRefreshController.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E3794D311B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794BF11B9B6D70011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3794D511B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794BF11B9B6D70011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3794D911B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C211B9B6D70011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3794DB11B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C211B9B6D70011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3794DF11B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C511B9B6D70011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3794E111B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C511B9B6D70011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3794E511B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C811B9B6D70011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3794E711B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C811B9B6D70011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3794EB11B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794CB11B9B6D70011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3794ED11B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794CB11B9B6D70011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3794F111B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794CE11B9B6D70011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3794F311B9B6D70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794CE11B9B6D70011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3794FF11B9B6EE0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794CE11B9B6D70011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37950111B9B6EE0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794CB11B9B6D70011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37950311B9B6EE0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C811B9B6D70011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37950511B9B6EE0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C511B9B6D70011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37950711B9B6EE0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794C211B9B6D70011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37950911B9B6EE0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3794BF11B9B6D70011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E7F977D118E37BB00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9752118E37BA00443B46 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6E7F977F118E37BB00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9752118E37BA00443B46 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E7F97AA118E37CE00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9752118E37BA00443B46 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* TTCatalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTCatalog.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28C286DF0D94DF7D0034E888 /* CatalogController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatalogController.h; sourceTree = ""; }; - 28C286E00D94DF7D0034E888 /* CatalogController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CatalogController.m; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 665E998712662FFA0025FA42 /* TTCatalog-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TTCatalog-Info.plist"; sourceTree = ""; }; - 666E182E12944D23001C1D97 /* SplitCatalogController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SplitCatalogController.h; sourceTree = ""; }; - 666E182F12944D23001C1D97 /* SplitCatalogController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SplitCatalogController.m; sourceTree = ""; }; - 6675F5F012945622008DE0A6 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape.png"; path = "../Resources/Default-Landscape.png"; sourceTree = SOURCE_ROOT; }; - 6675F5F112945622008DE0A6 /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Portrait.png"; path = "../Resources/Default-Portrait.png"; sourceTree = SOURCE_ROOT; }; - 6675F5F212945622008DE0A6 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "../Resources/Default@2x.png"; sourceTree = SOURCE_ROOT; }; - 6675F5F312945622008DE0A6 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon@2x.png"; path = "../Resources/Icon@2x.png"; sourceTree = SOURCE_ROOT; }; - 6E002565116A6D1A00D1F0CB /* TableWithShadowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableWithShadowController.h; sourceTree = ""; }; - 6E002566116A6D1A00D1F0CB /* TableWithShadowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableWithShadowController.m; sourceTree = ""; }; - 6E3794BF11B9B6D70011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3794C211B9B6D70011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../../src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3794C511B9B6D70011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../../src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3794C811B9B6D70011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../../src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3794CB11B9B6D70011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../../src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3794CE11B9B6D70011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../../src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E7F9752118E37BA00443B46 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../../src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E7F9960118E3A6000443B46 /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = ""; }; - 6E7F9961118E3A6000443B46 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E7F9962118E3A6000443B46 /* RelPath.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = RelPath.xcconfig; path = Configurations/RelPath.xcconfig; sourceTree = ""; }; - 6E7F9963118E3A6000443B46 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E7F9964118E3A7600443B46 /* TTCatalog_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTCatalog_Prefix.pch; path = Headers/TTCatalog_Prefix.pch; sourceTree = ""; }; - 6E94C6AB116D98220012B12C /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E94C6AC116D98220012B12C /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../Resources/Icon.png; sourceTree = SOURCE_ROOT; }; - 7000C4BE130CCAE3006D7ADE /* DownloadTestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DownloadTestModel.m; sourceTree = ""; }; - 7000C4BF130CCAE3006D7ADE /* DownloadProgressTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DownloadProgressTestController.m; sourceTree = ""; }; - 7000C4C2130CCB0F006D7ADE /* DownloadTestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadTestModel.h; sourceTree = ""; }; - 7000C4C3130CCB0F006D7ADE /* DownloadProgressTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadProgressTestController.h; sourceTree = ""; }; - BE12882F0F8973CD00F65EA2 /* StyleTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleTestController.h; sourceTree = ""; }; - BE1288300F8973CD00F65EA2 /* StyleTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyleTestController.m; sourceTree = ""; }; - BE1289C10F91811E00F65EA2 /* mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mask.png; sourceTree = ""; }; - BE1D84390F8D104B00EC8BB8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - BE20A49A0FF418B2008791F4 /* TableControlsTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableControlsTestController.h; sourceTree = ""; }; - BE20A49B0FF418B2008791F4 /* TableControlsTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableControlsTestController.m; sourceTree = ""; }; - BE3188A00F822E2C00E3067D /* smiley.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = smiley.png; sourceTree = ""; }; - BE5F25900EBA5F0400FD59A6 /* PhotoTest2Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhotoTest2Controller.h; sourceTree = ""; }; - BE5F25910EBA5F0400FD59A6 /* PhotoTest2Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhotoTest2Controller.m; sourceTree = ""; }; - BE69B7570F62874900C02928 /* TableTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableTestController.h; sourceTree = ""; }; - BE69B7580F62874900C02928 /* TableTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableTestController.m; sourceTree = ""; }; - BE6E46EA0F4578BA001CE9B4 /* TabBarTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TabBarTestController.h; sourceTree = ""; }; - BE6E46EB0F4578BA001CE9B4 /* TabBarTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TabBarTestController.m; sourceTree = ""; }; - BE6E4AA30F4655A4001CE9B4 /* TableItemTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableItemTestController.h; sourceTree = ""; }; - BE6E4AA40F4655A4001CE9B4 /* TableItemTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableItemTestController.m; sourceTree = ""; }; - BE6E4DBF0F46A352001CE9B4 /* tableIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tableIcon.png; sourceTree = ""; }; - BE80E2480EAEFF6100743358 /* MockPhotoSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockPhotoSource.h; sourceTree = ""; }; - BE80E2490EAEFF6100743358 /* MockPhotoSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MockPhotoSource.m; sourceTree = ""; }; - BE80E36F0EAF0F3000743358 /* TableImageTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableImageTestController.h; sourceTree = ""; }; - BE80E3700EAF0F3000743358 /* TableImageTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableImageTestController.m; sourceTree = ""; }; - BE80E3A50EAF108500743358 /* ImageTest1Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageTest1Controller.h; sourceTree = ""; }; - BE80E3A60EAF108500743358 /* ImageTest1Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageTest1Controller.m; sourceTree = ""; }; - BE8C0F7B0F2018C600EB0E98 /* YouTubeTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YouTubeTestController.h; sourceTree = ""; }; - BE8C0F7C0F2018C600EB0E98 /* YouTubeTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YouTubeTestController.m; sourceTree = ""; }; - BEA6BA7E101431DA00B83B3A /* defaultPerson.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = defaultPerson.png; sourceTree = ""; }; - BEA6BAAC101436AC00B83B3A /* defaultMusic.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = defaultMusic.png; sourceTree = ""; }; - BEC5EC660F8C307E007622CD /* ButtonTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ButtonTestController.h; sourceTree = ""; }; - BEC5EC670F8C307E007622CD /* ButtonTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ButtonTestController.m; sourceTree = ""; }; - BEC787611040A430005C00CF /* LauncherViewTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LauncherViewTestController.h; sourceTree = ""; }; - BEC787621040A430005C00CF /* LauncherViewTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LauncherViewTestController.m; sourceTree = ""; }; - BECB1CC10F46AE9600AE5B52 /* person.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = person.jpg; sourceTree = ""; }; - BEDCFBB30F4FFF820060B7D1 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - BEE0FDD90EB2A6850052C05F /* PhotoTest1Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhotoTest1Controller.h; sourceTree = ""; }; - BEE0FDDA0EB2A6850052C05F /* PhotoTest1Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhotoTest1Controller.m; sourceTree = ""; }; - BEE341B20F480C76008C826E /* MessageTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageTestController.h; sourceTree = ""; }; - BEE341B30F480C76008C826E /* MessageTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageTestController.m; sourceTree = ""; }; - BEE346BA0F48F15C008C826E /* SearchTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchTestController.h; sourceTree = ""; }; - BEE346BB0F48F15C008C826E /* SearchTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchTestController.m; sourceTree = ""; }; - BEE348AA0F490F43008C826E /* MockDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockDataSource.h; sourceTree = ""; }; - BEE348AB0F490F43008C826E /* MockDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MockDataSource.m; sourceTree = ""; }; - BEE38E7F0EB288BA00189902 /* ActivityTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActivityTestController.h; sourceTree = ""; }; - BEE38E800EB288BA00189902 /* ActivityTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ActivityTestController.m; sourceTree = ""; }; - BEF1991E0F818E720010D36E /* StyledTextTableTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyledTextTableTestController.h; sourceTree = ""; }; - BEF1991F0F818E720010D36E /* StyledTextTableTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyledTextTableTestController.m; sourceTree = ""; }; - BEF199200F818E720010D36E /* StyledTextTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyledTextTestController.h; sourceTree = ""; }; - BEF199210F818E720010D36E /* StyledTextTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyledTextTestController.m; sourceTree = ""; }; - BEF6EC350F280CB300CF4096 /* ScrollViewTestController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollViewTestController.h; sourceTree = ""; }; - BEF6EC360F280CB300CF4096 /* ScrollViewTestController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScrollViewTestController.m; sourceTree = ""; }; - E46662FC127F91A4001A0F20 /* TableWithBannerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableWithBannerController.h; sourceTree = ""; }; - E46662FD127F91A4001A0F20 /* TableWithBannerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableWithBannerController.m; sourceTree = ""; }; - E4D1D1D41306D2670090AE0C /* TableDragRefreshController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableDragRefreshController.h; sourceTree = ""; }; - E4D1D1D51306D2670090AE0C /* TableDragRefreshController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableDragRefreshController.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, - BE1D843A0F8D104B00EC8BB8 /* QuartzCore.framework in Frameworks */, - 6E7F97A9118E37C700443B46 /* libThree20.a in Frameworks */, - 6E3794F511B9B6DB0011C497 /* libThree20Core.a in Frameworks */, - 6E3794F611B9B6DC0011C497 /* libThree20Network.a in Frameworks */, - 6E3794F711B9B6DC0011C497 /* libThree20Style.a in Frameworks */, - 6E3794F811B9B6DD0011C497 /* libThree20UI.a in Frameworks */, - 6E3794F911B9B6DD0011C497 /* libThree20UINavigator.a in Frameworks */, - 6E3794FA11B9B6DE0011C497 /* libThree20UICommon.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - 666E182E12944D23001C1D97 /* SplitCatalogController.h */, - 666E182F12944D23001C1D97 /* SplitCatalogController.m */, - 28C286DF0D94DF7D0034E888 /* CatalogController.h */, - 28C286E00D94DF7D0034E888 /* CatalogController.m */, - EA1080F1101B37E90098AAC2 /* Photos */, - EA108105101B38240098AAC2 /* Styles */, - EA108119101B386D0098AAC2 /* Controls */, - EA108168101B3A350098AAC2 /* Tables */, - EA108135101B39140098AAC2 /* Models */, - EA108141101B39510098AAC2 /* General */, - BEC7875C1040A405005C00CF /* Launcher */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTCatalog.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E7F995E118E3A4800443B46 /* Configurations */, - 6E7F9782118E37BE00443B46 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6E7F9964118E3A7600443B46 /* TTCatalog_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - BEDCFBB30F4FFF820060B7D1 /* Three20.bundle */, - 6E94C6AB116D98220012B12C /* Default.png */, - 6675F5F012945622008DE0A6 /* Default-Landscape.png */, - 6675F5F112945622008DE0A6 /* Default-Portrait.png */, - 6675F5F212945622008DE0A6 /* Default@2x.png */, - 6675F5F312945622008DE0A6 /* Icon@2x.png */, - 6E94C6AC116D98220012B12C /* Icon.png */, - BEA6BAAC101436AC00B83B3A /* defaultMusic.png */, - BEA6BA7E101431DA00B83B3A /* defaultPerson.png */, - BE6E4DBF0F46A352001CE9B4 /* tableIcon.png */, - BECB1CC10F46AE9600AE5B52 /* person.jpg */, - BE3188A00F822E2C00E3067D /* smiley.png */, - BE1289C10F91811E00F65EA2 /* mask.png */, - 665E998712662FFA0025FA42 /* TTCatalog-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - BE1D84390F8D104B00EC8BB8 /* QuartzCore.framework */, - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E002564116A6CF900D1F0CB /* Table With Shadow */ = { - isa = PBXGroup; - children = ( - 6E002565116A6D1A00D1F0CB /* TableWithShadowController.h */, - 6E002566116A6D1A00D1F0CB /* TableWithShadowController.m */, - ); - name = "Table With Shadow"; - sourceTree = ""; - }; - 6E3794C011B9B6D70011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3794D411B9B6D70011C497 /* libThree20Core.a */, - 6E3794D611B9B6D70011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3794C311B9B6D70011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3794DA11B9B6D70011C497 /* libThree20Network.a */, - 6E3794DC11B9B6D70011C497 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3794C611B9B6D70011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3794E011B9B6D70011C497 /* libThree20Style.a */, - 6E3794E211B9B6D70011C497 /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3794C911B9B6D70011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3794E611B9B6D70011C497 /* libThree20UICommon.a */, - 6E3794E811B9B6D70011C497 /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3794CC11B9B6D70011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3794EC11B9B6D70011C497 /* libThree20UINavigator.a */, - 6E3794EE11B9B6D70011C497 /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3794CF11B9B6D70011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3794F211B9B6D70011C497 /* libThree20UI.a */, - 6E3794F411B9B6D70011C497 /* UIUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37951F11B9B70C0011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E3794BF11B9B6D70011C497 /* Three20Core.xcodeproj */, - 6E3794C211B9B6D70011C497 /* Three20Network.xcodeproj */, - 6E3794C511B9B6D70011C497 /* Three20Style.xcodeproj */, - 6E3794C811B9B6D70011C497 /* Three20UICommon.xcodeproj */, - 6E3794CB11B9B6D70011C497 /* Three20UINavigator.xcodeproj */, - 6E3794CE11B9B6D70011C497 /* Three20UI.xcodeproj */, - 6E7F9752118E37BA00443B46 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E7F9753118E37BA00443B46 /* Products */ = { - isa = PBXGroup; - children = ( - 6E7F977E118E37BB00443B46 /* libThree20.a */, - 6E7F9780118E37BB00443B46 /* Three20UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E7F9782118E37BE00443B46 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37951F11B9B70C0011C497 /* Three20 */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E7F995E118E3A4800443B46 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E7F9960118E3A6000443B46 /* App.xcconfig */, - 6E7F9961118E3A6000443B46 /* Project.xcconfig */, - 6E7F9962118E3A6000443B46 /* RelPath.xcconfig */, - 6E7F9963118E3A6000443B46 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 7000C4B7130CCAC7006D7ADE /* Download Progress */ = { - isa = PBXGroup; - children = ( - 7000C4C2130CCB0F006D7ADE /* DownloadTestModel.h */, - 7000C4BE130CCAE3006D7ADE /* DownloadTestModel.m */, - 7000C4C3130CCB0F006D7ADE /* DownloadProgressTestController.h */, - 7000C4BF130CCAE3006D7ADE /* DownloadProgressTestController.m */, - ); - name = "Download Progress"; - sourceTree = ""; - }; - BEC7875C1040A405005C00CF /* Launcher */ = { - isa = PBXGroup; - children = ( - BEC787611040A430005C00CF /* LauncherViewTestController.h */, - BEC787621040A430005C00CF /* LauncherViewTestController.m */, - ); - name = Launcher; - sourceTree = ""; - }; - E46662F9127F916C001A0F20 /* Table with Banner */ = { - isa = PBXGroup; - children = ( - E46662FC127F91A4001A0F20 /* TableWithBannerController.h */, - E46662FD127F91A4001A0F20 /* TableWithBannerController.m */, - ); - name = "Table with Banner"; - sourceTree = ""; - }; - E4D1D1C41306D12D0090AE0C /* Table Drag Refresh */ = { - isa = PBXGroup; - children = ( - E4D1D1D41306D2670090AE0C /* TableDragRefreshController.h */, - E4D1D1D51306D2670090AE0C /* TableDragRefreshController.m */, - ); - name = "Table Drag Refresh"; - sourceTree = ""; - }; - EA1080F1101B37E90098AAC2 /* Photos */ = { - isa = PBXGroup; - children = ( - BE80E2480EAEFF6100743358 /* MockPhotoSource.h */, - BE80E2490EAEFF6100743358 /* MockPhotoSource.m */, - EA108103101B37FE0098AAC2 /* Photo Browser */, - EA108104101B380B0098AAC2 /* Photo Thumbnails */, - ); - name = Photos; - sourceTree = ""; - }; - EA108103101B37FE0098AAC2 /* Photo Browser */ = { - isa = PBXGroup; - children = ( - BEE0FDD90EB2A6850052C05F /* PhotoTest1Controller.h */, - BEE0FDDA0EB2A6850052C05F /* PhotoTest1Controller.m */, - ); - name = "Photo Browser"; - sourceTree = ""; - }; - EA108104101B380B0098AAC2 /* Photo Thumbnails */ = { - isa = PBXGroup; - children = ( - BE5F25900EBA5F0400FD59A6 /* PhotoTest2Controller.h */, - BE5F25910EBA5F0400FD59A6 /* PhotoTest2Controller.m */, - ); - name = "Photo Thumbnails"; - sourceTree = ""; - }; - EA108105101B38240098AAC2 /* Styles */ = { - isa = PBXGroup; - children = ( - EA10810E101B38400098AAC2 /* Styled Views */, - EA108110101B384D0098AAC2 /* Styled Labels */, - ); - name = Styles; - sourceTree = ""; - }; - EA10810E101B38400098AAC2 /* Styled Views */ = { - isa = PBXGroup; - children = ( - BE12882F0F8973CD00F65EA2 /* StyleTestController.h */, - BE1288300F8973CD00F65EA2 /* StyleTestController.m */, - ); - name = "Styled Views"; - sourceTree = ""; - }; - EA108110101B384D0098AAC2 /* Styled Labels */ = { - isa = PBXGroup; - children = ( - BEF199200F818E720010D36E /* StyledTextTestController.h */, - BEF199210F818E720010D36E /* StyledTextTestController.m */, - ); - name = "Styled Labels"; - sourceTree = ""; - }; - EA108119101B386D0098AAC2 /* Controls */ = { - isa = PBXGroup; - children = ( - EA10811D101B38830098AAC2 /* Buttons */, - EA10811C101B387D0098AAC2 /* Tabs */, - EA10811B101B38780098AAC2 /* Composers */, - ); - name = Controls; - sourceTree = ""; - }; - EA10811B101B38780098AAC2 /* Composers */ = { - isa = PBXGroup; - children = ( - BEE341B20F480C76008C826E /* MessageTestController.h */, - BEE341B30F480C76008C826E /* MessageTestController.m */, - ); - name = Composers; - sourceTree = ""; - }; - EA10811C101B387D0098AAC2 /* Tabs */ = { - isa = PBXGroup; - children = ( - BE6E46EA0F4578BA001CE9B4 /* TabBarTestController.h */, - BE6E46EB0F4578BA001CE9B4 /* TabBarTestController.m */, - ); - name = Tabs; - sourceTree = ""; - }; - EA10811D101B38830098AAC2 /* Buttons */ = { - isa = PBXGroup; - children = ( - BEC5EC660F8C307E007622CD /* ButtonTestController.h */, - BEC5EC670F8C307E007622CD /* ButtonTestController.m */, - ); - name = Buttons; - sourceTree = ""; - }; - EA108135101B39140098AAC2 /* Models */ = { - isa = PBXGroup; - children = ( - BEE348AA0F490F43008C826E /* MockDataSource.h */, - BEE348AB0F490F43008C826E /* MockDataSource.m */, - EA108138101B39260098AAC2 /* Model Search */, - EA108137101B39210098AAC2 /* Model States */, - ); - name = Models; - sourceTree = ""; - }; - EA108137101B39210098AAC2 /* Model States */ = { - isa = PBXGroup; - children = ( - BE69B7570F62874900C02928 /* TableTestController.h */, - BE69B7580F62874900C02928 /* TableTestController.m */, - ); - name = "Model States"; - sourceTree = ""; - }; - EA108138101B39260098AAC2 /* Model Search */ = { - isa = PBXGroup; - children = ( - BEE346BA0F48F15C008C826E /* SearchTestController.h */, - BEE346BB0F48F15C008C826E /* SearchTestController.m */, - ); - name = "Model Search"; - sourceTree = ""; - }; - EA108141101B39510098AAC2 /* General */ = { - isa = PBXGroup; - children = ( - 7000C4B7130CCAC7006D7ADE /* Download Progress */, - EA108148101B39660098AAC2 /* Web Image */, - EA108149101B396A0098AAC2 /* YouTube Player */, - EA10814F101B398C0098AAC2 /* Activity Labels */, - EA108154101B39980098AAC2 /* Scroll View */, - ); - name = General; - sourceTree = ""; - }; - EA108148101B39660098AAC2 /* Web Image */ = { - isa = PBXGroup; - children = ( - BE80E3A50EAF108500743358 /* ImageTest1Controller.h */, - BE80E3A60EAF108500743358 /* ImageTest1Controller.m */, - ); - name = "Web Image"; - sourceTree = ""; - }; - EA108149101B396A0098AAC2 /* YouTube Player */ = { - isa = PBXGroup; - children = ( - BE8C0F7B0F2018C600EB0E98 /* YouTubeTestController.h */, - BE8C0F7C0F2018C600EB0E98 /* YouTubeTestController.m */, - ); - name = "YouTube Player"; - sourceTree = ""; - }; - EA10814F101B398C0098AAC2 /* Activity Labels */ = { - isa = PBXGroup; - children = ( - BEE38E7F0EB288BA00189902 /* ActivityTestController.h */, - BEE38E800EB288BA00189902 /* ActivityTestController.m */, - ); - name = "Activity Labels"; - sourceTree = ""; - }; - EA108154101B39980098AAC2 /* Scroll View */ = { - isa = PBXGroup; - children = ( - BEF6EC350F280CB300CF4096 /* ScrollViewTestController.h */, - BEF6EC360F280CB300CF4096 /* ScrollViewTestController.m */, - ); - name = "Scroll View"; - sourceTree = ""; - }; - EA108168101B3A350098AAC2 /* Tables */ = { - isa = PBXGroup; - children = ( - EA108177101B3A630098AAC2 /* Table Items */, - EA108175101B3A5C0098AAC2 /* Table Controls */, - EA108172101B3A4A0098AAC2 /* Styled Labels in Table */, - EA108169101B3A3A0098AAC2 /* Web Images in Table */, - E46662F9127F916C001A0F20 /* Table with Banner */, - 6E002564116A6CF900D1F0CB /* Table With Shadow */, - E4D1D1C41306D12D0090AE0C /* Table Drag Refresh */, - ); - name = Tables; - sourceTree = ""; - }; - EA108169101B3A3A0098AAC2 /* Web Images in Table */ = { - isa = PBXGroup; - children = ( - BE80E36F0EAF0F3000743358 /* TableImageTestController.h */, - BE80E3700EAF0F3000743358 /* TableImageTestController.m */, - ); - name = "Web Images in Table"; - sourceTree = ""; - }; - EA108172101B3A4A0098AAC2 /* Styled Labels in Table */ = { - isa = PBXGroup; - children = ( - BEF1991E0F818E720010D36E /* StyledTextTableTestController.h */, - BEF1991F0F818E720010D36E /* StyledTextTableTestController.m */, - ); - name = "Styled Labels in Table"; - sourceTree = ""; - }; - EA108175101B3A5C0098AAC2 /* Table Controls */ = { - isa = PBXGroup; - children = ( - BE20A49A0FF418B2008791F4 /* TableControlsTestController.h */, - BE20A49B0FF418B2008791F4 /* TableControlsTestController.m */, - ); - name = "Table Controls"; - sourceTree = ""; - }; - EA108177101B3A630098AAC2 /* Table Items */ = { - isa = PBXGroup; - children = ( - BE6E4AA30F4655A4001CE9B4 /* TableItemTestController.h */, - BE6E4AA40F4655A4001CE9B4 /* TableItemTestController.m */, - ); - name = "Table Items"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTCatalog */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTCatalog" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E7F97AB118E37CE00443B46 /* PBXTargetDependency */, - 6E37950011B9B6EE0011C497 /* PBXTargetDependency */, - 6E37950211B9B6EE0011C497 /* PBXTargetDependency */, - 6E37950411B9B6EE0011C497 /* PBXTargetDependency */, - 6E37950611B9B6EE0011C497 /* PBXTargetDependency */, - 6E37950811B9B6EE0011C497 /* PBXTargetDependency */, - 6E37950A11B9B6EE0011C497 /* PBXTargetDependency */, - ); - name = TTCatalog; - productName = PhotoBrowser; - productReference = 1D6058910D05DD3D006BFB54 /* TTCatalog.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTCatalog" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - en, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E7F9753118E37BA00443B46 /* Products */; - ProjectRef = 6E7F9752118E37BA00443B46 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E3794C011B9B6D70011C497 /* Products */; - ProjectRef = 6E3794BF11B9B6D70011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E3794C311B9B6D70011C497 /* Products */; - ProjectRef = 6E3794C211B9B6D70011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E3794C611B9B6D70011C497 /* Products */; - ProjectRef = 6E3794C511B9B6D70011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E3794CF11B9B6D70011C497 /* Products */; - ProjectRef = 6E3794CE11B9B6D70011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E3794C911B9B6D70011C497 /* Products */; - ProjectRef = 6E3794C811B9B6D70011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E3794CC11B9B6D70011C497 /* Products */; - ProjectRef = 6E3794CB11B9B6D70011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTCatalog */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E3794D411B9B6D70011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E3794D311B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794D611B9B6D70011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E3794D511B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794DA11B9B6D70011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E3794D911B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794DC11B9B6D70011C497 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E3794DB11B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794E011B9B6D70011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E3794DF11B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794E211B9B6D70011C497 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E3794E111B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794E611B9B6D70011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3794E511B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794E811B9B6D70011C497 /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6E3794E711B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794EC11B9B6D70011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E3794EB11B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794EE11B9B6D70011C497 /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6E3794ED11B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794F211B9B6D70011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E3794F111B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3794F411B9B6D70011C497 /* UIUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UIUnitTests.octest; - remoteRef = 6E3794F311B9B6D70011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7F977E118E37BB00443B46 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6E7F977D118E37BB00443B46 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7F9780118E37BB00443B46 /* Three20UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = Three20UnitTests.octest; - remoteRef = 6E7F977F118E37BB00443B46 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BE6E4DC00F46A352001CE9B4 /* tableIcon.png in Resources */, - BECB1CC20F46AE9600AE5B52 /* person.jpg in Resources */, - BEDCFBB40F4FFF820060B7D1 /* Three20.bundle in Resources */, - BE3188A10F822E2C00E3067D /* smiley.png in Resources */, - BE1289C20F91811E00F65EA2 /* mask.png in Resources */, - BEA6BA7F101431DA00B83B3A /* defaultPerson.png in Resources */, - BEA6BAAD101436AC00B83B3A /* defaultMusic.png in Resources */, - 6E94C6AD116D98220012B12C /* Default.png in Resources */, - 6E94C6AE116D98220012B12C /* Icon.png in Resources */, - 6675F5F412945622008DE0A6 /* Default-Landscape.png in Resources */, - 6675F5F512945622008DE0A6 /* Default-Portrait.png in Resources */, - 6675F5F612945622008DE0A6 /* Default@2x.png in Resources */, - 6675F5F712945622008DE0A6 /* Icon@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 28C286E10D94DF7D0034E888 /* CatalogController.m in Sources */, - BE80E24A0EAEFF6100743358 /* MockPhotoSource.m in Sources */, - BE80E3710EAF0F3000743358 /* TableImageTestController.m in Sources */, - BE80E3A70EAF108500743358 /* ImageTest1Controller.m in Sources */, - BEE38E810EB288BA00189902 /* ActivityTestController.m in Sources */, - BEE0FDDB0EB2A6850052C05F /* PhotoTest1Controller.m in Sources */, - BE5F25920EBA5F0400FD59A6 /* PhotoTest2Controller.m in Sources */, - BE8C0F7D0F2018C600EB0E98 /* YouTubeTestController.m in Sources */, - BEF6EC370F280CB300CF4096 /* ScrollViewTestController.m in Sources */, - BE6E46EC0F4578BA001CE9B4 /* TabBarTestController.m in Sources */, - BE6E4AA50F4655A4001CE9B4 /* TableItemTestController.m in Sources */, - BEE341B40F480C76008C826E /* MessageTestController.m in Sources */, - BEE346BC0F48F15C008C826E /* SearchTestController.m in Sources */, - BEE348AC0F490F43008C826E /* MockDataSource.m in Sources */, - BE69B7590F62874900C02928 /* TableTestController.m in Sources */, - BEF199220F818E720010D36E /* StyledTextTableTestController.m in Sources */, - BEF199230F818E720010D36E /* StyledTextTestController.m in Sources */, - BE1288310F8973CD00F65EA2 /* StyleTestController.m in Sources */, - BEC5EC680F8C307E007622CD /* ButtonTestController.m in Sources */, - BE20A49C0FF418B2008791F4 /* TableControlsTestController.m in Sources */, - BEC787631040A430005C00CF /* LauncherViewTestController.m in Sources */, - 6E002567116A6D1A00D1F0CB /* TableWithShadowController.m in Sources */, - E46662FE127F91A4001A0F20 /* TableWithBannerController.m in Sources */, - 666E183012944D23001C1D97 /* SplitCatalogController.m in Sources */, - E4D1D1D61306D2670090AE0C /* TableDragRefreshController.m in Sources */, - 7000C4C0130CCAE3006D7ADE /* DownloadTestModel.m in Sources */, - 7000C4C1130CCAE3006D7ADE /* DownloadProgressTestController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E37950011B9B6EE0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3794FF11B9B6EE0011C497 /* PBXContainerItemProxy */; - }; - 6E37950211B9B6EE0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E37950111B9B6EE0011C497 /* PBXContainerItemProxy */; - }; - 6E37950411B9B6EE0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E37950311B9B6EE0011C497 /* PBXContainerItemProxy */; - }; - 6E37950611B9B6EE0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E37950511B9B6EE0011C497 /* PBXContainerItemProxy */; - }; - 6E37950811B9B6EE0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E37950711B9B6EE0011C497 /* PBXContainerItemProxy */; - }; - 6E37950A11B9B6EE0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E37950911B9B6EE0011C497 /* PBXContainerItemProxy */; - }; - 6E7F97AB118E37CE00443B46 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6E7F97AA118E37CE00443B46 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E7F9960118E3A6000443B46 /* App.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - BUILD_STYLE = Debug; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E7F9960118E3A6000443B46 /* App.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - BUILD_STYLE = Release; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E7F9961118E3A6000443B46 /* Project.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - BUILD_STYLE = Debug; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E7F9961118E3A6000443B46 /* Project.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - BUILD_STYLE = Release; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTCatalog" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTCatalog" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/TTCatalog/defaultMusic.png b/samples/TTCatalog/defaultMusic.png deleted file mode 100644 index a63be03177..0000000000 Binary files a/samples/TTCatalog/defaultMusic.png and /dev/null differ diff --git a/samples/TTCatalog/defaultPerson.png b/samples/TTCatalog/defaultPerson.png deleted file mode 100644 index 6753bba6ee..0000000000 Binary files a/samples/TTCatalog/defaultPerson.png and /dev/null differ diff --git a/samples/TTCatalog/main.m b/samples/TTCatalog/main.m deleted file mode 100644 index f50efbc54e..0000000000 --- a/samples/TTCatalog/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import - -int main(int argc, char *argv[]) { - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/samples/TTCatalog/mask.png b/samples/TTCatalog/mask.png deleted file mode 100644 index 86f1d347b9..0000000000 Binary files a/samples/TTCatalog/mask.png and /dev/null differ diff --git a/samples/TTCatalog/person.jpg b/samples/TTCatalog/person.jpg deleted file mode 100644 index d51bacbaf2..0000000000 Binary files a/samples/TTCatalog/person.jpg and /dev/null differ diff --git a/samples/TTCatalog/smiley.png b/samples/TTCatalog/smiley.png deleted file mode 100644 index 86d17949c2..0000000000 Binary files a/samples/TTCatalog/smiley.png and /dev/null differ diff --git a/samples/TTCatalog/tableIcon.png b/samples/TTCatalog/tableIcon.png deleted file mode 100644 index 2f027a6921..0000000000 Binary files a/samples/TTCatalog/tableIcon.png and /dev/null differ diff --git a/samples/TTFacebook/Atlas.h b/samples/TTFacebook/Atlas.h deleted file mode 100644 index d8c52812e2..0000000000 --- a/samples/TTFacebook/Atlas.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -extern NSString* kAppPrefixURLPath; -extern NSString* kAppRootURLPath; diff --git a/samples/TTFacebook/Atlas.m b/samples/TTFacebook/Atlas.m deleted file mode 100644 index 6f583ee0fd..0000000000 --- a/samples/TTFacebook/Atlas.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Atlas.h" - -NSString* kAppPrefixURLPath = @"tt://"; -NSString* kAppRootURLPath = @"tt://root"; - diff --git a/samples/TTFacebook/Classes/AppDelegate.h b/samples/TTFacebook/Classes/AppDelegate.h deleted file mode 100644 index bd4b72b499..0000000000 --- a/samples/TTFacebook/Classes/AppDelegate.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { -} - -@end - diff --git a/samples/TTFacebook/Classes/AppDelegate.m b/samples/TTFacebook/Classes/AppDelegate.m deleted file mode 100644 index 6911f72059..0000000000 --- a/samples/TTFacebook/Classes/AppDelegate.m +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "AppDelegate.h" - -#import "TTFacebookSearchFeedViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - [TTExtensionLoader loadAllExtensions]; - - TTDefaultCSSStyleSheet* styleSheet = [[TTDefaultCSSStyleSheet alloc] init]; - [styleSheet addStyleSheetFromDisk:TTPathForBundleResource(@"stylesheet.css")]; - [TTStyleSheet setGlobalStyleSheet:styleSheet]; - TT_RELEASE_SAFELY(styleSheet); - - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeNone; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - [map from:kAppRootURLPath toViewController:[TTFacebookSearchFeedViewController class]]; - - [TTExtensionsController registerUrlPathsWithNavigator: navigator - prefix: kAppPrefixURLPath]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:kAppRootURLPath]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/samples/TTFacebook/Classes/TTFacebookPost.h b/samples/TTFacebook/Classes/TTFacebookPost.h deleted file mode 100644 index 82a43d94d6..0000000000 --- a/samples/TTFacebook/Classes/TTFacebookPost.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface TTFacebookPost : NSObject { - NSDate* _created; - NSNumber* _postId; - NSString* _text; - NSString* _name; -} - -@property (nonatomic, retain) NSDate* created; -@property (nonatomic, retain) NSNumber* postId; -@property (nonatomic, copy) NSString* text; -@property (nonatomic, copy) NSString* name; - -@end diff --git a/samples/TTFacebook/Classes/TTFacebookPost.m b/samples/TTFacebook/Classes/TTFacebookPost.m deleted file mode 100644 index 1a8ce285a3..0000000000 --- a/samples/TTFacebook/Classes/TTFacebookPost.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTFacebookPost.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTFacebookPost - -@synthesize created = _created; -@synthesize postId = _postId; -@synthesize text = _text; -@synthesize name = _name; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_created); - TT_RELEASE_SAFELY(_postId); - TT_RELEASE_SAFELY(_text); - TT_RELEASE_SAFELY(_name); - - [super dealloc]; -} - - -@end diff --git a/samples/TTFacebook/Classes/TTFacebookSearchFeedDataSource.h b/samples/TTFacebook/Classes/TTFacebookSearchFeedDataSource.h deleted file mode 100644 index 081ecefce7..0000000000 --- a/samples/TTFacebook/Classes/TTFacebookSearchFeedDataSource.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@class TTFacebookSearchFeedModel; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTFacebookSearchFeedDataSource : TTListDataSource { - TTFacebookSearchFeedModel* _searchFeedModel; -} - -- (id)initWithSearchQuery:(NSString*)searchQuery; - -@end diff --git a/samples/TTFacebook/Classes/TTFacebookSearchFeedDataSource.m b/samples/TTFacebook/Classes/TTFacebookSearchFeedDataSource.m deleted file mode 100644 index 670b7425e0..0000000000 --- a/samples/TTFacebook/Classes/TTFacebookSearchFeedDataSource.m +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTFacebookSearchFeedDataSource.h" - -#import "TTFacebookSearchFeedModel.h" -#import "TTFacebookPost.h" - -// Three20 Additions -#import - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTFacebookSearchFeedDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithSearchQuery:(NSString*)searchQuery { - if (self = [super init]) { - _searchFeedModel = [[TTFacebookSearchFeedModel alloc] initWithSearchQuery:searchQuery]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_searchFeedModel); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)model { - return _searchFeedModel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tableViewDidLoadModel:(UITableView*)tableView { - NSMutableArray* items = [[NSMutableArray alloc] init]; - - for (TTFacebookPost* post in _searchFeedModel.posts) { - [items addObject:[TTTableMessageItem itemWithTitle: post.name - caption: nil - text: post.text - timestamp: post.created - URL: nil]]; - } - - self.items = items; - TT_RELEASE_SAFELY(items); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForLoading:(BOOL)reloading { - if (reloading) { - return NSLocalizedString(@"Updating Facebook feed...", @"Facebook feed updating text"); - } else { - return NSLocalizedString(@"Loading Facebook feed...", @"Facebook feed loading text"); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForEmpty { - return NSLocalizedString(@"No posts found.", @"Facebook feed no results"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)subtitleForError:(NSError*)error { - return NSLocalizedString(@"Sorry, there was an error loading the Facebook stream.", @""); -} - - -@end - diff --git a/samples/TTFacebook/Classes/TTFacebookSearchFeedModel.h b/samples/TTFacebook/Classes/TTFacebookSearchFeedModel.h deleted file mode 100644 index e69fbf1dff..0000000000 --- a/samples/TTFacebook/Classes/TTFacebookSearchFeedModel.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTFacebookSearchFeedModel : TTURLRequestModel { - NSString* _searchQuery; - - NSArray* _posts; -} - -@property (nonatomic, copy) NSString* searchQuery; -@property (nonatomic, readonly) NSArray* posts; - -- (id)initWithSearchQuery:(NSString*)searchQuery; - -@end diff --git a/samples/TTFacebook/Classes/TTFacebookSearchFeedModel.m b/samples/TTFacebook/Classes/TTFacebookSearchFeedModel.m deleted file mode 100644 index 9110abe1ab..0000000000 --- a/samples/TTFacebook/Classes/TTFacebookSearchFeedModel.m +++ /dev/null @@ -1,113 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTFacebookSearchFeedModel.h" - -#import "TTFacebookPost.h" - -#import - -static NSString* kFacebookSearchFeedFormat = @"http://graph.facebook.com/search?q=%@&type=post"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTFacebookSearchFeedModel - -@synthesize searchQuery = _searchQuery; -@synthesize posts = _posts; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithSearchQuery:(NSString*)searchQuery { - if (self = [super init]) { - self.searchQuery = searchQuery; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) dealloc { - TT_RELEASE_SAFELY(_searchQuery); - TT_RELEASE_SAFELY(_posts); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { - if (!self.isLoading && TTIsStringWithAnyText(_searchQuery)) { - NSString* url = [NSString stringWithFormat:kFacebookSearchFeedFormat, _searchQuery]; - - TTURLRequest* request = [TTURLRequest - requestWithURL: url - delegate: self]; - - request.cachePolicy = cachePolicy | TTURLRequestCachePolicyEtag; - request.cacheExpirationAge = TT_CACHE_EXPIRATION_AGE_NEVER; - - TTURLJSONResponse* response = [[TTURLJSONResponse alloc] init]; - request.response = response; - TT_RELEASE_SAFELY(response); - - [request send]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidFinishLoad:(TTURLRequest*)request { - TTURLJSONResponse* response = request.response; - TTDASSERT([response.rootObject isKindOfClass:[NSDictionary class]]); - - NSDictionary* feed = response.rootObject; - TTDASSERT([[feed objectForKey:@"data"] isKindOfClass:[NSArray class]]); - - NSArray* entries = [feed objectForKey:@"data"]; - - NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setTimeStyle:NSDateFormatterFullStyle]; - [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZ"]; - - TT_RELEASE_SAFELY(_posts); - NSMutableArray* posts = [[NSMutableArray alloc] initWithCapacity:[entries count]]; - - for (NSDictionary* entry in entries) { - TTFacebookPost* post = [[TTFacebookPost alloc] init]; - - NSDate* date = [dateFormatter dateFromString:[entry objectForKey:@"created_time"]]; - post.created = date; - post.postId = [NSNumber numberWithLongLong: - [[entry objectForKey:@"id"] longLongValue]]; - post.text = [entry objectForKey:@"message"]; - post.name = [[entry objectForKey:@"from"] objectForKey:@"name"]; - - [posts addObject:post]; - TT_RELEASE_SAFELY(post); - } - _posts = posts; - - TT_RELEASE_SAFELY(dateFormatter); - - [super requestDidFinishLoad:request]; -} - - -@end - diff --git a/samples/TTFacebook/Classes/TTFacebookSearchFeedViewController.h b/samples/TTFacebook/Classes/TTFacebookSearchFeedViewController.h deleted file mode 100644 index f733f4159e..0000000000 --- a/samples/TTFacebook/Classes/TTFacebookSearchFeedViewController.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTFacebookSearchFeedViewController : TTTableViewController { - -} - -@end diff --git a/samples/TTFacebook/Classes/TTFacebookSearchFeedViewController.m b/samples/TTFacebook/Classes/TTFacebookSearchFeedViewController.m deleted file mode 100644 index 1e10f2ef26..0000000000 --- a/samples/TTFacebook/Classes/TTFacebookSearchFeedViewController.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTFacebookSearchFeedViewController.h" - -#import "TTFacebookSearchFeedDataSource.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTFacebookSearchFeedViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.title = @"Facebook feed"; - self.variableHeightRows = YES; - - self.navigationItem.rightBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle: @"Extensions" - style: UIBarButtonItemStyleBordered - target: @"tt://extensions" - action: @selector(openURLFromButton:)] autorelease]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createModel { - self.dataSource = [[[TTFacebookSearchFeedDataSource alloc] - initWithSearchQuery:@"three20"] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)createDelegate { - return [[[TTTableViewDragRefreshDelegate alloc] initWithController:self] autorelease]; -} - - -@end - diff --git a/samples/TTFacebook/Configurations/App.xcconfig b/samples/TTFacebook/Configurations/App.xcconfig deleted file mode 100644 index cfdd10f214..0000000000 --- a/samples/TTFacebook/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTFacebook -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/TTFacebook/Configurations/Project.xcconfig b/samples/TTFacebook/Configurations/Project.xcconfig deleted file mode 100644 index fc1966a5f7..0000000000 --- a/samples/TTFacebook/Configurations/Project.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" diff --git a/samples/TTFacebook/Configurations/RelPath.xcconfig b/samples/TTFacebook/Configurations/RelPath.xcconfig deleted file mode 100644 index d6d201d36a..0000000000 --- a/samples/TTFacebook/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../.. diff --git a/samples/TTFacebook/Configurations/UnitTests.xcconfig b/samples/TTFacebook/Configurations/UnitTests.xcconfig deleted file mode 100644 index c16ed3f5c1..0000000000 --- a/samples/TTFacebook/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -PRODUCT_NAME = TTFacebookUnitTests -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/TTFacebook/Headers/TTFacebook_Prefix.pch b/samples/TTFacebook/Headers/TTFacebook_Prefix.pch deleted file mode 100644 index b805d13335..0000000000 --- a/samples/TTFacebook/Headers/TTFacebook_Prefix.pch +++ /dev/null @@ -1,11 +0,0 @@ -// -// Prefix header for all source files of the 'TTFacebook' target in the 'TTFacebook' project -// - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" - #import "extThree20CSSStyle/extThree20CSSStyle.h" - #import "Atlas.h" -#endif diff --git a/samples/TTFacebook/Resources/stylesheet.css b/samples/TTFacebook/Resources/stylesheet.css deleted file mode 100644 index ee8cfa4628..0000000000 --- a/samples/TTFacebook/Resources/stylesheet.css +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright 2009-2010 Facebook - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* -.dragRefreshHeaderLastUpdated { - font-weight: bold; -} - -.dragRefreshHeader { - text-shadow: 0px 1px 0px red; -}*/ - -navigationBar { - background-color: #3B5998; /* Facebook blue */ -} diff --git a/samples/TTFacebook/TTFacebook-Info.plist b/samples/TTFacebook/TTFacebook-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/samples/TTFacebook/TTFacebook-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/samples/TTFacebook/TTFacebook.xcodeproj/project.pbxproj b/samples/TTFacebook/TTFacebook.xcodeproj/project.pbxproj deleted file mode 100755 index 47c105a8e8..0000000000 --- a/samples/TTFacebook/TTFacebook.xcodeproj/project.pbxproj +++ /dev/null @@ -1,932 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 6E08360311B4C60300B99C32 /* libextThree20CSSStyle.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E08360011B4C5FF00B99C32 /* libextThree20CSSStyle.a */; }; - 6E08361111B4C63400B99C32 /* extThree20CSSStyle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E08361011B4C63400B99C32 /* extThree20CSSStyle.bundle */; }; - 6E08373211B4D18D00B99C32 /* stylesheet.css in Resources */ = {isa = PBXBuildFile; fileRef = 6E08373111B4D18D00B99C32 /* stylesheet.css */; }; - 6E08B426118286D100DA1579 /* TTFacebookPost.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E08B425118286D100DA1579 /* TTFacebookPost.m */; }; - 6E08B429118286D900DA1579 /* TTFacebookSearchFeedDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E08B428118286D900DA1579 /* TTFacebookSearchFeedDataSource.m */; }; - 6E08B42C118286DF00DA1579 /* TTFacebookSearchFeedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E08B42B118286DF00DA1579 /* TTFacebookSearchFeedModel.m */; }; - 6E08B42F118286E700DA1579 /* TTFacebookSearchFeedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E08B42E118286E700DA1579 /* TTFacebookSearchFeedViewController.m */; }; - 6E08B48E118288A300DA1579 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E08B48C118288A300DA1579 /* Default.png */; }; - 6E08B48F118288A300DA1579 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E08B48D118288A300DA1579 /* Icon.png */; }; - 6E37932011B7F2B50011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37930F11B7F2A40011C497 /* libThree20UICommon.a */; }; - 6E37932111B7F2B60011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37931511B7F2A40011C497 /* libThree20UINavigator.a */; }; - 6E37932211B7F2B60011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37931B11B7F2A40011C497 /* libThree20UI.a */; }; - 6E37932311B7F2B70011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37930911B7F2A40011C497 /* libThree20Style.a */; }; - 6E37932411B7F2B70011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37930311B7F2A40011C497 /* libThree20Network.a */; }; - 6E37932511B7F2B80011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3792FD11B7F2A40011C497 /* libThree20Core.a */; }; - 6E5F1F2F117FB4D9004BEBA9 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E5F1F2E117FB4D9004BEBA9 /* Three20.bundle */; }; - 6E5F1F8B117FBE4D004BEBA9 /* Atlas.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E5F1F8A117FBE4D004BEBA9 /* Atlas.m */; }; - 6E64628D1187E0E600F08CB1 /* libextThree20JSON+YAJL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E64628A1187DF2C00F08CB1 /* libextThree20JSON+YAJL.a */; }; - 6E7F9827118E386E00443B46 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7F981A118E385E00443B46 /* libThree20.a */; }; - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E0835FF11B4C5FF00B99C32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E0835FA11B4C5FF00B99C32 /* extThree20CSSStyle.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = extThree20CSSStyle; - }; - 6E08360111B4C5FF00B99C32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E0835FA11B4C5FF00B99C32 /* extThree20CSSStyle.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E08360C11B4C60B00B99C32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E0835FA11B4C5FF00B99C32 /* extThree20CSSStyle.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = extThree20CSSStyle; - }; - 6E3792FC11B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792E811B7F2A40011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3792FE11B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792E811B7F2A40011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37930211B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792EB11B7F2A40011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37930411B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792EB11B7F2A40011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37930811B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792EE11B7F2A40011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37930A11B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792EE11B7F2A40011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37930E11B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F111B7F2A40011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37931011B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F111B7F2A40011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37931411B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F411B7F2A40011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37931611B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F411B7F2A40011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37931A11B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F711B7F2A40011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37931C11B7F2A40011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F711B7F2A40011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37933811B7F2D20011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792E811B7F2A40011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37933A11B7F2D20011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F111B7F2A40011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37933C11B7F2D20011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F411B7F2A40011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37933E11B7F2D20011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792F711B7F2A40011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37934011B7F2D20011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792EE11B7F2A40011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37934211B7F2D20011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3792EB11B7F2A40011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E6462871187DF2C00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6462811187DF2C00F08CB1 /* extThree20JSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = "extThree20JSON+SBJSON"; - }; - 6E6462891187DF2C00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6462811187DF2C00F08CB1 /* extThree20JSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 6E645BD91187751200F08CB1; - remoteInfo = "extThree20JSON+YAJL"; - }; - 6E64628B1187DF2C00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6462811187DF2C00F08CB1 /* extThree20JSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTestsSBJSON; - }; - 6E64628E1187E0EC00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6462811187DF2C00F08CB1 /* extThree20JSON.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 6E645BA31187751200F08CB1; - remoteInfo = "extThree20JSON+YAJL"; - }; - 6E7F9819118E385E00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F97F5118E385E00443B46 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6E7F981B118E385E00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F97F5118E385E00443B46 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E7F9825118E386800443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F97F5118E385E00443B46 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* TTFacebook.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTFacebook.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6E0835FA11B4C5FF00B99C32 /* extThree20CSSStyle.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = extThree20CSSStyle.xcodeproj; path = ../../src/extThree20CSSStyle/extThree20CSSStyle.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E08361011B4C63400B99C32 /* extThree20CSSStyle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = extThree20CSSStyle.bundle; path = ../../src/extThree20CSSStyle/Resources/extThree20CSSStyle.bundle; sourceTree = SOURCE_ROOT; }; - 6E08373111B4D18D00B99C32 /* stylesheet.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = stylesheet.css; path = Resources/stylesheet.css; sourceTree = ""; }; - 6E08B424118286D100DA1579 /* TTFacebookPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTFacebookPost.h; sourceTree = ""; }; - 6E08B425118286D100DA1579 /* TTFacebookPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTFacebookPost.m; sourceTree = ""; }; - 6E08B427118286D900DA1579 /* TTFacebookSearchFeedDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTFacebookSearchFeedDataSource.h; sourceTree = ""; }; - 6E08B428118286D900DA1579 /* TTFacebookSearchFeedDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTFacebookSearchFeedDataSource.m; sourceTree = ""; }; - 6E08B42A118286DF00DA1579 /* TTFacebookSearchFeedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTFacebookSearchFeedModel.h; sourceTree = ""; }; - 6E08B42B118286DF00DA1579 /* TTFacebookSearchFeedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTFacebookSearchFeedModel.m; sourceTree = ""; }; - 6E08B42D118286E700DA1579 /* TTFacebookSearchFeedViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTFacebookSearchFeedViewController.h; sourceTree = ""; }; - 6E08B42E118286E700DA1579 /* TTFacebookSearchFeedViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTFacebookSearchFeedViewController.m; sourceTree = ""; }; - 6E08B48C118288A300DA1579 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E08B48D118288A300DA1579 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../Resources/Icon.png; sourceTree = SOURCE_ROOT; }; - 6E3792E811B7F2A40011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3792EB11B7F2A40011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../../src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3792EE11B7F2A40011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../../src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3792F111B7F2A40011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../../src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3792F411B7F2A40011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../../src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3792F711B7F2A40011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../../src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E5F1F2E117FB4D9004BEBA9 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E5F1F89117FBE4D004BEBA9 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atlas.h; sourceTree = ""; }; - 6E5F1F8A117FBE4D004BEBA9 /* Atlas.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Atlas.m; sourceTree = ""; }; - 6E64627C1187DF0F00F08CB1 /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = ""; }; - 6E64627D1187DF0F00F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E64627E1187DF0F00F08CB1 /* RelPath.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = RelPath.xcconfig; path = Configurations/RelPath.xcconfig; sourceTree = ""; }; - 6E64627F1187DF0F00F08CB1 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E6462811187DF2C00F08CB1 /* extThree20JSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = extThree20JSON.xcodeproj; path = ../../src/extThree20JSON/extThree20JSON.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6462941187E1F200F08CB1 /* TTFacebook_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTFacebook_Prefix.pch; path = Headers/TTFacebook_Prefix.pch; sourceTree = ""; }; - 6E7F97F5118E385E00443B46 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../../src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* TTFacebook-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TTFacebook-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */, - 6E64628D1187E0E600F08CB1 /* libextThree20JSON+YAJL.a in Frameworks */, - 6E7F9827118E386E00443B46 /* libThree20.a in Frameworks */, - 6E08360311B4C60300B99C32 /* libextThree20CSSStyle.a in Frameworks */, - 6E37932011B7F2B50011C497 /* libThree20UICommon.a in Frameworks */, - 6E37932111B7F2B60011C497 /* libThree20UINavigator.a in Frameworks */, - 6E37932211B7F2B60011C497 /* libThree20UI.a in Frameworks */, - 6E37932311B7F2B70011C497 /* libThree20Style.a in Frameworks */, - 6E37932411B7F2B70011C497 /* libThree20Network.a in Frameworks */, - 6E37932511B7F2B80011C497 /* libThree20Core.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 6E5F1FA7117FC590004BEBA9 /* Controllers */, - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTFacebook.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6E5F1F88117FBE46004BEBA9 /* Atlas */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E6462781187DEF900F08CB1 /* Configurations */, - 6E6462791187DEFE00F08CB1 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6E6462941187E1F200F08CB1 /* TTFacebook_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 6E08B48C118288A300DA1579 /* Default.png */, - 6E08B48D118288A300DA1579 /* Icon.png */, - 6E5F1F2E117FB4D9004BEBA9 /* Three20.bundle */, - 6E08361011B4C63400B99C32 /* extThree20CSSStyle.bundle */, - 8D1107310486CEB800E47090 /* TTFacebook-Info.plist */, - 6E08373111B4D18D00B99C32 /* stylesheet.css */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E0835FB11B4C5FF00B99C32 /* Products */ = { - isa = PBXGroup; - children = ( - 6E08360011B4C5FF00B99C32 /* libextThree20CSSStyle.a */, - 6E08360211B4C5FF00B99C32 /* extCSSStyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E08B4131182869700DA1579 /* Search Feed Controller */ = { - isa = PBXGroup; - children = ( - 6E08B42D118286E700DA1579 /* TTFacebookSearchFeedViewController.h */, - 6E08B42E118286E700DA1579 /* TTFacebookSearchFeedViewController.m */, - 6E08B4171182869700DA1579 /* Model */, - 6E08B4141182869700DA1579 /* Data Source */, - ); - name = "Search Feed Controller"; - sourceTree = ""; - }; - 6E08B4141182869700DA1579 /* Data Source */ = { - isa = PBXGroup; - children = ( - 6E08B427118286D900DA1579 /* TTFacebookSearchFeedDataSource.h */, - 6E08B428118286D900DA1579 /* TTFacebookSearchFeedDataSource.m */, - ); - name = "Data Source"; - sourceTree = ""; - }; - 6E08B4171182869700DA1579 /* Model */ = { - isa = PBXGroup; - children = ( - 6E08B42A118286DF00DA1579 /* TTFacebookSearchFeedModel.h */, - 6E08B42B118286DF00DA1579 /* TTFacebookSearchFeedModel.m */, - 6E08B4181182869700DA1579 /* Objects */, - ); - name = Model; - sourceTree = ""; - }; - 6E08B4181182869700DA1579 /* Objects */ = { - isa = PBXGroup; - children = ( - 6E08B424118286D100DA1579 /* TTFacebookPost.h */, - 6E08B425118286D100DA1579 /* TTFacebookPost.m */, - ); - name = Objects; - sourceTree = ""; - }; - 6E3792E911B7F2A40011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3792FD11B7F2A40011C497 /* libThree20Core.a */, - 6E3792FF11B7F2A40011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3792EC11B7F2A40011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37930311B7F2A40011C497 /* libThree20Network.a */, - 6E37930511B7F2A40011C497 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3792EF11B7F2A40011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37930911B7F2A40011C497 /* libThree20Style.a */, - 6E37930B11B7F2A40011C497 /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3792F211B7F2A40011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37930F11B7F2A40011C497 /* libThree20UICommon.a */, - 6E37931111B7F2A40011C497 /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3792F511B7F2A40011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37931511B7F2A40011C497 /* libThree20UINavigator.a */, - 6E37931711B7F2A40011C497 /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3792F811B7F2A40011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37931B11B7F2A40011C497 /* libThree20UI.a */, - 6E37931D11B7F2A40011C497 /* UIUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37931E11B7F2AB0011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E3792E811B7F2A40011C497 /* Three20Core.xcodeproj */, - 6E3792EB11B7F2A40011C497 /* Three20Network.xcodeproj */, - 6E3792EE11B7F2A40011C497 /* Three20Style.xcodeproj */, - 6E3792F111B7F2A40011C497 /* Three20UICommon.xcodeproj */, - 6E3792F411B7F2A40011C497 /* Three20UINavigator.xcodeproj */, - 6E3792F711B7F2A40011C497 /* Three20UI.xcodeproj */, - 6E7F97F5118E385E00443B46 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E37954F11B9B7390011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - 6E6462811187DF2C00F08CB1 /* extThree20JSON.xcodeproj */, - 6E0835FA11B4C5FF00B99C32 /* extThree20CSSStyle.xcodeproj */, - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6E5F1F88117FBE46004BEBA9 /* Atlas */ = { - isa = PBXGroup; - children = ( - 6E5F1F89117FBE4D004BEBA9 /* Atlas.h */, - 6E5F1F8A117FBE4D004BEBA9 /* Atlas.m */, - ); - name = Atlas; - sourceTree = ""; - }; - 6E5F1FA7117FC590004BEBA9 /* Controllers */ = { - isa = PBXGroup; - children = ( - 6E08B4131182869700DA1579 /* Search Feed Controller */, - ); - name = Controllers; - sourceTree = ""; - }; - 6E6462781187DEF900F08CB1 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E64627C1187DF0F00F08CB1 /* App.xcconfig */, - 6E64627D1187DF0F00F08CB1 /* Project.xcconfig */, - 6E64627E1187DF0F00F08CB1 /* RelPath.xcconfig */, - 6E64627F1187DF0F00F08CB1 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6E6462791187DEFE00F08CB1 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37931E11B7F2AB0011C497 /* Three20 */, - 6E37954F11B9B7390011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E6462821187DF2C00F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E6462881187DF2C00F08CB1 /* libextThree20JSON+SBJSON.a */, - 6E64628A1187DF2C00F08CB1 /* libextThree20JSON+YAJL.a */, - 6E64628C1187DF2C00F08CB1 /* extJSONUnitTests+SBJSON.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E7F97F6118E385E00443B46 /* Products */ = { - isa = PBXGroup; - children = ( - 6E7F981A118E385E00443B46 /* libThree20.a */, - 6E7F981C118E385E00443B46 /* Three20UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTFacebook */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTFacebook" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E7F9826118E386800443B46 /* PBXTargetDependency */, - 6E64628F1187E0EC00F08CB1 /* PBXTargetDependency */, - 6E08360D11B4C60B00B99C32 /* PBXTargetDependency */, - 6E37933911B7F2D20011C497 /* PBXTargetDependency */, - 6E37933B11B7F2D20011C497 /* PBXTargetDependency */, - 6E37933D11B7F2D20011C497 /* PBXTargetDependency */, - 6E37933F11B7F2D20011C497 /* PBXTargetDependency */, - 6E37934111B7F2D20011C497 /* PBXTargetDependency */, - 6E37934311B7F2D20011C497 /* PBXTargetDependency */, - ); - name = TTFacebook; - productName = TTFacebook; - productReference = 1D6058910D05DD3D006BFB54 /* TTFacebook.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTFacebook" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E0835FB11B4C5FF00B99C32 /* Products */; - ProjectRef = 6E0835FA11B4C5FF00B99C32 /* extThree20CSSStyle.xcodeproj */; - }, - { - ProductGroup = 6E6462821187DF2C00F08CB1 /* Products */; - ProjectRef = 6E6462811187DF2C00F08CB1 /* extThree20JSON.xcodeproj */; - }, - { - ProductGroup = 6E7F97F6118E385E00443B46 /* Products */; - ProjectRef = 6E7F97F5118E385E00443B46 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E3792E911B7F2A40011C497 /* Products */; - ProjectRef = 6E3792E811B7F2A40011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E3792EC11B7F2A40011C497 /* Products */; - ProjectRef = 6E3792EB11B7F2A40011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E3792EF11B7F2A40011C497 /* Products */; - ProjectRef = 6E3792EE11B7F2A40011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E3792F811B7F2A40011C497 /* Products */; - ProjectRef = 6E3792F711B7F2A40011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E3792F211B7F2A40011C497 /* Products */; - ProjectRef = 6E3792F111B7F2A40011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E3792F511B7F2A40011C497 /* Products */; - ProjectRef = 6E3792F411B7F2A40011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTFacebook */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E08360011B4C5FF00B99C32 /* libextThree20CSSStyle.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libextThree20CSSStyle.a; - remoteRef = 6E0835FF11B4C5FF00B99C32 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E08360211B4C5FF00B99C32 /* extCSSStyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = extCSSStyleUnitTests.octest; - remoteRef = 6E08360111B4C5FF00B99C32 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3792FD11B7F2A40011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E3792FC11B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3792FF11B7F2A40011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E3792FE11B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37930311B7F2A40011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37930211B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37930511B7F2A40011C497 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E37930411B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37930911B7F2A40011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E37930811B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37930B11B7F2A40011C497 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E37930A11B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37930F11B7F2A40011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E37930E11B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37931111B7F2A40011C497 /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6E37931011B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37931511B7F2A40011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E37931411B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37931711B7F2A40011C497 /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6E37931611B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37931B11B7F2A40011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E37931A11B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37931D11B7F2A40011C497 /* UIUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UIUnitTests.octest; - remoteRef = 6E37931C11B7F2A40011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6462881187DF2C00F08CB1 /* libextThree20JSON+SBJSON.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libextThree20JSON+SBJSON.a"; - remoteRef = 6E6462871187DF2C00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E64628A1187DF2C00F08CB1 /* libextThree20JSON+YAJL.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libextThree20JSON+YAJL.a"; - remoteRef = 6E6462891187DF2C00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E64628C1187DF2C00F08CB1 /* extJSONUnitTests+SBJSON.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "extJSONUnitTests+SBJSON.octest"; - remoteRef = 6E64628B1187DF2C00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7F981A118E385E00443B46 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6E7F9819118E385E00443B46 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7F981C118E385E00443B46 /* Three20UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = Three20UnitTests.octest; - remoteRef = 6E7F981B118E385E00443B46 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E5F1F2F117FB4D9004BEBA9 /* Three20.bundle in Resources */, - 6E08B48E118288A300DA1579 /* Default.png in Resources */, - 6E08B48F118288A300DA1579 /* Icon.png in Resources */, - 6E08361111B4C63400B99C32 /* extThree20CSSStyle.bundle in Resources */, - 6E08373211B4D18D00B99C32 /* stylesheet.css in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 6E5F1F8B117FBE4D004BEBA9 /* Atlas.m in Sources */, - 6E08B426118286D100DA1579 /* TTFacebookPost.m in Sources */, - 6E08B429118286D900DA1579 /* TTFacebookSearchFeedDataSource.m in Sources */, - 6E08B42C118286DF00DA1579 /* TTFacebookSearchFeedModel.m in Sources */, - 6E08B42F118286E700DA1579 /* TTFacebookSearchFeedViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E08360D11B4C60B00B99C32 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = extThree20CSSStyle; - targetProxy = 6E08360C11B4C60B00B99C32 /* PBXContainerItemProxy */; - }; - 6E37933911B7F2D20011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E37933811B7F2D20011C497 /* PBXContainerItemProxy */; - }; - 6E37933B11B7F2D20011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E37933A11B7F2D20011C497 /* PBXContainerItemProxy */; - }; - 6E37933D11B7F2D20011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E37933C11B7F2D20011C497 /* PBXContainerItemProxy */; - }; - 6E37933F11B7F2D20011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E37933E11B7F2D20011C497 /* PBXContainerItemProxy */; - }; - 6E37934111B7F2D20011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E37934011B7F2D20011C497 /* PBXContainerItemProxy */; - }; - 6E37934311B7F2D20011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E37934211B7F2D20011C497 /* PBXContainerItemProxy */; - }; - 6E64628F1187E0EC00F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "extThree20JSON+YAJL"; - targetProxy = 6E64628E1187E0EC00F08CB1 /* PBXContainerItemProxy */; - }; - 6E7F9826118E386800443B46 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6E7F9825118E386800443B46 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64627C1187DF0F00F08CB1 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64627C1187DF0F00F08CB1 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64627D1187DF0F00F08CB1 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64627D1187DF0F00F08CB1 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTFacebook" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTFacebook" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/TTFacebook/main.m b/samples/TTFacebook/main.m deleted file mode 100644 index 1cefab29fe..0000000000 --- a/samples/TTFacebook/main.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/samples/TTNavigatorDemo/Classes/AppDelegate.h b/samples/TTNavigatorDemo/Classes/AppDelegate.h deleted file mode 100644 index f43a5b71ac..0000000000 --- a/samples/TTNavigatorDemo/Classes/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -@interface AppDelegate : NSObject - -@end - diff --git a/samples/TTNavigatorDemo/Classes/AppDelegate.m b/samples/TTNavigatorDemo/Classes/AppDelegate.m deleted file mode 100644 index 470392de2a..0000000000 --- a/samples/TTNavigatorDemo/Classes/AppDelegate.m +++ /dev/null @@ -1,89 +0,0 @@ -#import "AppDelegate.h" -#import "TabBarController.h" -#import "MenuController.h" -#import "ContentController.h" - -@implementation AppDelegate - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIApplicationDelegate - -- (void)applicationDidFinishLaunching:(UIApplication*)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - navigator.window = [[[UIWindow alloc] initWithFrame:TTScreenBounds()] autorelease]; - - TTURLMap* map = navigator.URLMap; - - // Any URL that doesn't match will fall back on this one, and open in the web browser - [map from:@"*" toViewController:[TTWebController class]]; - - // The tab bar controller is shared, meaning there will only ever be one created. Loading - // This URL will make the existing tab bar controller appear if it was not visible. - [map from:@"tt://tabBar" toSharedViewController:[TabBarController class]]; - - // Menu controllers are also shared - we only create one to show in each tab, so opening - // these URLs will switch to the tab containing the menu - [map from:@"tt://menu/(initWithMenu:)" toSharedViewController:[MenuController class]]; - - // A new food controllers will be created each time you open a food URL - [map from:@"tt://food/(initWithFood:)" toViewController:[ContentController class]]; - - // By specifying the parent URL, we are saying that the tab containing menu #5 will be - // selected before opening this URL, ensuring that about controllers are only pushed - // inside the tab containing the about menu - [map from:@"tt://about/(initWithAbout:)" parent:@"tt://menu/5" - toViewController:[ContentController class] selector:nil transition:0]; - - // This is an example of how to use a transition. Opening the nutrition page will do a flip - [map from:@"tt://food/(initWithNutrition:)/nutrition" toViewController:[ContentController class] - transition:UIViewAnimationTransitionFlipFromLeft]; - - // The ordering controller will appear as a modal view controller, animated from bottom to top - [map from:@"tt://order?waitress=(initWithWaitress:)" - toModalViewController:[ContentController class]]; - - // This is a hash URL - it will simply invoke the method orderAction: on the order controller, - // and it will open the order controller first if it was not already visible - [map from:@"tt://order?waitress=()#(orderAction:)" toViewController:[ContentController class]]; - - // This will show the post controller to prompt to type in their order - [map from:@"tt://order/food" toViewController:[TTPostController class]]; - - // This will call the confirmOrder method on this app delegate and ask it to return a - // view controller to be opened. In this case, it will return an alert view controller. - // This kind of URL mapping gives you the chance to configure your controller before - // it is opened. - [map from:@"tt://order/confirm" toViewController:self selector:@selector(confirmOrder)]; - - // This will simply call the sendOrder method on this app delegate - [map from:@"tt://order/send" toObject:self selector:@selector(sendOrder)]; - - // Before opening the tab bar, we see if the controller history was persisted the last time - if (![navigator restoreViewControllers]) { - // This is the first launch, so we just start with the tab bar - [navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://tabBar"]]; - } -} - -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -- (UIViewController*)confirmOrder { - TTAlertViewController* alert = [[[TTAlertViewController alloc] - initWithTitle:@"Are you sure?" - message:@"Sure you want to order?"] autorelease]; - [alert addButtonWithTitle:@"Yes" URL:@"tt://order/send"]; - [alert addCancelButtonWithTitle:@"No" URL:nil]; - return alert; -} - -- (void)sendOrder { - TTDINFO(@"SENDING THE ORDER..."); -} - -@end diff --git a/samples/TTNavigatorDemo/Classes/ContentController.h b/samples/TTNavigatorDemo/Classes/ContentController.h deleted file mode 100644 index 67eae4ecd4..0000000000 --- a/samples/TTNavigatorDemo/Classes/ContentController.h +++ /dev/null @@ -1,20 +0,0 @@ -#import - -typedef enum { - ContentTypeNone, - ContentTypeFood, - ContentTypeNutrition, - ContentTypeAbout, - ContentTypeOrder, -} ContentType; - -@interface ContentController : TTViewController { - ContentType _contentType; - NSString* _content; - NSString* _text; -} - -@property(nonatomic,copy) NSString* content; -@property(nonatomic,copy) NSString* text; - -@end diff --git a/samples/TTNavigatorDemo/Classes/ContentController.m b/samples/TTNavigatorDemo/Classes/ContentController.m deleted file mode 100644 index 292cf08d08..0000000000 --- a/samples/TTNavigatorDemo/Classes/ContentController.m +++ /dev/null @@ -1,136 +0,0 @@ -#import "ContentController.h" - - -@implementation ContentController - -@synthesize content = _content, text = _text; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (void)dismiss { - [self dismissModalViewControllerAnimated:YES]; -} - -- (void)orderAction:(NSString*)action { - TTDINFO(@"ACTION: %@", action); -} - -- (void)showNutrition { - TTOpenURL([NSString stringWithFormat:@"tt://food/%@/nutrition", self.content]); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithWaitress:(NSString*)waitress query:(NSDictionary*)query { - if (self = [super init]) { - _contentType = ContentTypeOrder; - self.content = waitress; - self.text = [NSString stringWithFormat:@"Hi, I'm %@, your imaginary waitress.", waitress]; - - self.title = @"Place Your Order"; - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] - initWithTitle:@"Order" style:UIBarButtonItemStyleDone - target:@"tt://order/confirm" action:@selector(openURL)] autorelease]; - self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] - initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered - target:self action:@selector(dismiss)] autorelease]; - - TTDINFO(@"ORDER REFERRED FROM %@", [query objectForKey:@"ref"]); - } - return self; -} - -- (id)initWithFood:(NSString*)food { - if (self = [super init]) { - _contentType = ContentTypeFood; - self.content = food; - self.text = [NSString stringWithFormat:@"%@ is just food, ya know?", food]; - - self.title = food; - self.navigationItem.rightBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle:@"Nutrition" style:UIBarButtonItemStyleBordered - target:self action:@selector(showNutrition)] autorelease]; - } - return self; -} - -- (id)initWithNutrition:(NSString*)food { - if (self = [super init]) { - _contentType = ContentTypeNutrition; - self.content = food; - self.text = [NSString stringWithFormat:@"%@ is healthy. Trust us.", food]; - - self.title = @"Nutritional Info"; - } - return self; -} - -- (id)initWithAbout:(NSString*)about { - if (self = [super init]) { - _contentType = ContentTypeAbout; - self.content = about; - self.text = [NSString stringWithFormat:@"%@ is the name of this page. Exciting.", about]; - - if ([about isEqualToString:@"story"]) { - self.title = @"Our Story"; - } else if ([about isEqualToString:@"complaints"]) { - self.title = @"Complaints Dept."; - } - } - return self; -} - -- (id)init { - if (self = [super init]) { - _contentType = ContentTypeNone; - _content = nil; - _text = nil; - } - return self; -} - -- (void)dealloc { - TT_RELEASE_SAFELY(_content); - TT_RELEASE_SAFELY(_text); - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)loadView { - [super loadView]; - - CGRect frame = CGRectMake(10, 10, self.view.width-20, 100); - TTStyledTextLabel* label = [[[TTStyledTextLabel alloc] initWithFrame:frame] autorelease]; - label.tag = 42; - label.font = [UIFont systemFontOfSize:22]; - [self.view addSubview:label]; - - if (_contentType == ContentTypeNutrition) { - self.view.backgroundColor = [UIColor grayColor]; - label.backgroundColor = self.view.backgroundColor; - self.hidesBottomBarWhenPushed = YES; - } else if (_contentType == ContentTypeAbout) { - self.view.backgroundColor = [UIColor grayColor]; - label.backgroundColor = self.view.backgroundColor; - } else if (_contentType == ContentTypeOrder) { - UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - [button setTitle:@"What do you want to eat?" forState:UIControlStateNormal]; - [button addTarget:@"tt://order/food" action:@selector(openURLFromButton:) - forControlEvents:UIControlEventTouchUpInside]; - [button sizeToFit]; - button.top = label.bottom + 20; - button.left = floor(self.view.width/2 - button.width/2); - [self.view addSubview:button]; - } -} - -- (void)viewWillAppear:(BOOL)animated { - TTStyledTextLabel* label = (TTStyledTextLabel*)[self.view viewWithTag:42]; - label.html = _text; -} - -@end diff --git a/samples/TTNavigatorDemo/Classes/MenuController.h b/samples/TTNavigatorDemo/Classes/MenuController.h deleted file mode 100644 index d8b0e630cb..0000000000 --- a/samples/TTNavigatorDemo/Classes/MenuController.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -typedef enum { - MenuPageNone, - MenuPageBreakfast, - MenuPageLunch, - MenuPageDinner, - MenuPageDessert, - MenuPageAbout, -} MenuPage; - -@interface MenuController : TTTableViewController { - MenuPage _page; -} - -@property(nonatomic) MenuPage page; - -@end diff --git a/samples/TTNavigatorDemo/Classes/MenuController.m b/samples/TTNavigatorDemo/Classes/MenuController.m deleted file mode 100644 index 300bc6ab10..0000000000 --- a/samples/TTNavigatorDemo/Classes/MenuController.m +++ /dev/null @@ -1,130 +0,0 @@ -#import "MenuController.h" - -@implementation MenuController - -@synthesize page = _page; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - -- (NSString*)nameForMenuPage:(MenuPage)page { - switch (page) { - case MenuPageBreakfast: - return @"Breakfast"; - case MenuPageLunch: - return @"Lunch"; - case MenuPageDinner: - return @"Dinner"; - case MenuPageDessert: - return @"Dessert"; - case MenuPageAbout: - return @"About"; - default: - return @""; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// NSObject - -- (id)initWithMenu:(MenuPage)page { - if (self = [super init]) { - self.page = page; - } - return self; -} - -- (id)init { - if (self = [super init]) { - _page = MenuPageNone; - } - return self; -} - -- (void)dealloc { - [super dealloc]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// TTViewController - -- (void)setPage:(MenuPage)page { - _page = page; - - self.title = [self nameForMenuPage:page]; - - UIImage* image = [UIImage imageNamed:@"tab.png"]; - self.tabBarItem = [[[UITabBarItem alloc] initWithTitle:self.title image:image tag:0] autorelease]; - - self.navigationItem.rightBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle:@"Order" style:UIBarButtonItemStyleBordered - target:@"tt://order?waitress=Betty&ref=toolbar" - action:@selector(openURLFromButton:)] autorelease]; - - if (_page == MenuPageBreakfast) { - self.dataSource = [TTSectionedDataSource dataSourceWithObjects: - @"Food", - [TTTableTextItem itemWithText:@"Porridge" URL:@"tt://food/porridge"], - [TTTableTextItem itemWithText:@"Bacon & Eggs" URL:@"tt://food/baconeggs"], - [TTTableTextItem itemWithText:@"French Toast" URL:@"tt://food/frenchtoast"], - @"Drinks", - [TTTableTextItem itemWithText:@"Coffee" URL:@"tt://food/coffee"], - [TTTableTextItem itemWithText:@"Orange Juice" URL:@"tt://food/oj"], - @"Other", - [TTTableTextItem itemWithText:@"Just Desserts" URL:@"tt://menu/4"], - [TTTableTextItem itemWithText:@"Complaints" URL:@"tt://about/complaints"], - nil]; - } else if (_page == MenuPageLunch) { - self.dataSource = [TTSectionedDataSource dataSourceWithObjects: - @"Menu", - [TTTableTextItem itemWithText:@"Mac & Cheese" URL:@"tt://food/macncheese"], - [TTTableTextItem itemWithText:@"Ham Sandwich" URL:@"tt://food/hamsam"], - [TTTableTextItem itemWithText:@"Salad" URL:@"tt://food/salad"], - @"Drinks", - [TTTableTextItem itemWithText:@"Coke" URL:@"tt://food/coke"], - [TTTableTextItem itemWithText:@"Sprite" URL:@"tt://food/sprite"], - @"Other", - [TTTableTextItem itemWithText:@"Just Desserts" URL:@"tt://menu/4"], - [TTTableTextItem itemWithText:@"Complaints" URL:@"tt://about/complaints"], - nil]; - } else if (_page == MenuPageDinner) { - self.dataSource = [TTSectionedDataSource dataSourceWithObjects: - @"Appetizers", - [TTTableTextItem itemWithText:@"Potstickers" URL:@"tt://food/potstickers"], - [TTTableTextItem itemWithText:@"Egg Rolls" URL:@"tt://food/eggrolls"], - [TTTableTextItem itemWithText:@"Buffalo Wings" URL:@"tt://food/wings"], - @"Entrees", - [TTTableTextItem itemWithText:@"Steak" URL:@"tt://food/steak"], - [TTTableTextItem itemWithText:@"Chicken Marsala" URL:@"tt://food/marsala"], - [TTTableTextItem itemWithText:@"Cobb Salad" URL:@"tt://food/cobbsalad"], - [TTTableTextItem itemWithText:@"Green Salad" URL:@"tt://food/greensalad"], - @"Drinks", - [TTTableTextItem itemWithText:@"Red Wine" URL:@"tt://food/redwine"], - [TTTableTextItem itemWithText:@"White Wine" URL:@"tt://food/whitewhine"], - [TTTableTextItem itemWithText:@"Beer" URL:@"tt://food/beer"], - [TTTableTextItem itemWithText:@"Coke" URL:@"tt://food/coke"], - [TTTableTextItem itemWithText:@"Sparkling Water" URL:@"tt://food/coke"], - @"Other", - [TTTableTextItem itemWithText:@"Just Desserts" URL:@"tt://menu/4"], - [TTTableTextItem itemWithText:@"Complaints" URL:@"tt://about/complaints"], - nil]; - } else if (_page == MenuPageDessert) { - self.dataSource = [TTSectionedDataSource dataSourceWithObjects: - @"Yum", - [TTTableTextItem itemWithText:@"Chocolate Cake" URL:@"tt://food/cake"], - [TTTableTextItem itemWithText:@"Apple Pie" URL:@"tt://food/pie"], - @"Other", - [TTTableTextItem itemWithText:@"Complaints" URL:@"tt://about/complaints"], - nil]; - } else if (_page == MenuPageAbout) { - self.dataSource = [TTListDataSource dataSourceWithObjects: - [TTTableTextItem itemWithText:@"Our Story" URL:@"tt://about/story"], - [TTTableTextItem itemWithText:@"Call Us" URL:@"tel:5555555"], - [TTTableTextItem itemWithText:@"Text Us" URL:@"sms:5555555"], - [TTTableTextItem itemWithText:@"Website" URL:@"http://www.melsdrive-in.com"], - [TTTableTextItem itemWithText:@"Complaints Dept." URL:@"tt://about/complaints"], - nil]; - } -} - -@end diff --git a/samples/TTNavigatorDemo/Classes/TabBarController.h b/samples/TTNavigatorDemo/Classes/TabBarController.h deleted file mode 100644 index 7b641b7730..0000000000 --- a/samples/TTNavigatorDemo/Classes/TabBarController.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - -@interface TabBarController : UITabBarController { -} - -@end diff --git a/samples/TTNavigatorDemo/Classes/TabBarController.m b/samples/TTNavigatorDemo/Classes/TabBarController.m deleted file mode 100644 index 96f962283f..0000000000 --- a/samples/TTNavigatorDemo/Classes/TabBarController.m +++ /dev/null @@ -1,17 +0,0 @@ -#import "TabBarController.h" - -@implementation TabBarController - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// UIViewController - -- (void)viewDidLoad { - [self setTabURLs:[NSArray arrayWithObjects:@"tt://menu/1", - @"tt://menu/2", - @"tt://menu/3", - @"tt://menu/4", - @"tt://menu/5", - nil]]; -} - -@end diff --git a/samples/TTNavigatorDemo/Configurations/App.xcconfig b/samples/TTNavigatorDemo/Configurations/App.xcconfig deleted file mode 100644 index b57ac69293..0000000000 --- a/samples/TTNavigatorDemo/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTNavigatorDemo -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/TTNavigatorDemo/Configurations/Project.xcconfig b/samples/TTNavigatorDemo/Configurations/Project.xcconfig deleted file mode 100644 index 0f02ea7f79..0000000000 --- a/samples/TTNavigatorDemo/Configurations/Project.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" diff --git a/samples/TTNavigatorDemo/Configurations/RelPath.xcconfig b/samples/TTNavigatorDemo/Configurations/RelPath.xcconfig deleted file mode 100644 index e7425443d8..0000000000 --- a/samples/TTNavigatorDemo/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../.. diff --git a/samples/TTNavigatorDemo/Configurations/UnitTests.xcconfig b/samples/TTNavigatorDemo/Configurations/UnitTests.xcconfig deleted file mode 100644 index 1a83533d91..0000000000 --- a/samples/TTNavigatorDemo/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -PRODUCT_NAME = TTNavigatorDemoUnitTests -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/TTNavigatorDemo/Headers/TTNavigatorDemo_Prefix.pch b/samples/TTNavigatorDemo/Headers/TTNavigatorDemo_Prefix.pch deleted file mode 100644 index bda778fa2d..0000000000 --- a/samples/TTNavigatorDemo/Headers/TTNavigatorDemo_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'TTNavigatorDemo' target in the 'TTNavigatorDemo' project -// - -#ifdef __OBJC__ - #import - #import - #import -#endif diff --git a/samples/TTNavigatorDemo/Info.plist b/samples/TTNavigatorDemo/Info.plist deleted file mode 100644 index 085e52f4dd..0000000000 --- a/samples/TTNavigatorDemo/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.facebook.${PRODUCT_NAME:identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/samples/TTNavigatorDemo/TTNavigatorDemo.xcodeproj/project.pbxproj b/samples/TTNavigatorDemo/TTNavigatorDemo.xcodeproj/project.pbxproj deleted file mode 100755 index b32eff97b1..0000000000 --- a/samples/TTNavigatorDemo/TTNavigatorDemo.xcodeproj/project.pbxproj +++ /dev/null @@ -1,928 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; - 28C286E10D94DF7D0034E888 /* TabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* TabBarController.m */; }; - 6E3795A611B9B7570011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37958511B9B7560011C497 /* libThree20Core.a */; }; - 6E3795A711B9B7580011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37958B11B9B7560011C497 /* libThree20Network.a */; }; - 6E3795A811B9B7580011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37959111B9B7560011C497 /* libThree20Style.a */; }; - 6E3795A911B9B7590011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3795A311B9B7560011C497 /* libThree20UI.a */; }; - 6E3795AA11B9B7590011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37959711B9B7560011C497 /* libThree20UICommon.a */; }; - 6E3795AB11B9B75A0011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37959D11B9B7560011C497 /* libThree20UINavigator.a */; }; - 6E7F990D118E398100443B46 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7F9906118E396F00443B46 /* libThree20.a */; }; - 6E94C717116D98440012B12C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C715116D98440012B12C /* Default.png */; }; - 6E94C718116D98440012B12C /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C716116D98440012B12C /* Icon.png */; }; - BE1D843A0F8D104B00EC8BB8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE1D84390F8D104B00EC8BB8 /* QuartzCore.framework */; }; - BE7DD3A31001ED5900662212 /* MenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE7DD3A21001ED5900662212 /* MenuController.m */; }; - BE7DD6131002182300662212 /* tab.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7DD6121002182300662212 /* tab.png */; }; - BE8FCAB910017846000767AD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BE8FCAB810017846000767AD /* AppDelegate.m */; }; - BEBB0E421002B93F00744230 /* ContentController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEBB0E411002B93F00744230 /* ContentController.m */; }; - BEDCFBB40F4FFF820060B7D1 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BEDCFBB30F4FFF820060B7D1 /* Three20.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 66D12A7F1274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957011B9B7560011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 6650CAA21262F6E2003FF804; - remoteInfo = "Three20Core-Xcode3.2.5"; - }; - 66D12A831274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957011B9B7560011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 664961641262EE5000C2C80E; - remoteInfo = "Three20CoreUnitTests-Xcode3.2.5"; - }; - 66D12A8C1274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957311B9B7560011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 662D81EF12630516005851C2; - remoteInfo = "Three20Network-Xcode3.2.5"; - }; - 66D12A901274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957311B9B7560011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 662D81B2126304EB005851C2; - remoteInfo = "Three20NetworkUnitTests-Xcode3.2.5"; - }; - 66D12A991274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957611B9B7560011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 66C16BE912639E2700A7825A; - remoteInfo = "Three20Style-Xcode3.2.5"; - }; - 66D12A9D1274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957611B9B7560011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 66C16C0112639E4500A7825A; - remoteInfo = "Three20StyleUnitTests-Xcode3.2.5"; - }; - 66D12AA61274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957911B9B7560011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 665A53761264D54B0032D0BE; - remoteInfo = "Three20UICommon-Xcode3.2.5"; - }; - 66D12AAA1274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957911B9B7560011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 665A53891264D54B0032D0BE; - remoteInfo = "Three20UICommonUnitTests-Xcode3.2.5"; - }; - 66D12AB31274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957C11B9B7560011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 665A54521264DAF70032D0BE; - remoteInfo = "Three20UINavigator-Xcode3.2.5"; - }; - 66D12AB71274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957C11B9B7560011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 665A54681264DAF70032D0BE; - remoteInfo = "Three20UINavigatorUnitTests-Xcode3.2.5"; - }; - 66D12AC01274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957F11B9B7560011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 66FC2BC81264E3A400F56B19; - remoteInfo = "Three20UI-Xcode3.2.5"; - }; - 66D12AC41274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957F11B9B7560011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 66FC2BE61264E3A500F56B19; - remoteInfo = "Three20UIUnitTests-Xcode3.2.5"; - }; - 66D12ACD1274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9900118E396F00443B46 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 665A55DE126521740032D0BE; - remoteInfo = "Three20-Xcode3.2.5"; - }; - 66D12AD11274CB1D00E567B4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9900118E396F00443B46 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 665A55FB126521740032D0BE; - remoteInfo = "Three20UnitTests-Xcode3.2.5"; - }; - 6E37958411B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957011B9B7560011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37958611B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957011B9B7560011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37958A11B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957311B9B7560011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37958C11B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957311B9B7560011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37959011B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957611B9B7560011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37959211B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957611B9B7560011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37959611B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957911B9B7560011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37959811B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957911B9B7560011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37959C11B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957C11B9B7560011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37959E11B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957C11B9B7560011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3795A211B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957F11B9B7560011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3795A411B9B7560011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957F11B9B7560011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3795AC11B9B7640011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957011B9B7560011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3795AE11B9B7640011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957611B9B7560011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3795B011B9B7640011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957311B9B7560011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3795B211B9B7640011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957911B9B7560011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3795B411B9B7640011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957F11B9B7560011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3795B611B9B7640011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37957C11B9B7560011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E7F9905118E396F00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9900118E396F00443B46 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6E7F9907118E396F00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9900118E396F00443B46 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E7F990B118E397B00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9900118E396F00443B46 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D6058910D05DD3D006BFB54 /* TTNavigatorDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTNavigatorDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28C286DF0D94DF7D0034E888 /* TabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TabBarController.h; sourceTree = ""; }; - 28C286E00D94DF7D0034E888 /* TabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TabBarController.m; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6E37957011B9B7560011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37957311B9B7560011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../../src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37957611B9B7560011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../../src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37957911B9B7560011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../../src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37957C11B9B7560011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../../src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37957F11B9B7560011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../../src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E7F9900118E396F00443B46 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../../src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E7F9922118E39B500443B46 /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = ""; }; - 6E7F9923118E39B500443B46 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E7F9924118E39B500443B46 /* RelPath.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = RelPath.xcconfig; path = Configurations/RelPath.xcconfig; sourceTree = ""; }; - 6E7F9925118E39B500443B46 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E7F9931118E39F300443B46 /* TTNavigatorDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigatorDemo_Prefix.pch; path = Headers/TTNavigatorDemo_Prefix.pch; sourceTree = ""; }; - 6E94C715116D98440012B12C /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E94C716116D98440012B12C /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../Resources/Icon.png; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BE1D84390F8D104B00EC8BB8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - BE7DD3A11001ED5900662212 /* MenuController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuController.h; sourceTree = ""; }; - BE7DD3A21001ED5900662212 /* MenuController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MenuController.m; sourceTree = ""; }; - BE7DD6121002182300662212 /* tab.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tab.png; sourceTree = ""; }; - BE8FCAB710017846000767AD /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - BE8FCAB810017846000767AD /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - BEBB0E401002B93F00744230 /* ContentController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentController.h; sourceTree = ""; }; - BEBB0E411002B93F00744230 /* ContentController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentController.m; sourceTree = ""; }; - BEDCFBB30F4FFF820060B7D1 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, - BE1D843A0F8D104B00EC8BB8 /* QuartzCore.framework in Frameworks */, - 6E7F990D118E398100443B46 /* libThree20.a in Frameworks */, - 6E3795A611B9B7570011C497 /* libThree20Core.a in Frameworks */, - 6E3795A711B9B7580011C497 /* libThree20Network.a in Frameworks */, - 6E3795A811B9B7580011C497 /* libThree20Style.a in Frameworks */, - 6E3795A911B9B7590011C497 /* libThree20UI.a in Frameworks */, - 6E3795AA11B9B7590011C497 /* libThree20UICommon.a in Frameworks */, - 6E3795AB11B9B75A0011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - BE8FCAB710017846000767AD /* AppDelegate.h */, - BE8FCAB810017846000767AD /* AppDelegate.m */, - 28C286DF0D94DF7D0034E888 /* TabBarController.h */, - 28C286E00D94DF7D0034E888 /* TabBarController.m */, - BE7DD3A11001ED5900662212 /* MenuController.h */, - BE7DD3A21001ED5900662212 /* MenuController.m */, - BEBB0E401002B93F00744230 /* ContentController.h */, - BEBB0E411002B93F00744230 /* ContentController.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTNavigatorDemo.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E7F9892118E38D300443B46 /* Configurations */, - 6E7F98B1118E395E00443B46 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6E7F9931118E39F300443B46 /* TTNavigatorDemo_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - BEDCFBB30F4FFF820060B7D1 /* Three20.bundle */, - 6E94C715116D98440012B12C /* Default.png */, - 6E94C716116D98440012B12C /* Icon.png */, - BE7DD6121002182300662212 /* tab.png */, - 8D1107310486CEB800E47090 /* Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - BE1D84390F8D104B00EC8BB8 /* QuartzCore.framework */, - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37957111B9B7560011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37958511B9B7560011C497 /* libThree20Core.a */, - 66D12A801274CB1D00E567B4 /* libThree20Core-Xcode3.2.5.a */, - 6E37958711B9B7560011C497 /* CoreUnitTests.octest */, - 66D12A841274CB1D00E567B4 /* CoreUnitTests-Xcode3.2.5.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37957411B9B7560011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37958B11B9B7560011C497 /* libThree20Network.a */, - 66D12A8D1274CB1D00E567B4 /* libThree20Network-Xcode3.2.5.a */, - 6E37958D11B9B7560011C497 /* NetworkUnitTests.octest */, - 66D12A911274CB1D00E567B4 /* NetworkUnitTests-Xcode3.2.5.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37957711B9B7560011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37959111B9B7560011C497 /* libThree20Style.a */, - 66D12A9A1274CB1D00E567B4 /* libThree20Style-Xcode3.2.5.a */, - 6E37959311B9B7560011C497 /* StyleUnitTests.octest */, - 66D12A9E1274CB1D00E567B4 /* StyleUnitTests-Xcode3.2.5.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37957A11B9B7560011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37959711B9B7560011C497 /* libThree20UICommon.a */, - 66D12AA71274CB1D00E567B4 /* libThree20UICommon-Xcode3.2.5.a */, - 6E37959911B9B7560011C497 /* UICommonUnitTests.octest */, - 66D12AAB1274CB1D00E567B4 /* UICommonUnitTests-Xcode3.2.5.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37957D11B9B7560011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37959D11B9B7560011C497 /* libThree20UINavigator.a */, - 66D12AB41274CB1D00E567B4 /* libThree20UINavigator-Xcode3.2.5.a */, - 6E37959F11B9B7560011C497 /* UINavigatorUnitTests.octest */, - 66D12AB81274CB1D00E567B4 /* UINavigatorUnitTests-Xcode3.2.5.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37958011B9B7560011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3795A311B9B7560011C497 /* libThree20UI.a */, - 66D12AC11274CB1D00E567B4 /* libThree20UI-Xcode3.2.5.a */, - 6E3795A511B9B7560011C497 /* UIUnitTests.octest */, - 66D12AC51274CB1D00E567B4 /* UIUnitTests-Xcode3.2.5.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E7F9892118E38D300443B46 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E7F9922118E39B500443B46 /* App.xcconfig */, - 6E7F9923118E39B500443B46 /* Project.xcconfig */, - 6E7F9924118E39B500443B46 /* RelPath.xcconfig */, - 6E7F9925118E39B500443B46 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6E7F98B1118E395E00443B46 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37957011B9B7560011C497 /* Three20Core.xcodeproj */, - 6E37957311B9B7560011C497 /* Three20Network.xcodeproj */, - 6E37957611B9B7560011C497 /* Three20Style.xcodeproj */, - 6E37957911B9B7560011C497 /* Three20UICommon.xcodeproj */, - 6E37957C11B9B7560011C497 /* Three20UINavigator.xcodeproj */, - 6E37957F11B9B7560011C497 /* Three20UI.xcodeproj */, - 6E7F9900118E396F00443B46 /* Three20.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E7F9901118E396F00443B46 /* Products */ = { - isa = PBXGroup; - children = ( - 6E7F9906118E396F00443B46 /* libThree20.a */, - 66D12ACE1274CB1D00E567B4 /* libThree20-Xcode3.2.5.a */, - 6E7F9908118E396F00443B46 /* Three20UnitTests.octest */, - 66D12AD21274CB1D00E567B4 /* Three20UnitTests-Xcode3.2.5.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTNavigatorDemo */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTNavigatorDemo" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E7F990C118E397B00443B46 /* PBXTargetDependency */, - 6E3795AD11B9B7640011C497 /* PBXTargetDependency */, - 6E3795AF11B9B7640011C497 /* PBXTargetDependency */, - 6E3795B111B9B7640011C497 /* PBXTargetDependency */, - 6E3795B311B9B7640011C497 /* PBXTargetDependency */, - 6E3795B511B9B7640011C497 /* PBXTargetDependency */, - 6E3795B711B9B7640011C497 /* PBXTargetDependency */, - ); - name = TTNavigatorDemo; - productName = PhotoBrowser; - productReference = 1D6058910D05DD3D006BFB54 /* TTNavigatorDemo.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTNavigatorDemo" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - en, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E7F9901118E396F00443B46 /* Products */; - ProjectRef = 6E7F9900118E396F00443B46 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37957111B9B7560011C497 /* Products */; - ProjectRef = 6E37957011B9B7560011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37957411B9B7560011C497 /* Products */; - ProjectRef = 6E37957311B9B7560011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37957711B9B7560011C497 /* Products */; - ProjectRef = 6E37957611B9B7560011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37958011B9B7560011C497 /* Products */; - ProjectRef = 6E37957F11B9B7560011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37957A11B9B7560011C497 /* Products */; - ProjectRef = 6E37957911B9B7560011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37957D11B9B7560011C497 /* Products */; - ProjectRef = 6E37957C11B9B7560011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTNavigatorDemo */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 66D12A801274CB1D00E567B4 /* libThree20Core-Xcode3.2.5.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libThree20Core-Xcode3.2.5.a"; - remoteRef = 66D12A7F1274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12A841274CB1D00E567B4 /* CoreUnitTests-Xcode3.2.5.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "CoreUnitTests-Xcode3.2.5.octest"; - remoteRef = 66D12A831274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12A8D1274CB1D00E567B4 /* libThree20Network-Xcode3.2.5.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libThree20Network-Xcode3.2.5.a"; - remoteRef = 66D12A8C1274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12A911274CB1D00E567B4 /* NetworkUnitTests-Xcode3.2.5.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "NetworkUnitTests-Xcode3.2.5.octest"; - remoteRef = 66D12A901274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12A9A1274CB1D00E567B4 /* libThree20Style-Xcode3.2.5.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libThree20Style-Xcode3.2.5.a"; - remoteRef = 66D12A991274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12A9E1274CB1D00E567B4 /* StyleUnitTests-Xcode3.2.5.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "StyleUnitTests-Xcode3.2.5.octest"; - remoteRef = 66D12A9D1274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12AA71274CB1D00E567B4 /* libThree20UICommon-Xcode3.2.5.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libThree20UICommon-Xcode3.2.5.a"; - remoteRef = 66D12AA61274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12AAB1274CB1D00E567B4 /* UICommonUnitTests-Xcode3.2.5.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "UICommonUnitTests-Xcode3.2.5.octest"; - remoteRef = 66D12AAA1274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12AB41274CB1D00E567B4 /* libThree20UINavigator-Xcode3.2.5.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libThree20UINavigator-Xcode3.2.5.a"; - remoteRef = 66D12AB31274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12AB81274CB1D00E567B4 /* UINavigatorUnitTests-Xcode3.2.5.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "UINavigatorUnitTests-Xcode3.2.5.octest"; - remoteRef = 66D12AB71274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12AC11274CB1D00E567B4 /* libThree20UI-Xcode3.2.5.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libThree20UI-Xcode3.2.5.a"; - remoteRef = 66D12AC01274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12AC51274CB1D00E567B4 /* UIUnitTests-Xcode3.2.5.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "UIUnitTests-Xcode3.2.5.octest"; - remoteRef = 66D12AC41274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12ACE1274CB1D00E567B4 /* libThree20-Xcode3.2.5.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libThree20-Xcode3.2.5.a"; - remoteRef = 66D12ACD1274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 66D12AD21274CB1D00E567B4 /* Three20UnitTests-Xcode3.2.5.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "Three20UnitTests-Xcode3.2.5.octest"; - remoteRef = 66D12AD11274CB1D00E567B4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37958511B9B7560011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37958411B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37958711B9B7560011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37958611B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37958B11B9B7560011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37958A11B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37958D11B9B7560011C497 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E37958C11B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37959111B9B7560011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E37959011B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37959311B9B7560011C497 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E37959211B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37959711B9B7560011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E37959611B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37959911B9B7560011C497 /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6E37959811B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37959D11B9B7560011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E37959C11B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37959F11B9B7560011C497 /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6E37959E11B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3795A311B9B7560011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E3795A211B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3795A511B9B7560011C497 /* UIUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UIUnitTests.octest; - remoteRef = 6E3795A411B9B7560011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7F9906118E396F00443B46 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6E7F9905118E396F00443B46 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7F9908118E396F00443B46 /* Three20UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = Three20UnitTests.octest; - remoteRef = 6E7F9907118E396F00443B46 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BEDCFBB40F4FFF820060B7D1 /* Three20.bundle in Resources */, - BE7DD6131002182300662212 /* tab.png in Resources */, - 6E94C717116D98440012B12C /* Default.png in Resources */, - 6E94C718116D98440012B12C /* Icon.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 28C286E10D94DF7D0034E888 /* TabBarController.m in Sources */, - BE8FCAB910017846000767AD /* AppDelegate.m in Sources */, - BE7DD3A31001ED5900662212 /* MenuController.m in Sources */, - BEBB0E421002B93F00744230 /* ContentController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E3795AD11B9B7640011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E3795AC11B9B7640011C497 /* PBXContainerItemProxy */; - }; - 6E3795AF11B9B7640011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E3795AE11B9B7640011C497 /* PBXContainerItemProxy */; - }; - 6E3795B111B9B7640011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E3795B011B9B7640011C497 /* PBXContainerItemProxy */; - }; - 6E3795B311B9B7640011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E3795B211B9B7640011C497 /* PBXContainerItemProxy */; - }; - 6E3795B511B9B7640011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3795B411B9B7640011C497 /* PBXContainerItemProxy */; - }; - 6E3795B711B9B7640011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E3795B611B9B7640011C497 /* PBXContainerItemProxy */; - }; - 6E7F990C118E397B00443B46 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6E7F990B118E397B00443B46 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E7F9922118E39B500443B46 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - INFOPLIST_FILE = Info.plist; - SDKROOT = iphoneos4.1; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E7F9922118E39B500443B46 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - INFOPLIST_FILE = Info.plist; - SDKROOT = iphoneos4.1; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E7F9923118E39B500443B46 /* Project.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E7F9923118E39B500443B46 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - "PROVISIONING_PROFILE[sdk=iphoneos*]" = DefaultProfileUuid; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTNavigatorDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTNavigatorDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/TTNavigatorDemo/main.m b/samples/TTNavigatorDemo/main.m deleted file mode 100644 index f50efbc54e..0000000000 --- a/samples/TTNavigatorDemo/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import - -int main(int argc, char *argv[]) { - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/samples/TTNavigatorDemo/tab.png b/samples/TTNavigatorDemo/tab.png deleted file mode 100644 index 9cec1d2862..0000000000 Binary files a/samples/TTNavigatorDemo/tab.png and /dev/null differ diff --git a/samples/TTTwitter/Classes/AppDelegate.h b/samples/TTTwitter/Classes/AppDelegate.h deleted file mode 100644 index 1a81bc5da2..0000000000 --- a/samples/TTTwitter/Classes/AppDelegate.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { -} - -@end - diff --git a/samples/TTTwitter/Classes/AppDelegate.m b/samples/TTTwitter/Classes/AppDelegate.m deleted file mode 100644 index 7240200cb6..0000000000 --- a/samples/TTTwitter/Classes/AppDelegate.m +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "AppDelegate.h" - -// Controllers -#import "TTTwitterSearchFeedViewController.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeNone; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - [map from:kAppRootURLPath toViewController:[TTTwitterSearchFeedViewController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:kAppRootURLPath]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/samples/TTTwitter/Classes/Atlas.h b/samples/TTTwitter/Classes/Atlas.h deleted file mode 100644 index 93a059d460..0000000000 --- a/samples/TTTwitter/Classes/Atlas.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -extern NSString* kAppRootURLPath; diff --git a/samples/TTTwitter/Classes/Atlas.m b/samples/TTTwitter/Classes/Atlas.m deleted file mode 100644 index f40b1da198..0000000000 --- a/samples/TTTwitter/Classes/Atlas.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Atlas.h" - -NSString* kAppRootURLPath = @"tt://root"; diff --git a/samples/TTTwitter/Classes/TTTwitterSearchFeedDataSource.h b/samples/TTTwitter/Classes/TTTwitterSearchFeedDataSource.h deleted file mode 100644 index a43ca385b6..0000000000 --- a/samples/TTTwitter/Classes/TTTwitterSearchFeedDataSource.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@class TTTwitterSearchFeedModel; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTTwitterSearchFeedDataSource : TTListDataSource { - TTTwitterSearchFeedModel* _searchFeedModel; -} - -- (id)initWithSearchQuery:(NSString*)searchQuery; - -@end diff --git a/samples/TTTwitter/Classes/TTTwitterSearchFeedDataSource.m b/samples/TTTwitter/Classes/TTTwitterSearchFeedDataSource.m deleted file mode 100644 index fa7a1b42ba..0000000000 --- a/samples/TTTwitter/Classes/TTTwitterSearchFeedDataSource.m +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTTwitterSearchFeedDataSource.h" - -#import "TTTwitterSearchFeedModel.h" -#import "TTTwitterTweet.h" - -// Three20 Additions -#import - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTwitterSearchFeedDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithSearchQuery:(NSString*)searchQuery { - if (self = [super init]) { - _searchFeedModel = [[TTTwitterSearchFeedModel alloc] initWithSearchQuery:searchQuery]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_searchFeedModel); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)model { - return _searchFeedModel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tableViewDidLoadModel:(UITableView*)tableView { - NSMutableArray* items = [[NSMutableArray alloc] init]; - - for (TTTwitterTweet* tweet in _searchFeedModel.tweets) { - //TTDPRINT(@"Response text: %@", response.text); - TTStyledText* styledText = [TTStyledText textFromXHTML: - [NSString stringWithFormat:@"%@\n%@", - [[tweet.text stringByReplacingOccurrencesOfString:@"&" - withString:@"&"] - stringByReplacingOccurrencesOfString:@"<" - withString:@"<"], - [tweet.created formatRelativeTime]] - lineBreaks:YES URLs:YES]; - // If this asserts, it's likely that the tweet.text contains an HTML character that caused - // the XML parser to fail. - TTDASSERT(nil != styledText); - [items addObject:[TTTableStyledTextItem itemWithText:styledText]]; - } - - if (!_searchFeedModel.finished) { - [items addObject:[TTTableMoreButton itemWithText:@"more…"]]; - } - - self.items = items; - TT_RELEASE_SAFELY(items); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForLoading:(BOOL)reloading { - if (reloading) { - return NSLocalizedString(@"Updating Twitter feed...", @"Twitter feed updating text"); - } else { - return NSLocalizedString(@"Loading Twitter feed...", @"Twitter feed loading text"); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForEmpty { - return NSLocalizedString(@"No tweets found.", @"Twitter feed no results"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)subtitleForError:(NSError*)error { - return NSLocalizedString(@"Sorry, there was an error loading the Twitter stream.", @""); -} - - -@end - diff --git a/samples/TTTwitter/Classes/TTTwitterSearchFeedModel.h b/samples/TTTwitter/Classes/TTTwitterSearchFeedModel.h deleted file mode 100644 index fc3ca22a4c..0000000000 --- a/samples/TTTwitter/Classes/TTTwitterSearchFeedModel.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTTwitterSearchFeedModel : TTURLRequestModel { - NSString* _searchQuery; - - NSMutableArray* _tweets; - - NSUInteger _page; // page of search request - NSUInteger _resultsPerPage; // results per page, once the initial query is made - // this value shouldn't be changed - BOOL _finished; -} - -@property (nonatomic, copy) NSString* searchQuery; -@property (nonatomic, readonly) NSMutableArray* tweets; -@property (nonatomic, assign) NSUInteger resultsPerPage; -@property (nonatomic, readonly) BOOL finished; - -- (id)initWithSearchQuery:(NSString*)searchQuery; - -@end diff --git a/samples/TTTwitter/Classes/TTTwitterSearchFeedModel.m b/samples/TTTwitter/Classes/TTTwitterSearchFeedModel.m deleted file mode 100644 index f27b0865f0..0000000000 --- a/samples/TTTwitter/Classes/TTTwitterSearchFeedModel.m +++ /dev/null @@ -1,129 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTTwitterSearchFeedModel.h" - -#import "TTTwitterTweet.h" - -#import - -// Twitter search API documented here: -// http://apiwiki.twitter.com/w/page/22554756/Twitter-Search-API-Method:-search -static NSString* kTwitterSearchFeedFormat = - @"http://search.twitter.com/search.json?q=%@&rpp=%u&page=%u"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTwitterSearchFeedModel - -@synthesize searchQuery = _searchQuery; -@synthesize tweets = _tweets; -@synthesize resultsPerPage = _resultsPerPage; -@synthesize finished = _finished; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithSearchQuery:(NSString*)searchQuery { - if (self = [super init]) { - self.searchQuery = searchQuery; - _resultsPerPage = 10; - _page = 1; - _tweets = [[NSMutableArray array] retain]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) dealloc { - TT_RELEASE_SAFELY(_searchQuery); - TT_RELEASE_SAFELY(_tweets); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { - if (!self.isLoading && TTIsStringWithAnyText(_searchQuery)) { - if (more) { - _page++; - } - else { - _page = 1; - _finished = NO; - [_tweets removeAllObjects]; - } - - NSString* url = [NSString stringWithFormat:kTwitterSearchFeedFormat, _searchQuery, _resultsPerPage, _page]; - - TTURLRequest* request = [TTURLRequest - requestWithURL: url - delegate: self]; - - request.cachePolicy = cachePolicy; - request.cacheExpirationAge = TT_CACHE_EXPIRATION_AGE_NEVER; - - TTURLJSONResponse* response = [[TTURLJSONResponse alloc] init]; - request.response = response; - TT_RELEASE_SAFELY(response); - - [request send]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidFinishLoad:(TTURLRequest*)request { - TTURLJSONResponse* response = request.response; - TTDASSERT([response.rootObject isKindOfClass:[NSDictionary class]]); - - NSDictionary* feed = response.rootObject; - TTDASSERT([[feed objectForKey:@"results"] isKindOfClass:[NSArray class]]); - - NSArray* entries = [feed objectForKey:@"results"]; - - NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setTimeStyle:NSDateFormatterFullStyle]; - [dateFormatter setDateFormat:@"EEE, dd MMMM yyyy HH:mm:ss ZZ"]; - - NSMutableArray* tweets = [NSMutableArray arrayWithCapacity:[entries count]]; - - for (NSDictionary* entry in entries) { - TTTwitterTweet* tweet = [[TTTwitterTweet alloc] init]; - - NSDate* date = [dateFormatter dateFromString:[entry objectForKey:@"created_at"]]; - tweet.created = date; - tweet.tweetId = [NSNumber numberWithLongLong: - [[entry objectForKey:@"id"] longLongValue]]; - tweet.text = [entry objectForKey:@"text"]; - tweet.source = [entry objectForKey:@"source"]; - - [tweets addObject:tweet]; - TT_RELEASE_SAFELY(tweet); - } - _finished = tweets.count < _resultsPerPage; - [_tweets addObjectsFromArray: tweets]; - - TT_RELEASE_SAFELY(dateFormatter); - - [super requestDidFinishLoad:request]; -} - - -@end - diff --git a/samples/TTTwitter/Classes/TTTwitterSearchFeedViewController.h b/samples/TTTwitter/Classes/TTTwitterSearchFeedViewController.h deleted file mode 100644 index 6460a281e1..0000000000 --- a/samples/TTTwitter/Classes/TTTwitterSearchFeedViewController.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTTwitterSearchFeedViewController : TTTableViewController { - -} - -@end diff --git a/samples/TTTwitter/Classes/TTTwitterSearchFeedViewController.m b/samples/TTTwitter/Classes/TTTwitterSearchFeedViewController.m deleted file mode 100644 index 20d3577df1..0000000000 --- a/samples/TTTwitter/Classes/TTTwitterSearchFeedViewController.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTTwitterSearchFeedViewController.h" - -#import "TTTwitterSearchFeedDataSource.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTwitterSearchFeedViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.title = @"Twitter feed"; - self.variableHeightRows = YES; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createModel { - self.dataSource = [[[TTTwitterSearchFeedDataSource alloc] - initWithSearchQuery:@"three20"] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)createDelegate { - return [[[TTTableViewDragRefreshDelegate alloc] initWithController:self] autorelease]; -} - - -@end - diff --git a/samples/TTTwitter/Classes/TTTwitterTweet.h b/samples/TTTwitter/Classes/TTTwitterTweet.h deleted file mode 100644 index 829db37fae..0000000000 --- a/samples/TTTwitter/Classes/TTTwitterTweet.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface TTTwitterTweet : NSObject { - NSDate* _created; - NSNumber* _tweetId; - NSString* _text; - NSString* _source; -} - -@property (nonatomic, retain) NSDate* created; -@property (nonatomic, retain) NSNumber* tweetId; -@property (nonatomic, copy) NSString* text; -@property (nonatomic, copy) NSString* source; - -@end diff --git a/samples/TTTwitter/Classes/TTTwitterTweet.m b/samples/TTTwitter/Classes/TTTwitterTweet.m deleted file mode 100644 index d07cc7b2c8..0000000000 --- a/samples/TTTwitter/Classes/TTTwitterTweet.m +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTTwitterTweet.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTwitterTweet - -@synthesize created = _created; -@synthesize tweetId = _tweetId; -@synthesize text = _text; -@synthesize source = _source; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) dealloc { - TT_RELEASE_SAFELY(_created); - TT_RELEASE_SAFELY(_tweetId); - TT_RELEASE_SAFELY(_text); - TT_RELEASE_SAFELY(_source); - [super dealloc]; -} - - -@end diff --git a/samples/TTTwitter/Configurations/App.xcconfig b/samples/TTTwitter/Configurations/App.xcconfig deleted file mode 100644 index 8785da6916..0000000000 --- a/samples/TTTwitter/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTTwitter -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/TTTwitter/Configurations/Project.xcconfig b/samples/TTTwitter/Configurations/Project.xcconfig deleted file mode 100644 index fc1966a5f7..0000000000 --- a/samples/TTTwitter/Configurations/Project.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" diff --git a/samples/TTTwitter/Configurations/RelPath.xcconfig b/samples/TTTwitter/Configurations/RelPath.xcconfig deleted file mode 100644 index d6d201d36a..0000000000 --- a/samples/TTTwitter/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../.. diff --git a/samples/TTTwitter/Configurations/UnitTests.xcconfig b/samples/TTTwitter/Configurations/UnitTests.xcconfig deleted file mode 100644 index 22f4ab0e7f..0000000000 --- a/samples/TTTwitter/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -PRODUCT_NAME = TTTwitterUnitTests -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/TTTwitter/Headers/TTTwitter_Prefix.pch b/samples/TTTwitter/Headers/TTTwitter_Prefix.pch deleted file mode 100644 index 3a694221ff..0000000000 --- a/samples/TTTwitter/Headers/TTTwitter_Prefix.pch +++ /dev/null @@ -1,10 +0,0 @@ -// -// Prefix header for all source files of the 'TTTwitter' target in the 'TTTwitter' project -// - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" - #import "Atlas.h" -#endif diff --git a/samples/TTTwitter/Icon.png b/samples/TTTwitter/Icon.png deleted file mode 100644 index 7dc1cdeea4..0000000000 Binary files a/samples/TTTwitter/Icon.png and /dev/null differ diff --git a/samples/TTTwitter/README.mdown b/samples/TTTwitter/README.mdown deleted file mode 100644 index 1914817ec1..0000000000 --- a/samples/TTTwitter/README.mdown +++ /dev/null @@ -1,60 +0,0 @@ - -TTTwitter Example Project -========================= - -Version: 1.0 - -Created by: Jeff Verkoeyen (github.com/jverkoey && @featherless) - -Three20 technologies used: - -* TTNavigator - AppDelegate.m -* TTTableViewController - TTTwitterSearchFeedViewController.m -* TTTableViewDragRefreshDelegate - TTTwitterSearchFeedViewController.m -* TTURLRequestModel - TTTwitterSearchFeedModel.h/m -* TTURLRequest - TTTwitterSearchFeedModel.m -* TTURLXMLResponse - TTTwitterSearchFeedModel.m -* TTListDataSource - TTTwitterSearchFeedDataSource.h/m -* TTStyledText - TTTwitterSearchFeedDataSource.m -* TTTableStyledTextItem - TTTwitterSearchFeedDataSource.m - -Overview --------- - -The Twitter example project covers the basics of building a native feed-based iPhone application. -This app pulls data from the search.twitter.com feed with the query "three20" and displays the -result in a table view. - -Cool features -------------- - -Drag-to-refresh header, as seen in other apps. Simply pull down on the table view to refresh the -feed. Thanks to uprise78 for this great addition to the Three20 library! - -Architecture ------------- - -Atlas.h/m - This is where all of the app's navigator routings will go. By placing the URL paths in -a central location, we can easily change the URL routings without fear of breaking the app's -navigation hierarchy. - -AppDelegate.h/m - This is a simple shell for initializing the TTNavigator routes. Nothing crazy -going on here. - -TTTwitterSearchFeedViewController.h/m - This is where the magic happens in this app. We do two -important things here. First, we create the data source. Second, we create a -TTTableViewDragRefreshDelegate. The second step is what enables the drag-to-refresh header. -Simple, eh? - -TTTwitterSearchFeedModel.h/m - The model is what loads the data. In this case we're using a -TTURLRequestModel, which is a model that loads its data from a URL request. Before we fire off the -request, we also attach the response object, a TTURLXMLResponse, which receives the resulting data -and processes it. The Three20 XML parser is incredibly leightweight and simply transforms the XML -text into NSObjects. Upon receiving the response, we then enumerate the feed items and create -tweets from the objects. - -TTTwitterSearchFeedDataSource.h/m - The data source binds the controller to the model. We create -the model here as well as defining the text that is displayed when errors occur, or when there -aren't any results from the model. When the model completes loading, we take the resulting data and -create the table items. - diff --git a/samples/TTTwitter/TTTwitter-Info.plist b/samples/TTTwitter/TTTwitter-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/samples/TTTwitter/TTTwitter-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/samples/TTTwitter/TTTwitter.xcodeproj/project.pbxproj b/samples/TTTwitter/TTTwitter.xcodeproj/project.pbxproj deleted file mode 100755 index d31b39a96e..0000000000 --- a/samples/TTTwitter/TTTwitter.xcodeproj/project.pbxproj +++ /dev/null @@ -1,855 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 6E10599C112CCCC400549F42 /* Atlas.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E10599B112CCCC400549F42 /* Atlas.m */; }; - 6E1059AA112CCF8400549F42 /* TTTwitterSearchFeedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E1059A9112CCF8400549F42 /* TTTwitterSearchFeedViewController.m */; }; - 6E1059AF112CCFAF00549F42 /* TTTwitterSearchFeedModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E1059AE112CCFAF00549F42 /* TTTwitterSearchFeedModel.m */; }; - 6E1059B3112CCFBB00549F42 /* TTTwitterSearchFeedDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E1059B2112CCFBB00549F42 /* TTTwitterSearchFeedDataSource.m */; }; - 6E105AD2112CDBCC00549F42 /* TTTwitterTweet.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E105AD1112CDBCC00549F42 /* TTTwitterTweet.m */; }; - 6E3795F711B9B7B60011C497 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3795EC11B9B79C0011C497 /* libThree20.a */; }; - 6E6462EA1187E6D100F08CB1 /* libextThree20JSON+YAJL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E6462E71187E6C800F08CB1 /* libextThree20JSON+YAJL.a */; }; - 6E6463341187E80200F08CB1 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E6463141187E7D500F08CB1 /* libThree20Core.a */; }; - 6E6463351187E80200F08CB1 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E64631D1187E7E800F08CB1 /* libThree20Network.a */; }; - 6E6463361187E80300F08CB1 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E6463261187E7F000F08CB1 /* libThree20Style.a */; }; - 6E6463371187E80300F08CB1 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E64632F1187E7F600F08CB1 /* libThree20UI.a */; }; - 6E877633118D005D001691E0 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E877627118D0052001691E0 /* libThree20UICommon.a */; }; - 6E877634118D0060001691E0 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E877630118D005A001691E0 /* libThree20UINavigator.a */; }; - 6E94C738116D985F0012B12C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C736116D985F0012B12C /* Default.png */; }; - 6E94C73D116D98920012B12C /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E94C73C116D98920012B12C /* Icon.png */; }; - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */; }; - EB383B6D10BBF6360000B2D2 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EB383B6C10BBF6360000B2D2 /* Three20.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E3795EB11B9B79C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3795E611B9B79C0011C497 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6E3795ED11B9B79C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3795E611B9B79C0011C497 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37960011B9B7BF0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3795E611B9B79C0011C497 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6E6462E41187E6C800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6462DE1187E6C800F08CB1 /* extThree20JSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = "extThree20JSON+SBJSON"; - }; - 6E6462E61187E6C800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6462DE1187E6C800F08CB1 /* extThree20JSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 6E645BD91187751200F08CB1; - remoteInfo = "extThree20JSON+YAJL"; - }; - 6E6462E81187E6C800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6462DE1187E6C800F08CB1 /* extThree20JSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTestsSBJSON; - }; - 6E6462EB1187E6E300F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6462DE1187E6C800F08CB1 /* extThree20JSON.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 6E645BA31187751200F08CB1; - remoteInfo = "extThree20JSON+YAJL"; - }; - 6E6463131187E7D500F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E64630E1187E7D500F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E6463151187E7D500F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E64630E1187E7D500F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E64631C1187E7E800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463171187E7E800F08CB1 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E64631E1187E7E800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463171187E7E800F08CB1 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E6463251187E7F000F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463201187E7F000F08CB1 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E6463271187E7F000F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463201187E7F000F08CB1 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E64632E1187E7F600F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463291187E7F600F08CB1 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E6463301187E7F600F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463291187E7F600F08CB1 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E6463861187E88100F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E64630E1187E7D500F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E6463881187E88100F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463171187E7E800F08CB1 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E64638A1187E88100F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463291187E7F600F08CB1 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E64638C1187E88100F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6463201187E7F000F08CB1 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E877626118D0052001691E0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E877621118D0052001691E0 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E877628118D0052001691E0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E877621118D0052001691E0 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E87762F118D005A001691E0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E87762A118D005A001691E0 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E877631118D005A001691E0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E87762A118D005A001691E0 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E877647118D006B001691E0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E87762A118D005A001691E0 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E877649118D006B001691E0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E877621118D0052001691E0 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* TTTwitter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTTwitter.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6E10599A112CCCC400549F42 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atlas.h; sourceTree = ""; }; - 6E10599B112CCCC400549F42 /* Atlas.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Atlas.m; sourceTree = ""; }; - 6E1059A8112CCF8400549F42 /* TTTwitterSearchFeedViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTTwitterSearchFeedViewController.h; sourceTree = ""; }; - 6E1059A9112CCF8400549F42 /* TTTwitterSearchFeedViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTTwitterSearchFeedViewController.m; sourceTree = ""; }; - 6E1059AD112CCFAF00549F42 /* TTTwitterSearchFeedModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTTwitterSearchFeedModel.h; sourceTree = ""; }; - 6E1059AE112CCFAF00549F42 /* TTTwitterSearchFeedModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTTwitterSearchFeedModel.m; sourceTree = ""; }; - 6E1059B1112CCFBB00549F42 /* TTTwitterSearchFeedDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTTwitterSearchFeedDataSource.h; sourceTree = ""; }; - 6E1059B2112CCFBB00549F42 /* TTTwitterSearchFeedDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTTwitterSearchFeedDataSource.m; sourceTree = ""; }; - 6E105AD0112CDBCC00549F42 /* TTTwitterTweet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTTwitterTweet.h; sourceTree = ""; }; - 6E105AD1112CDBCC00549F42 /* TTTwitterTweet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TTTwitterTweet.m; sourceTree = ""; }; - 6E3795E611B9B79C0011C497 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../../src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6462D91187E6A900F08CB1 /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = ""; }; - 6E6462DA1187E6A900F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E6462DB1187E6A900F08CB1 /* RelPath.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = RelPath.xcconfig; path = Configurations/RelPath.xcconfig; sourceTree = ""; }; - 6E6462DC1187E6A900F08CB1 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E6462DD1187E6BD00F08CB1 /* TTTwitter_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTwitter_Prefix.pch; path = Headers/TTTwitter_Prefix.pch; sourceTree = ""; }; - 6E6462DE1187E6C800F08CB1 /* extThree20JSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = extThree20JSON.xcodeproj; path = ../../src/extThree20JSON/extThree20JSON.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E64630E1187E7D500F08CB1 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6463171187E7E800F08CB1 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../../src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6463201187E7F000F08CB1 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../../src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6463291187E7F600F08CB1 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../../src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E877621118D0052001691E0 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../../src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E87762A118D005A001691E0 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../../src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E94C736116D985F0012B12C /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E94C73C116D98920012B12C /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; - 6EECCB77112CE5B700A8908C /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* TTTwitter-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TTTwitter-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - EB383B6C10BBF6360000B2D2 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */, - 6E6463341187E80200F08CB1 /* libThree20Core.a in Frameworks */, - 6E6463351187E80200F08CB1 /* libThree20Network.a in Frameworks */, - 6E6463361187E80300F08CB1 /* libThree20Style.a in Frameworks */, - 6E877633118D005D001691E0 /* libThree20UICommon.a in Frameworks */, - 6E877634118D0060001691E0 /* libThree20UINavigator.a in Frameworks */, - 6E6463371187E80300F08CB1 /* libThree20UI.a in Frameworks */, - 6E6462EA1187E6D100F08CB1 /* libextThree20JSON+YAJL.a in Frameworks */, - 6E3795F711B9B7B60011C497 /* libThree20.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 6E10599F112CCD2900549F42 /* Controllers */, - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - 6E10599A112CCCC400549F42 /* Atlas.h */, - 6E10599B112CCCC400549F42 /* Atlas.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTTwitter.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6EECCB77112CE5B700A8908C /* README.mdown */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E6462D61187E65F00F08CB1 /* Configurations */, - 6E6462D71187E66700F08CB1 /* Dependencies */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 6E6462DD1187E6BD00F08CB1 /* TTTwitter_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - EB383B6C10BBF6360000B2D2 /* Three20.bundle */, - 6E94C736116D985F0012B12C /* Default.png */, - 6E94C73C116D98920012B12C /* Icon.png */, - 8D1107310486CEB800E47090 /* TTTwitter-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E10599F112CCD2900549F42 /* Controllers */ = { - isa = PBXGroup; - children = ( - 6E1059AB112CCF8D00549F42 /* Twitter */, - ); - name = Controllers; - sourceTree = ""; - }; - 6E1059AB112CCF8D00549F42 /* Twitter */ = { - isa = PBXGroup; - children = ( - 6E1059B0112CCFB200549F42 /* Data Source */, - 6E1059AC112CCF9200549F42 /* Model */, - 6E1059A8112CCF8400549F42 /* TTTwitterSearchFeedViewController.h */, - 6E1059A9112CCF8400549F42 /* TTTwitterSearchFeedViewController.m */, - ); - name = Twitter; - sourceTree = ""; - }; - 6E1059AC112CCF9200549F42 /* Model */ = { - isa = PBXGroup; - children = ( - 6E105ACF112CDBBB00549F42 /* Objects */, - 6E1059AD112CCFAF00549F42 /* TTTwitterSearchFeedModel.h */, - 6E1059AE112CCFAF00549F42 /* TTTwitterSearchFeedModel.m */, - ); - name = Model; - sourceTree = ""; - }; - 6E1059B0112CCFB200549F42 /* Data Source */ = { - isa = PBXGroup; - children = ( - 6E1059B1112CCFBB00549F42 /* TTTwitterSearchFeedDataSource.h */, - 6E1059B2112CCFBB00549F42 /* TTTwitterSearchFeedDataSource.m */, - ); - name = "Data Source"; - sourceTree = ""; - }; - 6E105ACF112CDBBB00549F42 /* Objects */ = { - isa = PBXGroup; - children = ( - 6E105AD0112CDBCC00549F42 /* TTTwitterTweet.h */, - 6E105AD1112CDBCC00549F42 /* TTTwitterTweet.m */, - ); - name = Objects; - sourceTree = ""; - }; - 6E3795E711B9B79C0011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3795EC11B9B79C0011C497 /* libThree20.a */, - 6E3795EE11B9B79C0011C497 /* Three20UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3795F011B9B79F0011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E64630E1187E7D500F08CB1 /* Three20Core.xcodeproj */, - 6E6463171187E7E800F08CB1 /* Three20Network.xcodeproj */, - 6E6463201187E7F000F08CB1 /* Three20Style.xcodeproj */, - 6E877621118D0052001691E0 /* Three20UICommon.xcodeproj */, - 6E87762A118D005A001691E0 /* Three20UINavigator.xcodeproj */, - 6E6463291187E7F600F08CB1 /* Three20UI.xcodeproj */, - 6E3795E611B9B79C0011C497 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E3795F111B9B7AC0011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - 6E6462DE1187E6C800F08CB1 /* extThree20JSON.xcodeproj */, - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6E6462D61187E65F00F08CB1 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E6462D91187E6A900F08CB1 /* App.xcconfig */, - 6E6462DA1187E6A900F08CB1 /* Project.xcconfig */, - 6E6462DB1187E6A900F08CB1 /* RelPath.xcconfig */, - 6E6462DC1187E6A900F08CB1 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6E6462D71187E66700F08CB1 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E3795F011B9B79F0011C497 /* Three20 */, - 6E3795F111B9B7AC0011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E6462DF1187E6C800F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E6462E51187E6C800F08CB1 /* libextThree20JSON+SBJSON.a */, - 6E6462E71187E6C800F08CB1 /* libextThree20JSON+YAJL.a */, - 6E6462E91187E6C800F08CB1 /* extJSONUnitTests+SBJSON.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E64630F1187E7D500F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E6463141187E7D500F08CB1 /* libThree20Core.a */, - 6E6463161187E7D500F08CB1 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E6463181187E7E800F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E64631D1187E7E800F08CB1 /* libThree20Network.a */, - 6E64631F1187E7E800F08CB1 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E6463211187E7F000F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E6463261187E7F000F08CB1 /* libThree20Style.a */, - 6E6463281187E7F000F08CB1 /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E64632A1187E7F600F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E64632F1187E7F600F08CB1 /* libThree20UI.a */, - 6E6463311187E7F600F08CB1 /* UIUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E877622118D0052001691E0 /* Products */ = { - isa = PBXGroup; - children = ( - 6E877627118D0052001691E0 /* libThree20UICommon.a */, - 6E877629118D0052001691E0 /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E87762B118D005A001691E0 /* Products */ = { - isa = PBXGroup; - children = ( - 6E877630118D005A001691E0 /* libThree20UINavigator.a */, - 6E877632118D005A001691E0 /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTTwitter */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTTwitter" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E6463871187E88100F08CB1 /* PBXTargetDependency */, - 6E6463891187E88100F08CB1 /* PBXTargetDependency */, - 6E64638D1187E88100F08CB1 /* PBXTargetDependency */, - 6E87764A118D006B001691E0 /* PBXTargetDependency */, - 6E877648118D006B001691E0 /* PBXTargetDependency */, - 6E64638B1187E88100F08CB1 /* PBXTargetDependency */, - 6E6462EC1187E6E300F08CB1 /* PBXTargetDependency */, - 6E37960111B9B7BF0011C497 /* PBXTargetDependency */, - ); - name = TTTwitter; - productName = TTTwitter; - productReference = 1D6058910D05DD3D006BFB54 /* TTTwitter.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTTwitter" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E6462DF1187E6C800F08CB1 /* Products */; - ProjectRef = 6E6462DE1187E6C800F08CB1 /* extThree20JSON.xcodeproj */; - }, - { - ProductGroup = 6E3795E711B9B79C0011C497 /* Products */; - ProjectRef = 6E3795E611B9B79C0011C497 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E64630F1187E7D500F08CB1 /* Products */; - ProjectRef = 6E64630E1187E7D500F08CB1 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E6463181187E7E800F08CB1 /* Products */; - ProjectRef = 6E6463171187E7E800F08CB1 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E6463211187E7F000F08CB1 /* Products */; - ProjectRef = 6E6463201187E7F000F08CB1 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E64632A1187E7F600F08CB1 /* Products */; - ProjectRef = 6E6463291187E7F600F08CB1 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E877622118D0052001691E0 /* Products */; - ProjectRef = 6E877621118D0052001691E0 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E87762B118D005A001691E0 /* Products */; - ProjectRef = 6E87762A118D005A001691E0 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTTwitter */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E3795EC11B9B79C0011C497 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6E3795EB11B9B79C0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3795EE11B9B79C0011C497 /* Three20UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = Three20UnitTests.octest; - remoteRef = 6E3795ED11B9B79C0011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6462E51187E6C800F08CB1 /* libextThree20JSON+SBJSON.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libextThree20JSON+SBJSON.a"; - remoteRef = 6E6462E41187E6C800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6462E71187E6C800F08CB1 /* libextThree20JSON+YAJL.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libextThree20JSON+YAJL.a"; - remoteRef = 6E6462E61187E6C800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6462E91187E6C800F08CB1 /* extJSONUnitTests+SBJSON.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "extJSONUnitTests+SBJSON.octest"; - remoteRef = 6E6462E81187E6C800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6463141187E7D500F08CB1 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E6463131187E7D500F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6463161187E7D500F08CB1 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E6463151187E7D500F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E64631D1187E7E800F08CB1 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E64631C1187E7E800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E64631F1187E7E800F08CB1 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E64631E1187E7E800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6463261187E7F000F08CB1 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E6463251187E7F000F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6463281187E7F000F08CB1 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E6463271187E7F000F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E64632F1187E7F600F08CB1 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E64632E1187E7F600F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6463311187E7F600F08CB1 /* UIUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UIUnitTests.octest; - remoteRef = 6E6463301187E7F600F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E877627118D0052001691E0 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E877626118D0052001691E0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E877629118D0052001691E0 /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6E877628118D0052001691E0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E877630118D005A001691E0 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E87762F118D005A001691E0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E877632118D005A001691E0 /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6E877631118D005A001691E0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EB383B6D10BBF6360000B2D2 /* Three20.bundle in Resources */, - 6E94C738116D985F0012B12C /* Default.png in Resources */, - 6E94C73D116D98920012B12C /* Icon.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 6E10599C112CCCC400549F42 /* Atlas.m in Sources */, - 6E1059AA112CCF8400549F42 /* TTTwitterSearchFeedViewController.m in Sources */, - 6E1059AF112CCFAF00549F42 /* TTTwitterSearchFeedModel.m in Sources */, - 6E1059B3112CCFBB00549F42 /* TTTwitterSearchFeedDataSource.m in Sources */, - 6E105AD2112CDBCC00549F42 /* TTTwitterTweet.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E37960111B9B7BF0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6E37960011B9B7BF0011C497 /* PBXContainerItemProxy */; - }; - 6E6462EC1187E6E300F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "extThree20JSON+YAJL"; - targetProxy = 6E6462EB1187E6E300F08CB1 /* PBXContainerItemProxy */; - }; - 6E6463871187E88100F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E6463861187E88100F08CB1 /* PBXContainerItemProxy */; - }; - 6E6463891187E88100F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E6463881187E88100F08CB1 /* PBXContainerItemProxy */; - }; - 6E64638B1187E88100F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E64638A1187E88100F08CB1 /* PBXContainerItemProxy */; - }; - 6E64638D1187E88100F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E64638C1187E88100F08CB1 /* PBXContainerItemProxy */; - }; - 6E877648118D006B001691E0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E877647118D006B001691E0 /* PBXContainerItemProxy */; - }; - 6E87764A118D006B001691E0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E877649118D006B001691E0 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6462D91187E6A900F08CB1 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6462D91187E6A900F08CB1 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6462DA1187E6A900F08CB1 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6462DA1187E6A900F08CB1 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTTwitter" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTTwitter" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/TTTwitter/main.m b/samples/TTTwitter/main.m deleted file mode 100644 index 1cefab29fe..0000000000 --- a/samples/TTTwitter/main.m +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/samples/UI/TTNibDemo/Classes/DemoMessageController.h b/samples/UI/TTNibDemo/Classes/DemoMessageController.h deleted file mode 100644 index 5e808c0011..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoMessageController.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface DemoMessageController : TTMessageController { - UIView* _titleView; -} - -@property (nonatomic, retain) IBOutlet UIView* titleView; - -@end diff --git a/samples/UI/TTNibDemo/Classes/DemoMessageController.m b/samples/UI/TTNibDemo/Classes/DemoMessageController.m deleted file mode 100644 index cf74977244..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoMessageController.m +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "DemoMessageController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation DemoMessageController - -@synthesize titleView = _titleView; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString*)nibName bundle:(NSBundle*)bundle { - if (self = [super initWithNibName:nibName bundle:bundle]) { - self.title = @"DemoMessageController"; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidLoad { - [super viewDidLoad]; - - if (self.titleView) { - self.navigationItem.titleView = self.titleView; - } - - self.body = - @"This class is loaded from a NIB. Notice the title view that is defined in the NIB file"; -} - -@end diff --git a/samples/UI/TTNibDemo/Classes/DemoMessageController.xib b/samples/UI/TTNibDemo/Classes/DemoMessageController.xib deleted file mode 100644 index ddfee127a2..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoMessageController.xib +++ /dev/null @@ -1,541 +0,0 @@ - - - - 768 - 10D573 - 762 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 87 - - - YES - - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 292 - {320, 460} - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - 292 - - YES - - - 292 - {{9, 8}, {47, 21}} - - NO - YES - NO - IBCocoaTouchFramework - Via Nib - - 1 - MCAwIDAAA - - - 1 - 5 - - - - 292 - {{69, 7}, {86, 23}} - - NO - YES - YES - IBCocoaTouchFramework - 0 - 0 - 0.5 - - - {165, 40} - - - 1 - MC40MDAwMDAwMDYgMSAxIDAAA - - NO - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - titleView - - - - 5 - - - - - YES - - 0 - - - - - - 1 - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - YES - - - - - title view - - - 6 - - - - - 8 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 4.IBEditorWindowLastContentRect - 4.IBPluginDependency - 6.IBPluginDependency - 8.IBPluginDependency - - - YES - DemoMessageController - UIResponder - {{853, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{40, 26}, {0, -22}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 8 - - - - YES - - DemoMessageController - TTMessageController - - titleView - UIView - - - IBProjectSource - Classes/DemoMessageController.h - - - - - YES - - NSObject - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/UINSObjectAdditions.h - - - - TTBaseViewController - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/TTBaseViewController.h - - - - TTMessageController - TTViewController - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/TTMessageController.h - - - - TTNavigatorViewController - TTBaseViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/TTNavigatorViewController.h - - - - TTViewController - TTNavigatorViewController - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/TTViewController.h - - - - UIView - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/UIViewAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/UIViewControllerAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/UIViewControllerGarbageCollection.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/UIViewController+TTNavigator.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/UIViewController+TTNavigatorGarbageCollection.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UISlider - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UISlider.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../TTNibDemo.xcodeproj - 3 - 87 - - diff --git a/samples/UI/TTNibDemo/Classes/DemoPostController.h b/samples/UI/TTNibDemo/Classes/DemoPostController.h deleted file mode 100644 index ef6683644e..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoPostController.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface DemoPostController : TTPostController { - UIView* _titleView; -} - -@property (nonatomic, retain) IBOutlet UIView* titleView; - - -@end diff --git a/samples/UI/TTNibDemo/Classes/DemoPostController.m b/samples/UI/TTNibDemo/Classes/DemoPostController.m deleted file mode 100644 index 926bab7e87..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoPostController.m +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "DemoPostController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation DemoPostController - -@synthesize titleView = _titleView; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidLoad { - [super viewDidLoad]; - - if (self.titleView) { - self.navigationItem.titleView = self.titleView; - } - - self.textView.text = - @"Notice that there is a UISwitch in the nav bar that was loaded from a nib"; -} - - -@end diff --git a/samples/UI/TTNibDemo/Classes/DemoPostController.xib b/samples/UI/TTNibDemo/Classes/DemoPostController.xib deleted file mode 100644 index fc789f2f0a..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoPostController.xib +++ /dev/null @@ -1,496 +0,0 @@ - - - - 768 - 10D573 - 762 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 87 - - - YES - - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 292 - {320, 460} - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - 292 - {94, 27} - - NO - YES - YES - IBCocoaTouchFramework - 0 - 0 - YES - - - - - YES - - - view - - - - 3 - - - - titleView - - - - 5 - - - - - YES - - 0 - - - - - - 1 - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 4.IBEditorWindowLastContentRect - 4.IBPluginDependency - - - YES - DemoPostController - UIResponder - {{853, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{479, 829}, {94, 27}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 5 - - - - YES - - DemoPostController - TTPostController - - titleView - UIView - - - IBProjectSource - Classes/DemoPostController.h - - - - - YES - - NSObject - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/UINSObjectAdditions.h - - - - TTBaseViewController - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/TTBaseViewController.h - - - - TTModelViewController - TTViewController - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/TTModelViewController.h - - - - TTNavigatorViewController - TTBaseViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/TTNavigatorViewController.h - - - - TTPopupViewController - TTModelViewController - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/TTPopupViewController.h - - - - TTPostController - TTPopupViewController - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/TTPostController.h - - - - TTViewController - TTNavigatorViewController - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/TTViewController.h - - - - UIView - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/UIViewAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/UIViewControllerAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/UIViewControllerGarbageCollection.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/UIViewController+TTNavigator.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/UIViewController+TTNavigatorGarbageCollection.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UISwitch - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UISwitch.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../TTNibDemo.xcodeproj - 3 - 87 - - diff --git a/samples/UI/TTNibDemo/Classes/DemoTableViewController.h b/samples/UI/TTNibDemo/Classes/DemoTableViewController.h deleted file mode 100644 index 4383f5e23c..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoTableViewController.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface DemoTableViewController : TTTableViewController { - UIView* _headerView; - UIView* _footerView; -} - -@property (nonatomic, retain) IBOutlet UIView* headerView; -@property (nonatomic, retain) IBOutlet UIView* footerView; - -@end diff --git a/samples/UI/TTNibDemo/Classes/DemoTableViewController.m b/samples/UI/TTNibDemo/Classes/DemoTableViewController.m deleted file mode 100644 index 667bdde15a..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoTableViewController.m +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "DemoTableViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * This class can be called with a nib or without a nib. It can show an optional - * table header and / or table footer. - */ -@implementation DemoTableViewController - -@synthesize headerView = _headerView; -@synthesize footerView = _footerView; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Called both for NIB inits and manual inits - */ --(id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)bundle { - if (self = [super initWithNibName:nibName bundle:bundle]) { - self.title = @"DemoTableViewController"; - self.navigationItem.backBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle: @"Root" - style: UIBarButtonItemStyleBordered - target: nil - action: nil] autorelease]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// --(void)dealloc { - TT_RELEASE_SAFELY(_footerView); - TT_RELEASE_SAFELY(_headerView); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidLoad { - [super viewDidLoad]; - - self.tableView.tableHeaderView = self.headerView; - self.tableView.tableFooterView = self.footerView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createModel { - NSString * nibString = nil; - - if (self.nibName) { - nibString = [@"NIB: " stringByAppendingString:self.nibName]; - - } else { - nibString = @"Called without a NIB"; - } - - self.dataSource = [TTSectionedDataSource dataSourceWithObjects: - @"TTTableViewController", - [TTTableTextItem itemWithText:@"This demonstates a table"], - [TTTableTextItem itemWithText:nibString], - - nil]; -} - - -@end diff --git a/samples/UI/TTNibDemo/Classes/DemoViewController.h b/samples/UI/TTNibDemo/Classes/DemoViewController.h deleted file mode 100644 index 86459b7d30..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoViewController.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface DemoViewController : TTViewController { - -} - -@end diff --git a/samples/UI/TTNibDemo/Classes/DemoViewController.m b/samples/UI/TTNibDemo/Classes/DemoViewController.m deleted file mode 100644 index 4f8bdb6233..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoViewController.m +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "DemoViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation DemoViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidLoad { - [super viewDidLoad]; - - self.title = @"DemoViewController"; -} - - -@end diff --git a/samples/UI/TTNibDemo/Classes/DemoViewController.xib b/samples/UI/TTNibDemo/Classes/DemoViewController.xib deleted file mode 100644 index f12385cfd4..0000000000 --- a/samples/UI/TTNibDemo/Classes/DemoViewController.xib +++ /dev/null @@ -1,563 +0,0 @@ - - - - 768 - 10D573 - 762 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 87 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 292 - - YES - - - 292 - {{0, 20}, {249, 86}} - - NO - YES - NO - IBCocoaTouchFramework - The contents of this view controller come from a NIB - - 1 - MCAwIDAAA - - - 1 - 10 - 3 - 1 - - - - 292 - {{247, 34}, {53, 58}} - - NO - NO - 4 - NO - IBCocoaTouchFramework - - NSImage - blueArrow.png - - - - - 292 - {{0, 151}, {320, 216}} - - NO - YES - YES - IBCocoaTouchFramework - 0 - 0 - - en_US - - - America/Los_Angeles - - VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ -y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ -5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g -8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ -AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg -DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ -HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g -KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ -OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg -Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ -VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg -Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ -cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg -f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA -AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA -AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA -AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA - - - - 292040400.64180398 - - 5 - - - {320, 460} - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - YES - - - view - - - - 3 - - - - - YES - - 0 - - - - - - 1 - - - YES - - - - - - - - -1 - - - File's Owner - - - -2 - - - - - 4 - - - - - 5 - - - - - 6 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 4.IBPluginDependency - 5.IBPluginDependency - 6.IBPluginDependency - - - YES - DemoViewController - UIResponder - {{853, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 6 - - - - YES - - DemoViewController - TTViewController - - IBProjectSource - Classes/DemoViewController.h - - - - - YES - - NSObject - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/UINSObjectAdditions.h - - - - TTBaseViewController - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/TTBaseViewController.h - - - - TTNavigatorViewController - TTBaseViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/TTNavigatorViewController.h - - - - TTViewController - TTNavigatorViewController - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/TTViewController.h - - - - UIView - - IBDocumentRelativeSource - ../../../../src/Three20UI/Headers/UIViewAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/UIViewControllerAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UICommon/Headers/UIViewControllerGarbageCollection.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/UIViewController+TTNavigator.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../../src/Three20UINavigator/Headers/UIViewController+TTNavigatorGarbageCollection.h - - - - - YES - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UIControl - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIControl.h - - - - UIDatePicker - UIControl - - IBFrameworkSource - UIKit.framework/Headers/UIDatePicker.h - - - - UIImageView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIImageView.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - ../TTNibDemo.xcodeproj - 3 - - blueArrow.png - {23, 60} - - 87 - - diff --git a/samples/UI/TTNibDemo/Classes/NibDemoAppDelegate.h b/samples/UI/TTNibDemo/Classes/NibDemoAppDelegate.h deleted file mode 100644 index ff7d5ded97..0000000000 --- a/samples/UI/TTNibDemo/Classes/NibDemoAppDelegate.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface NibDemoAppDelegate : NSObject { - UIWindow* _window; - UINavigationController* _navigationController; -} - -@property (nonatomic, retain) IBOutlet UIWindow* window; -@property (nonatomic, retain) IBOutlet UINavigationController* navigationController; - -@end - diff --git a/samples/UI/TTNibDemo/Classes/NibDemoAppDelegate.m b/samples/UI/TTNibDemo/Classes/NibDemoAppDelegate.m deleted file mode 100644 index f1bcb0a108..0000000000 --- a/samples/UI/TTNibDemo/Classes/NibDemoAppDelegate.m +++ /dev/null @@ -1,112 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "NibDemoAppDelegate.h" -#import "RootViewController.h" -#import "StyleSheet.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation NibDemoAppDelegate - -@synthesize window = _window; -@synthesize navigationController = _navigationController; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Application lifecycle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.supportsShakeToReload = YES; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - navigator.window = self.window; - - [TTStyleSheet setGlobalStyleSheet:[[[StyleSheet alloc] init] autorelease]]; - - TTURLMap* map = navigator.URLMap; - [map from:@"*" toViewController:[TTWebController class]]; - [map from:@"tt://root" toViewController:NSClassFromString(@"RootViewController")]; - [map from:@"tt://nib/(loadFromNib:)" toSharedViewController:self]; - [map from:@"tt://nib/(loadFromNib:)/(withClass:)" toSharedViewController:self]; - [map from:@"tt://viewController/(loadFromVC:)" toSharedViewController:self]; - [map from:@"tt://modal/(loadFromNib:)" toModalViewController:self]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://root"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_navigationController); - TT_RELEASE_SAFELY(_window); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Loads the given viewcontroller from the nib - */ -- (UIViewController*)loadFromNib:(NSString *)nibName withClass:className { - UIViewController* newController = [[NSClassFromString(className) alloc] - initWithNibName:nibName bundle:nil]; - [newController autorelease]; - - return newController; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Loads the given viewcontroller from the the nib with the same name as the - * class - */ -- (UIViewController*)loadFromNib:(NSString*)className { - return [self loadFromNib:className withClass:className]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Loads the given viewcontroller by name - */ -- (UIViewController *)loadFromVC:(NSString *)className { - UIViewController * newController = [[ NSClassFromString(className) alloc] init]; - [newController autorelease]; - - return newController; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end - diff --git a/samples/UI/TTNibDemo/Classes/RootViewController.h b/samples/UI/TTNibDemo/Classes/RootViewController.h deleted file mode 100644 index dce677a88c..0000000000 --- a/samples/UI/TTNibDemo/Classes/RootViewController.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface RootViewController : TTTableViewController { -} - -@end diff --git a/samples/UI/TTNibDemo/Classes/RootViewController.m b/samples/UI/TTNibDemo/Classes/RootViewController.m deleted file mode 100644 index 2c6e6cab36..0000000000 --- a/samples/UI/TTNibDemo/Classes/RootViewController.m +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "RootViewController.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation RootViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// --(id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)bundle { - if (self = [super initWithNibName:nibName bundle:bundle]) { - self.title = @"Three20 NIB Demo"; - self.navigationItem.backBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle: @"Root" - style: UIBarButtonItemStyleBordered - target: nil - action: nil] autorelease]; - //self.tableViewStyle = UITableViewStyleGrouped; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createModel { - self.dataSource = [TTSectionedDataSource dataSourceWithObjects: - @"TTTableViewController", - [TTTableTextItem itemWithText:@"Table No Nib" URL:@"tt://viewController/DemoTableViewController"], - [TTTableTextItem itemWithText:@"Table with default NIB" URL:@"tt://nib/DemoTableViewController"], - [TTTableTextItem itemWithText:@"Table with specific NIB" URL:@"tt://nib/FooterTableViewController/DemoTableViewController"], - - @"Other", - [TTTableTextItem itemWithText:@"TTPostController" URL:@"tt://nib/DemoPostController"], - [TTTableTextItem itemWithText:@"TTViewController" URL:@"tt://nib/DemoViewController"], - - [TTTableTextItem itemWithText:@"TTMessageController" URL:@"tt://modal/DemoMessageController"], -// [TTTableTextItem itemWithText:@"TTWebController" URL:@"tt://g"], -// [TTTableTextItem itemWithText:@"TTPopupViewController" URL:@"tt://h"], -// -// [TTTableTextItem itemWithText:@"TTPhotoViewController" URL:@"tt://i"], -// [TTTableTextItem itemWithText:@"TTAlertViewController" URL:@"tt://k"], -// [TTTableTextItem itemWithText:@"TTActionSheetController" URL:@"tt://viewController/TTActionSheetController"], - - nil]; -} - - -@end - diff --git a/samples/UI/TTNibDemo/Classes/StyleSheet.h b/samples/UI/TTNibDemo/Classes/StyleSheet.h deleted file mode 100644 index 67a9b9a489..0000000000 --- a/samples/UI/TTNibDemo/Classes/StyleSheet.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@interface StyleSheet : TTDefaultStyleSheet { - -} - -@end diff --git a/samples/UI/TTNibDemo/Classes/StyleSheet.m b/samples/UI/TTNibDemo/Classes/StyleSheet.m deleted file mode 100644 index 8f623cba0e..0000000000 --- a/samples/UI/TTNibDemo/Classes/StyleSheet.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "StyleSheet.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation StyleSheet - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return [UIFont fontWithName:@"Georgia" size:11]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableFont { - return [UIFont fontWithName:@"Georgia" size:12]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableHeaderPlainFont { - return [UIFont fontWithName:@"Georgia" size:13]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// --(UIFont*)titleFont { - return [UIFont fontWithName:@"Georgia-Bold" size:14]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableGroupedBackgroundColor { - return RGBCOLOR(224, 221, 203); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableHeaderTextColor { - return [UIColor brownColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableHeaderTintColor { - return RGBCOLOR(224, 221, 203); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)navigationBarTintColor { - return RGBCOLOR(181, 128, 108); -} - - -@end diff --git a/samples/UI/TTNibDemo/Configurations/App.xcconfig b/samples/UI/TTNibDemo/Configurations/App.xcconfig deleted file mode 100644 index febefe95fb..0000000000 --- a/samples/UI/TTNibDemo/Configurations/App.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/App.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -BASE_PRODUCT_NAME = TTNibDemo -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/samples/UI/TTNibDemo/Configurations/Project.xcconfig b/samples/UI/TTNibDemo/Configurations/Project.xcconfig deleted file mode 100644 index fc1966a5f7..0000000000 --- a/samples/UI/TTNibDemo/Configurations/Project.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/Project.xcconfig" -#include "RelPath.xcconfig" diff --git a/samples/UI/TTNibDemo/Configurations/RelPath.xcconfig b/samples/UI/TTNibDemo/Configurations/RelPath.xcconfig deleted file mode 100644 index e869ea439f..0000000000 --- a/samples/UI/TTNibDemo/Configurations/RelPath.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../../.. diff --git a/samples/UI/TTNibDemo/Configurations/UnitTests.xcconfig b/samples/UI/TTNibDemo/Configurations/UnitTests.xcconfig deleted file mode 100644 index a568db59da..0000000000 --- a/samples/UI/TTNibDemo/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../common/Configurations/UnitTests.xcconfig" -#include "../../common/Configurations/Libraries.xcconfig" -#include "RelPath.xcconfig" - -PRODUCT_NAME = TTNibDemoUnitTests -BUILD_BUNDLE_VERSION = 1.0 diff --git a/samples/UI/TTNibDemo/DemoTableViewController.xib b/samples/UI/TTNibDemo/DemoTableViewController.xib deleted file mode 100644 index 4a4c01104c..0000000000 --- a/samples/UI/TTNibDemo/DemoTableViewController.xib +++ /dev/null @@ -1,543 +0,0 @@ - - - - 768 - 10D573 - 762 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 87 - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 292 - - - - 292 - {{51, 6}, {221, 21}} - - NO - YES - NO - IBCocoaTouchFramework - This header loaded from NIB - - 1 - MCAwIDAAA - - - 1 - 10 - - - {322, 35} - - - 1 - MC43MTAyMDQwNjQ4IDAuNTAyMzEzNTU0MyAwLjQyNDE4NDc5OTIAA - - NO - IBCocoaTouchFramework - - - - 292 - - - - 274 - {320, 460} - - - 1 - MSAxIDAuNDAwMDAwMDA2IDAAA - - NO - YES - NO - IBCocoaTouchFramework - NO - 1 - 1 - 0 - YES - 44 - 10 - 10 - - - {320, 460} - - - 3 - MQA - - 2 - - - NO - IBCocoaTouchFramework - - - - - - - headerView - - - - 8 - - - - view - - - - 11 - - - - tableView - - - - 13 - - - - - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 6 - - - - - - header - - - 7 - - - - - 9 - - - - - - table superView - - - 2 - - - - - - - DemoTableViewController - UIResponder - TTTableView - {{0, 598}, {320, 247}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{519, 821}, {322, 35}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{21, 396}, {320, 460}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 13 - - - - - DemoTableViewController - TTTableViewController - - UIView - UIView - - - IBProjectSource - Classes/DemoTableViewController.h - - - - - - NSObject - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/UINSObjectAdditions.h - - - - TTBaseViewController - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UICommon/Headers/TTBaseViewController.h - - - - TTModelViewController - TTViewController - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/TTModelViewController.h - - - - TTNavigatorViewController - TTBaseViewController - - IBDocumentRelativeSource - ../../../src/Three20UINavigator/Headers/TTNavigatorViewController.h - - - - TTTableView - UITableView - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/TTTableView.h - - - - TTTableViewController - TTModelViewController - - tableView - UITableView - - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/TTTableViewController.h - - - - TTViewController - TTNavigatorViewController - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/TTViewController.h - - - - UITableView - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/UITableViewAdditions.h - - - - UIView - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/UIViewAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UICommon/Headers/UIViewControllerAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UICommon/Headers/UIViewControllerGarbageCollection.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UINavigator/Headers/UIViewController+TTNavigator.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UINavigator/Headers/UIViewController+TTNavigatorGarbageCollection.h - - - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - YES - TTNibDemo.xcodeproj - 3 - 87 - - diff --git a/samples/UI/TTNibDemo/FooterTableViewController.xib b/samples/UI/TTNibDemo/FooterTableViewController.xib deleted file mode 100644 index 4afb8fe611..0000000000 --- a/samples/UI/TTNibDemo/FooterTableViewController.xib +++ /dev/null @@ -1,543 +0,0 @@ - - - - 768 - 10D573 - 762 - 1038.29 - 460.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 87 - - - - - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 292 - - - - 292 - {{51, 6}, {221, 21}} - - NO - YES - NO - IBCocoaTouchFramework - This footer loaded from NIB - - 1 - MCAwIDAAA - - - 1 - 10 - - - {322, 35} - - - 1 - MC42MDgxNjMyMzc2IDAuNDMwMTQyMDQ1IDAuMzYzMjM4NzIyMQA - - NO - IBCocoaTouchFramework - - - - 292 - - - - 274 - {320, 460} - - - 1 - MSAxIDAuNDAwMDAwMDA2IDAAA - - NO - YES - NO - IBCocoaTouchFramework - NO - 1 - 1 - 0 - YES - 44 - 10 - 10 - - - {320, 460} - - - 3 - MQA - - 2 - - - NO - IBCocoaTouchFramework - - - - - - - tableView - - - - 10 - - - - view - - - - 11 - - - - footerView - - - - 12 - - - - - - 0 - - - - - - -1 - - - File's Owner - - - -2 - - - - - 6 - - - - - - footer - - - 7 - - - - - 9 - - - - - - table superView - - - 2 - - - - - - - DemoTableViewController - UIResponder - TTTableView - {{0, 598}, {320, 247}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{519, 821}, {322, 35}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{21, 396}, {320, 460}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 12 - - - - - DemoTableViewController - TTTableViewController - - UIView - UIView - - - IBProjectSource - Classes/DemoTableViewController.h - - - - - - NSObject - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/UINSObjectAdditions.h - - - - TTBaseViewController - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UICommon/Headers/TTBaseViewController.h - - - - TTModelViewController - TTViewController - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/TTModelViewController.h - - - - TTNavigatorViewController - TTBaseViewController - - IBDocumentRelativeSource - ../../../src/Three20UINavigator/Headers/TTNavigatorViewController.h - - - - TTTableView - UITableView - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/TTTableView.h - - - - TTTableViewController - TTModelViewController - - tableView - UITableView - - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/TTTableViewController.h - - - - TTViewController - TTNavigatorViewController - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/TTViewController.h - - - - UITableView - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/UITableViewAdditions.h - - - - UIView - - IBDocumentRelativeSource - ../../../src/Three20UI/Headers/UIViewAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UICommon/Headers/UIViewControllerAdditions.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UICommon/Headers/UIViewControllerGarbageCollection.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UINavigator/Headers/UIViewController+TTNavigator.h - - - - UIViewController - - IBDocumentRelativeSource - ../../../src/Three20UINavigator/Headers/UIViewController+TTNavigatorGarbageCollection.h - - - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CAAnimation.h - - - - NSObject - - IBFrameworkSource - QuartzCore.framework/Headers/CALayer.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIAccessibility.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UINibLoading.h - - - - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UIResponder.h - - - - UILabel - UIView - - IBFrameworkSource - UIKit.framework/Headers/UILabel.h - - - - UIResponder - NSObject - - - - UIScrollView - UIView - - IBFrameworkSource - UIKit.framework/Headers/UIScrollView.h - - - - UISearchBar - UIView - - IBFrameworkSource - UIKit.framework/Headers/UISearchBar.h - - - - UISearchDisplayController - NSObject - - IBFrameworkSource - UIKit.framework/Headers/UISearchDisplayController.h - - - - UITableView - UIScrollView - - IBFrameworkSource - UIKit.framework/Headers/UITableView.h - - - - UIView - - IBFrameworkSource - UIKit.framework/Headers/UITextField.h - - - - UIView - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIView.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UINavigationController.h - - - - UIViewController - - IBFrameworkSource - UIKit.framework/Headers/UITabBarController.h - - - - UIViewController - UIResponder - - IBFrameworkSource - UIKit.framework/Headers/UIViewController.h - - - - - 0 - IBCocoaTouchFramework - - com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - - - YES - TTNibDemo.xcodeproj - 3 - 87 - - diff --git a/samples/UI/TTNibDemo/Headers/TTNibDemo_Prefix.pch b/samples/UI/TTNibDemo/Headers/TTNibDemo_Prefix.pch deleted file mode 100644 index 77e31e9f81..0000000000 --- a/samples/UI/TTNibDemo/Headers/TTNibDemo_Prefix.pch +++ /dev/null @@ -1,15 +0,0 @@ -// -// Prefix header for all source files of the 'NibDemo' target in the 'NibDemo' project -// -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - - -#ifdef __OBJC__ - #import - #import - #import -#endif diff --git a/samples/UI/TTNibDemo/MainWindow.xib b/samples/UI/TTNibDemo/MainWindow.xib deleted file mode 100644 index 5bb02d88d4..0000000000 --- a/samples/UI/TTNibDemo/MainWindow.xib +++ /dev/null @@ -1,268 +0,0 @@ - - - - 784 - 10A394 - 732 - 1027.1 - 430.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 60 - - - YES - - - - YES - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - YES - - YES - - - YES - - - - YES - - IBFilesOwner - - - IBFirstResponder - - - - - 1316 - - {320, 480} - - 1 - MSAxIDEAA - - NO - NO - - - - - - - 256 - {0, 0} - NO - YES - YES - - - YES - - - - - - RootViewController - - - - - - - - YES - - - delegate - - - - 4 - - - - window - - - - 5 - - - - navigationController - - - - 15 - - - - - YES - - 0 - - - - - - 2 - - - YES - - - - - -1 - - - File's Owner - - - 3 - - - - - -2 - - - - - 9 - - - YES - - - - - - - 11 - - - - - 13 - - - YES - - - - - - 14 - - - - - - - YES - - YES - -1.CustomClassName - -2.CustomClassName - 11.IBPluginDependency - 13.CustomClassName - 13.IBPluginDependency - 2.IBAttributePlaceholdersKey - 2.IBEditorWindowLastContentRect - 2.IBPluginDependency - 3.CustomClassName - 3.IBPluginDependency - 9.IBEditorWindowLastContentRect - 9.IBPluginDependency - - - YES - UIApplication - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - RootViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - YES - - - YES - - - {{673, 376}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - NibDemoAppDelegate - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{500, 343}, {320, 480}} - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 15 - - - - YES - - RootViewController - UITableViewController - - IBProjectSource - Classes/RootViewController.h - - - - NibDemoAppDelegate - NSObject - - YES - - YES - navigationController - window - - - YES - UINavigationController - UIWindow - - - - IBProjectSource - Classes/NibDemoAppDelegate.h - - - - - 0 - - com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 - - - YES - NibDemo.xcodeproj - 3 - 3.1 - - diff --git a/samples/UI/TTNibDemo/README.mdown b/samples/UI/TTNibDemo/README.mdown deleted file mode 100644 index 6d9ff8670b..0000000000 --- a/samples/UI/TTNibDemo/README.mdown +++ /dev/null @@ -1,17 +0,0 @@ - -NibDemo Example Project -======================= - -Version: 1.0 - -Created by: Skotch Vail (github.com/skotchvail) and Brian Chapados (http://github.com/chapados) - -Notes ------ - -For some reason, Interface Builder seems to have trouble with headers in frameworks like three20. -I was getting a warning like this: - The 'xxx' outlet of 'xxx' is connected to 'aaa' but 'yyy' is no longer defined on yyy. - -What I did was select "Read Class Files..." in the "File" menu of Interface Builder and read the -header file for my framework class (e.g. three20). The solved the problem for me. diff --git a/samples/UI/TTNibDemo/TTNibDemo-Info.plist b/samples/UI/TTNibDemo/TTNibDemo-Info.plist deleted file mode 100644 index 32894445df..0000000000 --- a/samples/UI/TTNibDemo/TTNibDemo-Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - NSMainNibFile - MainWindow - - diff --git a/samples/UI/TTNibDemo/TTNibDemo.xcodeproj/project.pbxproj b/samples/UI/TTNibDemo/TTNibDemo.xcodeproj/project.pbxproj deleted file mode 100755 index 6bed312214..0000000000 --- a/samples/UI/TTNibDemo/TTNibDemo.xcodeproj/project.pbxproj +++ /dev/null @@ -1,837 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* NibDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* NibDemoAppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; - 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD735F0D9D9599002E5188 /* MainWindow.xib */; }; - 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28C286E00D94DF7D0034E888 /* RootViewController.m */; }; - 28F335F11007B36200424DE2 /* DemoTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28F335F01007B36200424DE2 /* DemoTableViewController.xib */; }; - 6E37965B11B9B8460011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37963A11B9B8400011C497 /* libThree20Core.a */; }; - 6E37965C11B9B8470011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37964011B9B8400011C497 /* libThree20Network.a */; }; - 6E37965D11B9B8470011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37964611B9B8400011C497 /* libThree20Style.a */; }; - 6E37965E11B9B8480011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37965811B9B8400011C497 /* libThree20UI.a */; }; - 6E37965F11B9B8490011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37964C11B9B8400011C497 /* libThree20UICommon.a */; }; - 6E37966011B9B8490011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37965211B9B8400011C497 /* libThree20UINavigator.a */; }; - 6E60855A11B0DEDB00C93CD4 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E60855711B0DED900C93CD4 /* libThree20.a */; }; - 6E60856711B0DFF900C93CD4 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E60856611B0DFF900C93CD4 /* Three20.bundle */; }; - 6E60858911B0E00800C93CD4 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E60858711B0E00800C93CD4 /* Default.png */; }; - 6E60858A11B0E00800C93CD4 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E60858811B0E00800C93CD4 /* Icon.png */; }; - CC85CDA51167DF3B00D3FE00 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC85CDA41167DF3B00D3FE00 /* QuartzCore.framework */; }; - CC85CE031167E25200D3FE00 /* DemoTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CC85CE021167E25200D3FE00 /* DemoTableViewController.m */; }; - CC85D4B511681EC500D3FE00 /* README.mdown in Resources */ = {isa = PBXBuildFile; fileRef = CC85D4B411681EC500D3FE00 /* README.mdown */; }; - CC85D4D21168229C00D3FE00 /* FooterTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CC85D4D11168229C00D3FE00 /* FooterTableViewController.xib */; }; - CC85D5F211682A2500D3FE00 /* DemoPostController.m in Sources */ = {isa = PBXBuildFile; fileRef = CC85D5F011682A2500D3FE00 /* DemoPostController.m */; }; - CC85D5F311682A2500D3FE00 /* DemoPostController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CC85D5F111682A2500D3FE00 /* DemoPostController.xib */; }; - CC85D6D411682DCA00D3FE00 /* DemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CC85D6D211682DC900D3FE00 /* DemoViewController.m */; }; - CC85D6D511682DCA00D3FE00 /* DemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CC85D6D311682DC900D3FE00 /* DemoViewController.xib */; }; - CC85D6E611682E9B00D3FE00 /* blueArrow.png in Resources */ = {isa = PBXBuildFile; fileRef = CC85D6E511682E9B00D3FE00 /* blueArrow.png */; }; - CC85D725116830A300D3FE00 /* DemoMessageController.m in Sources */ = {isa = PBXBuildFile; fileRef = CC85D723116830A300D3FE00 /* DemoMessageController.m */; }; - CC85D726116830A300D3FE00 /* DemoMessageController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CC85D724116830A300D3FE00 /* DemoMessageController.xib */; }; - CC85D8221168373300D3FE00 /* StyleSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = CC85D8211168373300D3FE00 /* StyleSheet.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E37963911B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962511B9B8400011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37963B11B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962511B9B8400011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37963F11B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962811B9B8400011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37964111B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962811B9B8400011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37964511B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962B11B9B8400011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37964711B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962B11B9B8400011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37964B11B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962E11B9B8400011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37964D11B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962E11B9B8400011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37965111B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37963111B9B8400011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37965311B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37963111B9B8400011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37965711B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37963411B9B8400011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37965911B9B8400011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37963411B9B8400011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37966411B9B87B0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37963111B9B8400011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37966611B9B87B0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962E11B9B8400011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37966811B9B87B0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962B11B9B8400011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37966A11B9B87B0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962511B9B8400011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37966C11B9B87B0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37963411B9B8400011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37966E11B9B87B0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37962811B9B8400011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E60855611B0DED900C93CD4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E60854811B0DED900C93CD4 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6E60855811B0DED900C93CD4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E60854811B0DED900C93CD4 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E60855B11B0DEE300C93CD4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E60854811B0DED900C93CD4 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* NibDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NibDemoAppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* NibDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NibDemoAppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* TTNibDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TTNibDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28A0AAE50D9B0CCF005BE974 /* TTNibDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTNibDemo_Prefix.pch; sourceTree = ""; }; - 28AD735F0D9D9599002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; - 28C286DF0D94DF7D0034E888 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; - 28C286E00D94DF7D0034E888 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; - 28F335F01007B36200424DE2 /* DemoTableViewController.xib */ = {isa = PBXFileReference; explicitFileType = file.xib; path = DemoTableViewController.xib; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6E37962511B9B8400011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../../../src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37962811B9B8400011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../../../src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37962B11B9B8400011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../../../src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37962E11B9B8400011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../../../src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37963111B9B8400011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../../../src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37963411B9B8400011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../../../src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6084F311B0DEA600C93CD4 /* App.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = App.xcconfig; path = Configurations/App.xcconfig; sourceTree = ""; }; - 6E6084F411B0DEA600C93CD4 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E6084F511B0DEA600C93CD4 /* RelPath.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = RelPath.xcconfig; path = Configurations/RelPath.xcconfig; sourceTree = ""; }; - 6E6084F611B0DEA600C93CD4 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6E60854811B0DED900C93CD4 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../../../src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E60856611B0DFF900C93CD4 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../../../src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E60858711B0E00800C93CD4 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../../Resources/Default.png; sourceTree = SOURCE_ROOT; }; - 6E60858811B0E00800C93CD4 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../../Resources/Icon.png; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* TTNibDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TTNibDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - CC85CDA41167DF3B00D3FE00 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - CC85CE011167E25200D3FE00 /* DemoTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoTableViewController.h; sourceTree = ""; }; - CC85CE021167E25200D3FE00 /* DemoTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoTableViewController.m; sourceTree = ""; }; - CC85D4B411681EC500D3FE00 /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = ""; }; - CC85D4D11168229C00D3FE00 /* FooterTableViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FooterTableViewController.xib; sourceTree = ""; }; - CC85D5EF11682A2500D3FE00 /* DemoPostController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoPostController.h; sourceTree = ""; }; - CC85D5F011682A2500D3FE00 /* DemoPostController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoPostController.m; sourceTree = ""; }; - CC85D5F111682A2500D3FE00 /* DemoPostController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = DemoPostController.xib; path = Classes/DemoPostController.xib; sourceTree = ""; }; - CC85D6D111682DC900D3FE00 /* DemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoViewController.h; sourceTree = ""; }; - CC85D6D211682DC900D3FE00 /* DemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoViewController.m; sourceTree = ""; }; - CC85D6D311682DC900D3FE00 /* DemoViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = DemoViewController.xib; path = Classes/DemoViewController.xib; sourceTree = ""; }; - CC85D6E511682E9B00D3FE00 /* blueArrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blueArrow.png; sourceTree = SOURCE_ROOT; }; - CC85D722116830A300D3FE00 /* DemoMessageController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoMessageController.h; sourceTree = ""; }; - CC85D723116830A300D3FE00 /* DemoMessageController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoMessageController.m; sourceTree = ""; }; - CC85D724116830A300D3FE00 /* DemoMessageController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = DemoMessageController.xib; path = Classes/DemoMessageController.xib; sourceTree = ""; }; - CC85D8201168373300D3FE00 /* StyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleSheet.h; sourceTree = ""; }; - CC85D8211168373300D3FE00 /* StyleSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StyleSheet.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, - CC85CDA51167DF3B00D3FE00 /* QuartzCore.framework in Frameworks */, - 6E60855A11B0DEDB00C93CD4 /* libThree20.a in Frameworks */, - 6E37965B11B9B8460011C497 /* libThree20Core.a in Frameworks */, - 6E37965C11B9B8470011C497 /* libThree20Network.a in Frameworks */, - 6E37965D11B9B8470011C497 /* libThree20Style.a in Frameworks */, - 6E37965E11B9B8480011C497 /* libThree20UI.a in Frameworks */, - 6E37965F11B9B8490011C497 /* libThree20UICommon.a in Frameworks */, - 6E37966011B9B8490011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 6EEA881E116D74A0007B0155 /* Style Sheets */, - 6EEA881F116D74A8007B0155 /* Controllers */, - 1D3623240D0F684500981E51 /* NibDemoAppDelegate.h */, - 1D3623250D0F684500981E51 /* NibDemoAppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* TTNibDemo.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - CC85D4B411681EC500D3FE00 /* README.mdown */, - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 6E6084F811B0DEAC00C93CD4 /* Configurations */, - 6E60854611B0DEC900C93CD4 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 28A0AAE50D9B0CCF005BE974 /* TTNibDemo_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - CC85D6E411682E7A00D3FE00 /* art */, - 6E60856611B0DFF900C93CD4 /* Three20.bundle */, - CC85D724116830A300D3FE00 /* DemoMessageController.xib */, - CC85D5F111682A2500D3FE00 /* DemoPostController.xib */, - CC85D6D311682DC900D3FE00 /* DemoViewController.xib */, - CC85D4D11168229C00D3FE00 /* FooterTableViewController.xib */, - 28F335F01007B36200424DE2 /* DemoTableViewController.xib */, - 28AD735F0D9D9599002E5188 /* MainWindow.xib */, - 8D1107310486CEB800E47090 /* TTNibDemo-Info.plist */, - 6E60858711B0E00800C93CD4 /* Default.png */, - 6E60858811B0E00800C93CD4 /* Icon.png */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, - CC85CDA41167DF3B00D3FE00 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37962611B9B8400011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37963A11B9B8400011C497 /* libThree20Core.a */, - 6E37963C11B9B8400011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37962911B9B8400011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37964011B9B8400011C497 /* libThree20Network.a */, - 6E37964211B9B8400011C497 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37962C11B9B8400011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37964611B9B8400011C497 /* libThree20Style.a */, - 6E37964811B9B8400011C497 /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37962F11B9B8400011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37964C11B9B8400011C497 /* libThree20UICommon.a */, - 6E37964E11B9B8400011C497 /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37963211B9B8400011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37965211B9B8400011C497 /* libThree20UINavigator.a */, - 6E37965411B9B8400011C497 /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37963511B9B8400011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37965811B9B8400011C497 /* libThree20UI.a */, - 6E37965A11B9B8400011C497 /* UIUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37966311B9B8550011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E37962511B9B8400011C497 /* Three20Core.xcodeproj */, - 6E37962811B9B8400011C497 /* Three20Network.xcodeproj */, - 6E37962B11B9B8400011C497 /* Three20Style.xcodeproj */, - 6E37962E11B9B8400011C497 /* Three20UICommon.xcodeproj */, - 6E37963111B9B8400011C497 /* Three20UINavigator.xcodeproj */, - 6E37963411B9B8400011C497 /* Three20UI.xcodeproj */, - 6E60854811B0DED900C93CD4 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E6084F811B0DEAC00C93CD4 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E6084F311B0DEA600C93CD4 /* App.xcconfig */, - 6E6084F411B0DEA600C93CD4 /* Project.xcconfig */, - 6E6084F511B0DEA600C93CD4 /* RelPath.xcconfig */, - 6E6084F611B0DEA600C93CD4 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6E60854611B0DEC900C93CD4 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37966311B9B8550011C497 /* Three20 */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E60854911B0DED900C93CD4 /* Products */ = { - isa = PBXGroup; - children = ( - 6E60855711B0DED900C93CD4 /* libThree20.a */, - 6E60855911B0DED900C93CD4 /* Three20UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EEA881E116D74A0007B0155 /* Style Sheets */ = { - isa = PBXGroup; - children = ( - CC85D8201168373300D3FE00 /* StyleSheet.h */, - CC85D8211168373300D3FE00 /* StyleSheet.m */, - ); - name = "Style Sheets"; - sourceTree = ""; - }; - 6EEA881F116D74A8007B0155 /* Controllers */ = { - isa = PBXGroup; - children = ( - 6EEA8855116D76BE007B0155 /* Table Controller */, - 6EEA8839116D759B007B0155 /* Other */, - 28C286DF0D94DF7D0034E888 /* RootViewController.h */, - 28C286E00D94DF7D0034E888 /* RootViewController.m */, - ); - name = Controllers; - sourceTree = ""; - }; - 6EEA8820116D74B3007B0155 /* Message Controller */ = { - isa = PBXGroup; - children = ( - CC85D722116830A300D3FE00 /* DemoMessageController.h */, - CC85D723116830A300D3FE00 /* DemoMessageController.m */, - ); - name = "Message Controller"; - sourceTree = ""; - }; - 6EEA8838116D758C007B0155 /* View Controller */ = { - isa = PBXGroup; - children = ( - CC85D6D111682DC900D3FE00 /* DemoViewController.h */, - CC85D6D211682DC900D3FE00 /* DemoViewController.m */, - ); - name = "View Controller"; - sourceTree = ""; - }; - 6EEA8839116D759B007B0155 /* Other */ = { - isa = PBXGroup; - children = ( - 6EEA883A116D75A3007B0155 /* Post Controller */, - 6EEA8838116D758C007B0155 /* View Controller */, - 6EEA8820116D74B3007B0155 /* Message Controller */, - ); - name = Other; - sourceTree = ""; - }; - 6EEA883A116D75A3007B0155 /* Post Controller */ = { - isa = PBXGroup; - children = ( - CC85D5EF11682A2500D3FE00 /* DemoPostController.h */, - CC85D5F011682A2500D3FE00 /* DemoPostController.m */, - ); - name = "Post Controller"; - sourceTree = ""; - }; - 6EEA8855116D76BE007B0155 /* Table Controller */ = { - isa = PBXGroup; - children = ( - CC85CE011167E25200D3FE00 /* DemoTableViewController.h */, - CC85CE021167E25200D3FE00 /* DemoTableViewController.m */, - ); - name = "Table Controller"; - sourceTree = ""; - }; - CC85D6E411682E7A00D3FE00 /* art */ = { - isa = PBXGroup; - children = ( - CC85D6E511682E9B00D3FE00 /* blueArrow.png */, - ); - name = art; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* TTNibDemo */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTNibDemo" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E60855C11B0DEE300C93CD4 /* PBXTargetDependency */, - 6E37966511B9B87B0011C497 /* PBXTargetDependency */, - 6E37966711B9B87B0011C497 /* PBXTargetDependency */, - 6E37966911B9B87B0011C497 /* PBXTargetDependency */, - 6E37966B11B9B87B0011C497 /* PBXTargetDependency */, - 6E37966D11B9B87B0011C497 /* PBXTargetDependency */, - 6E37966F11B9B87B0011C497 /* PBXTargetDependency */, - ); - name = TTNibDemo; - productName = TTNibDemo; - productReference = 1D6058910D05DD3D006BFB54 /* TTNibDemo.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTNibDemo" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - en, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E60854911B0DED900C93CD4 /* Products */; - ProjectRef = 6E60854811B0DED900C93CD4 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37962611B9B8400011C497 /* Products */; - ProjectRef = 6E37962511B9B8400011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37962911B9B8400011C497 /* Products */; - ProjectRef = 6E37962811B9B8400011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37962C11B9B8400011C497 /* Products */; - ProjectRef = 6E37962B11B9B8400011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37963511B9B8400011C497 /* Products */; - ProjectRef = 6E37963411B9B8400011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37962F11B9B8400011C497 /* Products */; - ProjectRef = 6E37962E11B9B8400011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37963211B9B8400011C497 /* Products */; - ProjectRef = 6E37963111B9B8400011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* TTNibDemo */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E37963A11B9B8400011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37963911B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37963C11B9B8400011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37963B11B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37964011B9B8400011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37963F11B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37964211B9B8400011C497 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E37964111B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37964611B9B8400011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E37964511B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37964811B9B8400011C497 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E37964711B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37964C11B9B8400011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E37964B11B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37964E11B9B8400011C497 /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6E37964D11B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37965211B9B8400011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E37965111B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37965411B9B8400011C497 /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6E37965311B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37965811B9B8400011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E37965711B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37965A11B9B8400011C497 /* UIUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UIUnitTests.octest; - remoteRef = 6E37965911B9B8400011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E60855711B0DED900C93CD4 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6E60855611B0DED900C93CD4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E60855911B0DED900C93CD4 /* Three20UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = Three20UnitTests.octest; - remoteRef = 6E60855811B0DED900C93CD4 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 28AD73600D9D9599002E5188 /* MainWindow.xib in Resources */, - 28F335F11007B36200424DE2 /* DemoTableViewController.xib in Resources */, - CC85D4B511681EC500D3FE00 /* README.mdown in Resources */, - CC85D4D21168229C00D3FE00 /* FooterTableViewController.xib in Resources */, - CC85D5F311682A2500D3FE00 /* DemoPostController.xib in Resources */, - CC85D6D511682DCA00D3FE00 /* DemoViewController.xib in Resources */, - CC85D6E611682E9B00D3FE00 /* blueArrow.png in Resources */, - CC85D726116830A300D3FE00 /* DemoMessageController.xib in Resources */, - 6E60856711B0DFF900C93CD4 /* Three20.bundle in Resources */, - 6E60858911B0E00800C93CD4 /* Default.png in Resources */, - 6E60858A11B0E00800C93CD4 /* Icon.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* NibDemoAppDelegate.m in Sources */, - 28C286E10D94DF7D0034E888 /* RootViewController.m in Sources */, - CC85CE031167E25200D3FE00 /* DemoTableViewController.m in Sources */, - CC85D5F211682A2500D3FE00 /* DemoPostController.m in Sources */, - CC85D6D411682DCA00D3FE00 /* DemoViewController.m in Sources */, - CC85D725116830A300D3FE00 /* DemoMessageController.m in Sources */, - CC85D8221168373300D3FE00 /* StyleSheet.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E37966511B9B87B0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E37966411B9B87B0011C497 /* PBXContainerItemProxy */; - }; - 6E37966711B9B87B0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E37966611B9B87B0011C497 /* PBXContainerItemProxy */; - }; - 6E37966911B9B87B0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E37966811B9B87B0011C497 /* PBXContainerItemProxy */; - }; - 6E37966B11B9B87B0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E37966A11B9B87B0011C497 /* PBXContainerItemProxy */; - }; - 6E37966D11B9B87B0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E37966C11B9B87B0011C497 /* PBXContainerItemProxy */; - }; - 6E37966F11B9B87B0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E37966E11B9B87B0011C497 /* PBXContainerItemProxy */; - }; - 6E60855C11B0DEE300C93CD4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6E60855B11B0DEE300C93CD4 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6084F311B0DEA600C93CD4 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6084F311B0DEA600C93CD4 /* App.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6084F411B0DEA600C93CD4 /* Project.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "TTNibDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TTNibDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/samples/UI/TTNibDemo/blueArrow.png b/samples/UI/TTNibDemo/blueArrow.png deleted file mode 100755 index 9ee946b5f9..0000000000 Binary files a/samples/UI/TTNibDemo/blueArrow.png and /dev/null differ diff --git a/samples/UI/TTNibDemo/main.m b/samples/UI/TTNibDemo/main.m deleted file mode 100644 index 8dfb69ae35..0000000000 --- a/samples/UI/TTNibDemo/main.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, nil); - [pool release]; - return retVal; -} diff --git a/samples/common/Configurations/App.xcconfig b/samples/common/Configurations/App.xcconfig deleted file mode 100644 index df39effefb..0000000000 --- a/samples/common/Configurations/App.xcconfig +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -GCC_PRECOMPILE_PREFIX_HEADER = YES -GCC_PREFIX_HEADER = $(SRCROOT)/Headers/$(BASE_PRODUCT_NAME)_Prefix.pch -RUN_CLANG_STATIC_ANALYZER = NO - -FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)/Developer/Library/Frameworks" -IPHONEOS_DEPLOYMENT_TARGET = 3.0 - -INFOPLIST_FILE = $(BASE_PRODUCT_NAME)-Info.plist - -// Linker Flags - -OTHER_LDFLAGS = $(OBJC_LIBRARY) - -// Warning flags - -GCC_WARN_CHECK_SWITCH_STATEMENTS = NO -GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES -GCC_WARN_SHADOW = YES -GCC_WARN_ABOUT_MISSING_NEWLINE = YES -GCC_WARN_UNUSED_FUNCTION = YES -GCC_WARN_UNUSED_LABEL = YES - diff --git a/samples/common/Configurations/Libraries.xcconfig b/samples/common/Configurations/Libraries.xcconfig deleted file mode 100644 index b5f4218e2a..0000000000 --- a/samples/common/Configurations/Libraries.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../../src/common/Configurations/Libraries.xcconfig" diff --git a/samples/common/Configurations/Paths.xcconfig b/samples/common/Configurations/Paths.xcconfig deleted file mode 100644 index 1b832f333d..0000000000 --- a/samples/common/Configurations/Paths.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../../src/common/Configurations/Paths.xcconfig" diff --git a/samples/common/Configurations/Project.xcconfig b/samples/common/Configurations/Project.xcconfig deleted file mode 100644 index fd78d50ebd..0000000000 --- a/samples/common/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "Paths.xcconfig" diff --git a/samples/common/Configurations/UnitTests.xcconfig b/samples/common/Configurations/UnitTests.xcconfig deleted file mode 100644 index 97a0a2998f..0000000000 --- a/samples/common/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../../../src/common/Configurations/UnitTests.xcconfig" -#include "Paths.xcconfig" diff --git a/src/Three20.bundle/de.lproj/Localizable.strings b/src/Three20.bundle/de.lproj/Localizable.strings deleted file mode 100644 index 34a498d50a..0000000000 Binary files a/src/Three20.bundle/de.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/en.lproj/Localizable.strings b/src/Three20.bundle/en.lproj/Localizable.strings deleted file mode 100644 index fd81b2aca9..0000000000 Binary files a/src/Three20.bundle/en.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/es.lproj/Localizable.strings b/src/Three20.bundle/es.lproj/Localizable.strings deleted file mode 100644 index 55c0b98242..0000000000 Binary files a/src/Three20.bundle/es.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/fr.lproj/Localizable.strings b/src/Three20.bundle/fr.lproj/Localizable.strings deleted file mode 100644 index 6a139eb509..0000000000 Binary files a/src/Three20.bundle/fr.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/images/backIcon.png b/src/Three20.bundle/images/backIcon.png deleted file mode 100644 index 946ce2a8e2..0000000000 Binary files a/src/Three20.bundle/images/backIcon.png and /dev/null differ diff --git a/src/Three20.bundle/images/backIcon@2x.png b/src/Three20.bundle/images/backIcon@2x.png deleted file mode 100644 index 2694eac538..0000000000 Binary files a/src/Three20.bundle/images/backIcon@2x.png and /dev/null differ diff --git a/src/Three20.bundle/images/blackArrow.png b/src/Three20.bundle/images/blackArrow.png deleted file mode 100755 index 4d66015ba5..0000000000 Binary files a/src/Three20.bundle/images/blackArrow.png and /dev/null differ diff --git a/src/Three20.bundle/images/blueArrow.png b/src/Three20.bundle/images/blueArrow.png deleted file mode 100644 index 51aefeaacd..0000000000 Binary files a/src/Three20.bundle/images/blueArrow.png and /dev/null differ diff --git a/src/Three20.bundle/images/blueArrow@2x.png b/src/Three20.bundle/images/blueArrow@2x.png deleted file mode 100644 index 91399cea8f..0000000000 Binary files a/src/Three20.bundle/images/blueArrow@2x.png and /dev/null differ diff --git a/src/Three20.bundle/images/closeButton.png b/src/Three20.bundle/images/closeButton.png deleted file mode 100644 index 055a54d73e..0000000000 Binary files a/src/Three20.bundle/images/closeButton.png and /dev/null differ diff --git a/src/Three20.bundle/images/empty.png b/src/Three20.bundle/images/empty.png deleted file mode 100644 index c0496afb81..0000000000 Binary files a/src/Three20.bundle/images/empty.png and /dev/null differ diff --git a/src/Three20.bundle/images/error.png b/src/Three20.bundle/images/error.png deleted file mode 100644 index 4fac9fe8d5..0000000000 Binary files a/src/Three20.bundle/images/error.png and /dev/null differ diff --git a/src/Three20.bundle/images/forwardIcon.png b/src/Three20.bundle/images/forwardIcon.png deleted file mode 100644 index fd59ee3048..0000000000 Binary files a/src/Three20.bundle/images/forwardIcon.png and /dev/null differ diff --git a/src/Three20.bundle/images/forwardIcon@2x.png b/src/Three20.bundle/images/forwardIcon@2x.png deleted file mode 100644 index 732d9e6612..0000000000 Binary files a/src/Three20.bundle/images/forwardIcon@2x.png and /dev/null differ diff --git a/src/Three20.bundle/images/nextIcon.png b/src/Three20.bundle/images/nextIcon.png deleted file mode 100644 index feacfa4654..0000000000 Binary files a/src/Three20.bundle/images/nextIcon.png and /dev/null differ diff --git a/src/Three20.bundle/images/nextIcon@2x.png b/src/Three20.bundle/images/nextIcon@2x.png deleted file mode 100644 index b0354e08e3..0000000000 Binary files a/src/Three20.bundle/images/nextIcon@2x.png and /dev/null differ diff --git a/src/Three20.bundle/images/overflowLeft.png b/src/Three20.bundle/images/overflowLeft.png deleted file mode 100644 index f7ec4c76c9..0000000000 Binary files a/src/Three20.bundle/images/overflowLeft.png and /dev/null differ diff --git a/src/Three20.bundle/images/overflowRight.png b/src/Three20.bundle/images/overflowRight.png deleted file mode 100644 index c8fc2748c6..0000000000 Binary files a/src/Three20.bundle/images/overflowRight.png and /dev/null differ diff --git a/src/Three20.bundle/images/photoDefault.png b/src/Three20.bundle/images/photoDefault.png deleted file mode 100644 index 35d940fb83..0000000000 Binary files a/src/Three20.bundle/images/photoDefault.png and /dev/null differ diff --git a/src/Three20.bundle/images/previousIcon.png b/src/Three20.bundle/images/previousIcon.png deleted file mode 100644 index 3554e9ff7f..0000000000 Binary files a/src/Three20.bundle/images/previousIcon.png and /dev/null differ diff --git a/src/Three20.bundle/images/previousIcon@2x.png b/src/Three20.bundle/images/previousIcon@2x.png deleted file mode 100644 index 817d143cda..0000000000 Binary files a/src/Three20.bundle/images/previousIcon@2x.png and /dev/null differ diff --git a/src/Three20.bundle/images/searchIcon.png b/src/Three20.bundle/images/searchIcon.png deleted file mode 100644 index 8dde2b4bf4..0000000000 Binary files a/src/Three20.bundle/images/searchIcon.png and /dev/null differ diff --git a/src/Three20.bundle/images/whiteArrow.png b/src/Three20.bundle/images/whiteArrow.png deleted file mode 100755 index 3e25a324bd..0000000000 Binary files a/src/Three20.bundle/images/whiteArrow.png and /dev/null differ diff --git a/src/Three20.bundle/it.lproj/Localizable.strings b/src/Three20.bundle/it.lproj/Localizable.strings deleted file mode 100644 index 3281672c03..0000000000 Binary files a/src/Three20.bundle/it.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/ja.lproj/Localizable.strings b/src/Three20.bundle/ja.lproj/Localizable.strings deleted file mode 100644 index b994a64592..0000000000 Binary files a/src/Three20.bundle/ja.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/ko.lproj/Localizable.strings b/src/Three20.bundle/ko.lproj/Localizable.strings deleted file mode 100644 index 6058ca146e..0000000000 Binary files a/src/Three20.bundle/ko.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/nl.lproj/Localizable.strings b/src/Three20.bundle/nl.lproj/Localizable.strings deleted file mode 100644 index ef2c52e617..0000000000 Binary files a/src/Three20.bundle/nl.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/pt.lproj/Localizable.strings b/src/Three20.bundle/pt.lproj/Localizable.strings deleted file mode 100644 index fd554071a5..0000000000 Binary files a/src/Three20.bundle/pt.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/ru.lproj/Localizable.strings b/src/Three20.bundle/ru.lproj/Localizable.strings deleted file mode 100644 index 7ebd0c8ffe..0000000000 Binary files a/src/Three20.bundle/ru.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/tr.lproj/Localizable.strings b/src/Three20.bundle/tr.lproj/Localizable.strings deleted file mode 100644 index b12eef3106..0000000000 Binary files a/src/Three20.bundle/tr.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/zh_cn.lproj/Localizable.strings b/src/Three20.bundle/zh_cn.lproj/Localizable.strings deleted file mode 100644 index d29cff6ae3..0000000000 Binary files a/src/Three20.bundle/zh_cn.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20.bundle/zh_tw.lproj/Localizable.strings b/src/Three20.bundle/zh_tw.lproj/Localizable.strings deleted file mode 100644 index d9d62e1636..0000000000 Binary files a/src/Three20.bundle/zh_tw.lproj/Localizable.strings and /dev/null differ diff --git a/src/Three20/Configurations/Library.xcconfig b/src/Three20/Configurations/Library.xcconfig deleted file mode 100644 index 328eac0bd1..0000000000 --- a/src/Three20/Configurations/Library.xcconfig +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = Three20 -BUILD_LIBRARY_VERSION = 1.0 diff --git a/src/Three20/Configurations/Project.xcconfig b/src/Three20/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/Three20/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/Three20/Configurations/UnitTests.xcconfig b/src/Three20/Configurations/UnitTests.xcconfig deleted file mode 100644 index 73d683fd8e..0000000000 --- a/src/Three20/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = Three20UnitTests -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(COREGRAPHICS_FX) $(QUARTZCORE_FX) diff --git a/src/Three20/Headers/Three20+Additions.h b/src/Three20/Headers/Three20+Additions.h deleted file mode 100644 index dd2e5274f5..0000000000 --- a/src/Three20/Headers/Three20+Additions.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Three20, without additions. -#import "Three20/Three20.h" - -// Core Additions -#import "Three20Core/Three20Core+Additions.h" - -// Network Additions -// No additions for Network yet. -//#import "Three20Network/Three20Network+Additions.h" - -// Style Additions -#import "Three20Style/Three20Style+Additions.h" - -// UICommon -#import "Three20UICommon/Three20UICommon+Additions.h" - -// UINavigator -#import "Three20UINavigator/Three20UINavigator+Additions.h" - -// UI Additions -#import "Three20UI/Three20UI+Additions.h" diff --git a/src/Three20/Headers/Three20.h b/src/Three20/Headers/Three20.h deleted file mode 100644 index d41cc8507f..0000000000 --- a/src/Three20/Headers/Three20.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/*! \mainpage Three20 API Documentation - * - * Generated from Three20 Release 1.0.5. - * - */ - -// Core -#import "Three20Core/Three20Core.h" - -// Network -#import "Three20Network/Three20Network.h" - -// Style -#import "Three20Style/Three20Style.h" - -// UICommon -#import "Three20UICommon/Three20UICommon.h" - -// UINavigator -#import "Three20UINavigator/Three20UINavigator.h" - -// UI -#import "Three20UI/Three20UI.h" diff --git a/src/Three20/Headers/Three20_Prefix.pch b/src/Three20/Headers/Three20_Prefix.pch deleted file mode 100644 index 8b42a1811c..0000000000 --- a/src/Three20/Headers/Three20_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'Three20' target in the 'Three20' project -// - -#ifdef __OBJC__ - #import - #import -#endif - diff --git a/src/Three20/Source/Three20.m b/src/Three20/Source/Three20.m deleted file mode 100644 index e5183a44ac..0000000000 --- a/src/Three20/Source/Three20.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20/Three20.h" - -// Hello, world. diff --git a/src/Three20/Three20.xcodeproj/project.pbxproj b/src/Three20/Three20.xcodeproj/project.pbxproj deleted file mode 100755 index e4dacfb71f..0000000000 --- a/src/Three20/Three20.xcodeproj/project.pbxproj +++ /dev/null @@ -1,894 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 665A56D71265240E0032D0BE /* BasicTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 665A56D61265240E0032D0BE /* BasicTests.m */; }; - 6E6454741184D2CD00F08CB1 /* Three20.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454731184D2CD00F08CB1 /* Three20.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6454931184D3ED00F08CB1 /* Three20+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454921184D3ED00F08CB1 /* Three20+Additions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6454AA1184D43100F08CB1 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E6454A71184D42800F08CB1 /* libThree20Style.a */; }; - 6E7F96FB118E363500443B46 /* Three20.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F96FA118E363500443B46 /* Three20.m */; }; - 6EDAEA1D118CA5E20008133C /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EDAEA09118CA5B50008133C /* libThree20UICommon.a */; }; - 6EDAEA1E118CA5E20008133C /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EDAEA12118CA5BE0008133C /* libThree20UINavigator.a */; }; - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE7366C11849C5800A35176 /* libThree20Core.a */; }; - 6EE738A61184ADB800A35176 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE738A31184ADB400A35176 /* libThree20Network.a */; }; - 6EE739D01184BB0400A35176 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libThree20.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 66FC2E291265264C00F56B19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = "Three20-Xcode3.2.4"; - }; - 66FC2E2B1265264C00F56B19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = "UnitTests-Xcode3.2.4"; - }; - 66FC2E2D1265264C00F56B19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = "UnitTests-Xcode3.2.4"; - }; - 66FC2E2F1265264C00F56B19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = "UnitTests-Xcode3.2.4"; - }; - 66FC2E311265264C00F56B19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = "UnitTests-Xcode3.2.4"; - }; - 66FC2E331265264C00F56B19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = "UnitTests-Xcode3.2.4"; - }; - 66FC2E351265264C00F56B19 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9677118E353700443B46 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = "UnitTests-Xcode3.2.4"; - }; - 6E6454A61184D42800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E6454A81184D42800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E6454AE1184D46800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E7F9684118E353800443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9677118E353700443B46 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E7F9686118E353800443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9677118E353700443B46 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E7F968E118E355A00443B46 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E7F9677118E353700443B46 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EDAEA08118CA5B50008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6EDAEA0A118CA5B50008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EDAEA11118CA5BE0008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6EDAEA13118CA5BE0008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EDAEA15118CA5CA0008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6EDAEA17118CA5CA0008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE7367011849C6300A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE738A21184ADB400A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6EE738A41184ADB400A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE738AA1184ADD000A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 665A56D61265240E0032D0BE /* BasicTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BasicTests.m; path = UnitTests/BasicTests.m; sourceTree = ""; }; - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E6454731184D2CD00F08CB1 /* Three20.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20.h; path = Headers/Three20.h; sourceTree = ""; }; - 6E6454921184D3ED00F08CB1 /* Three20+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Three20+Additions.h"; path = "Headers/Three20+Additions.h"; sourceTree = ""; }; - 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6458CB11875F8400F08CB1 /* Three20_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20_Prefix.pch; path = Headers/Three20_Prefix.pch; sourceTree = ""; }; - 6E7F9677118E353700443B46 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../Three20UI/Three20UI.xcodeproj; sourceTree = ""; }; - 6E7F96FA118E363500443B46 /* Three20.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Three20.m; path = Source/Three20.m; sourceTree = ""; }; - 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../Three20UICommon/Three20UICommon.xcodeproj; sourceTree = ""; }; - 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = ""; }; - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EE7364B11849B3D00A35176 /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - BEF31F3A0F352DF5000DE5D2 /* libThree20.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libThree20.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* Three20UnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Three20UnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */, - 6EE738A61184ADB800A35176 /* libThree20Network.a in Frameworks */, - 6EE739D01184BB0400A35176 /* libThree20.a in Frameworks */, - 6E6454AA1184D43100F08CB1 /* libThree20Style.a in Frameworks */, - 6EDAEA1D118CA5E20008133C /* libThree20UICommon.a in Frameworks */, - 6EDAEA1E118CA5E20008133C /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libThree20.a */, - EB9E6C6210B6A8F800DE563C /* Three20UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6E6454731184D2CD00F08CB1 /* Three20.h */, - 6E6454921184D3ED00F08CB1 /* Three20+Additions.h */, - 6E6458CB11875F8400F08CB1 /* Three20_Prefix.pch */, - 6E7F96F2118E361F00443B46 /* Sources */, - 6E08B743118397FA00DA1579 /* Dependencies */, - 6EE7364D11849B4200A35176 /* Configurations */, - 6E08B274118282F700DA1579 /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 6E08B274118282F700DA1579 /* Tests */ = { - isa = PBXGroup; - children = ( - 6EE7364611849AF200A35176 /* Resources */, - 665A56D61265240E0032D0BE /* BasicTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6E08B743118397FA00DA1579 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */, - 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */, - 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */, - 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */, - 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */, - 6E7F9677118E353700443B46 /* Three20UI.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E6454A21184D42800F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E6454A71184D42800F08CB1 /* libThree20Style.a */, - 6E6454A91184D42800F08CB1 /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E7F9678118E353800443B46 /* Products */ = { - isa = PBXGroup; - children = ( - 6E7F9685118E353800443B46 /* libThree20UI.a */, - 6E7F9687118E353800443B46 /* UIUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E7F96F2118E361F00443B46 /* Sources */ = { - isa = PBXGroup; - children = ( - 6E7F96FA118E363500443B46 /* Three20.m */, - ); - name = Sources; - sourceTree = ""; - }; - 6EDAEA04118CA5B50008133C /* Products */ = { - isa = PBXGroup; - children = ( - 6EDAEA09118CA5B50008133C /* libThree20UICommon.a */, - 6EDAEA0B118CA5B50008133C /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EDAEA0D118CA5BE0008133C /* Products */ = { - isa = PBXGroup; - children = ( - 6EDAEA12118CA5BE0008133C /* libThree20UINavigator.a */, - 6EDAEA14118CA5BE0008133C /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EE7364611849AF200A35176 /* Resources */ = { - isa = PBXGroup; - children = ( - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6EE7364D11849B4200A35176 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6EE7364B11849B3D00A35176 /* Library.xcconfig */, - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */, - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6EE7366711849C5800A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE7366C11849C5800A35176 /* libThree20Core.a */, - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EE7389E1184ADB400A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE738A31184ADB400A35176 /* libThree20Network.a */, - 6EE738A51184ADB400A35176 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E6454741184D2CD00F08CB1 /* Three20.h in Headers */, - 6E6454931184D3ED00F08CB1 /* Three20+Additions.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* Three20 */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E645F461187B01F00F08CB1 /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E6653131ADFFD00ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EE7367111849C6300A35176 /* PBXTargetDependency */, - 6EE738AB1184ADD000A35176 /* PBXTargetDependency */, - 6E6454AF1184D46800F08CB1 /* PBXTargetDependency */, - 6EDAEA16118CA5CA0008133C /* PBXTargetDependency */, - 6EDAEA18118CA5CA0008133C /* PBXTargetDependency */, - 6E7F968F118E355A00443B46 /* PBXTargetDependency */, - ); - name = Three20; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libThree20.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* Three20UnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20UnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 66FC2E2A1265264C00F56B19 /* PBXTargetDependency */, - 66FC2E2C1265264C00F56B19 /* PBXTargetDependency */, - 66FC2E2E1265264C00F56B19 /* PBXTargetDependency */, - 66FC2E341265264C00F56B19 /* PBXTargetDependency */, - 66FC2E301265264C00F56B19 /* PBXTargetDependency */, - 66FC2E321265264C00F56B19 /* PBXTargetDependency */, - 66FC2E361265264C00F56B19 /* PBXTargetDependency */, - ); - name = Three20UnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* Three20UnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EE7366711849C5800A35176 /* Products */; - ProjectRef = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6EE7389E1184ADB400A35176 /* Products */; - ProjectRef = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E6454A21184D42800F08CB1 /* Products */; - ProjectRef = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E7F9678118E353800443B46 /* Products */; - ProjectRef = 6E7F9677118E353700443B46 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6EDAEA04118CA5B50008133C /* Products */; - ProjectRef = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6EDAEA0D118CA5BE0008133C /* Products */; - ProjectRef = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* Three20 */, - EB9E6C6110B6A8F800DE563C /* Three20UnitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E6454A71184D42800F08CB1 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E6454A61184D42800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6454A91184D42800F08CB1 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E6454A81184D42800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7F9685118E353800443B46 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E7F9684118E353800443B46 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7F9687118E353800443B46 /* UIUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UIUnitTests.octest; - remoteRef = 6E7F9686118E353800443B46 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EDAEA09118CA5B50008133C /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6EDAEA08118CA5B50008133C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EDAEA0B118CA5B50008133C /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6EDAEA0A118CA5B50008133C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EDAEA12118CA5BE0008133C /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6EDAEA11118CA5BE0008133C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EDAEA14118CA5BE0008133C /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6EDAEA13118CA5BE0008133C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366C11849C5800A35176 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE738A31184ADB400A35176 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6EE738A21184ADB400A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE738A51184ADB400A35176 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6EE738A41184ADB400A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E6653131ADFFD00ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E645F461187B01F00F08CB1 /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E7F96FB118E363500443B46 /* Three20.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 665A56D71265240E0032D0BE /* BasicTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 66FC2E2A1265264C00F56B19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* Three20 */; - targetProxy = 66FC2E291265264C00F56B19 /* PBXContainerItemProxy */; - }; - 66FC2E2C1265264C00F56B19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "UnitTests-Xcode3.2.4"; - targetProxy = 66FC2E2B1265264C00F56B19 /* PBXContainerItemProxy */; - }; - 66FC2E2E1265264C00F56B19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "UnitTests-Xcode3.2.4"; - targetProxy = 66FC2E2D1265264C00F56B19 /* PBXContainerItemProxy */; - }; - 66FC2E301265264C00F56B19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "UnitTests-Xcode3.2.4"; - targetProxy = 66FC2E2F1265264C00F56B19 /* PBXContainerItemProxy */; - }; - 66FC2E321265264C00F56B19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "UnitTests-Xcode3.2.4"; - targetProxy = 66FC2E311265264C00F56B19 /* PBXContainerItemProxy */; - }; - 66FC2E341265264C00F56B19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "UnitTests-Xcode3.2.4"; - targetProxy = 66FC2E331265264C00F56B19 /* PBXContainerItemProxy */; - }; - 66FC2E361265264C00F56B19 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "UnitTests-Xcode3.2.4"; - targetProxy = 66FC2E351265264C00F56B19 /* PBXContainerItemProxy */; - }; - 6E6454AF1184D46800F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E6454AE1184D46800F08CB1 /* PBXContainerItemProxy */; - }; - 6E7F968F118E355A00443B46 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E7F968E118E355A00443B46 /* PBXContainerItemProxy */; - }; - 6EDAEA16118CA5CA0008133C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6EDAEA15118CA5CA0008133C /* PBXContainerItemProxy */; - }; - 6EDAEA18118CA5CA0008133C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6EDAEA17118CA5CA0008133C /* PBXContainerItemProxy */; - }; - 6EE7367111849C6300A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6EE7367011849C6300A35176 /* PBXContainerItemProxy */; - }; - 6EE738AB1184ADD000A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6EE738AA1184ADD000A35176 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - PRODUCT_NAME = "$(BASE_PRODUCT_NAME)"; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - PRODUCT_NAME = "$(BASE_PRODUCT_NAME)"; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - PRODUCT_NAME = "$(BASE_PRODUCT_NAME)"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PREBINDING = NO; - PRODUCT_NAME = "$(BASE_PRODUCT_NAME)"; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - PRODUCT_NAME = "$(BASE_PRODUCT_NAME)"; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - PREBINDING = NO; - PRODUCT_NAME = "$(BASE_PRODUCT_NAME)"; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20UnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/Three20/UnitTests/BasicTests.m b/src/Three20/UnitTests/BasicTests.m deleted file mode 100644 index 4bbf68b021..0000000000 --- a/src/Three20/UnitTests/BasicTests.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import -#import - -#import "Three20Style/TTGlobalStyle.h" - -@interface BasicTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation BasicTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTruth { - STAssertTrue(true, @"True!"); -} - - -@end diff --git a/src/Three20/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/Three20/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/Three20/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/Three20Core/Configurations/Library.xcconfig b/src/Three20Core/Configurations/Library.xcconfig deleted file mode 100644 index 9dfc080955..0000000000 --- a/src/Three20Core/Configurations/Library.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = Three20Core -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/src/Three20Core/Configurations/Project.xcconfig b/src/Three20Core/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/Three20Core/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/Three20Core/Configurations/UnitTests.xcconfig b/src/Three20Core/Configurations/UnitTests.xcconfig deleted file mode 100644 index 0b45d49c09..0000000000 --- a/src/Three20Core/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = CoreUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(COREGRAPHICS_FX) diff --git a/src/Three20Core/Headers/NSArrayAdditions.h b/src/Three20Core/Headers/NSArrayAdditions.h deleted file mode 100644 index e904a70093..0000000000 --- a/src/Three20Core/Headers/NSArrayAdditions.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@interface NSArray (TTCategory) - -/** - * Calls performSelector on all objects that can receive the selector in the array. - * Makes an iterable copy of the array, making it possible for the selector to modify - * the array. Contrast this with makeObjectsPerformSelector which does not allow side effects of - * modifying the array. - */ -- (void)perform:(SEL)selector; -- (void)perform:(SEL)selector withObject:(id)p1; -- (void)perform:(SEL)selector withObject:(id)p1 withObject:(id)p2; -- (void)perform:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3; - -/** - * Extensions to makeObjectsPerformSelector to provide support for more than one object - * parameter. - */ -- (void)makeObjectsPerformSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2; -- (void)makeObjectsPerformSelector: (SEL)selector - withObject: (id)p1 - withObject: (id)p2 - withObject: (id)p3; - -/** - * @return nil or an object that matches value with isEqual: - */ -- (id)objectWithValue:(id)value forKey:(id)key; - -/** - * @return the first object with the given class. - */ -- (id)objectWithClass:(Class)cls; - -/** - * @param selector Required format: - (NSNumber*)method:(id)object; - */ -- (BOOL)containsObject:(id)object withSelector:(SEL)selector; - -@end diff --git a/src/Three20Core/Headers/NSDataAdditions.h b/src/Three20Core/Headers/NSDataAdditions.h deleted file mode 100644 index 274534a4bb..0000000000 --- a/src/Three20Core/Headers/NSDataAdditions.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@interface NSData (TTCategory) - -/** - * Calculate the md5 hash of this data using CC_MD5. - * - * @return md5 hash of this data - */ -@property (nonatomic, readonly) NSString* md5Hash; - -/** - * Calculate the SHA1 hash of this data using CC_SHA1. - * - * @return SHA1 hash of this data - */ -@property (nonatomic, readonly) NSString* sha1Hash; - -@end diff --git a/src/Three20Core/Headers/NSDateAdditions.h b/src/Three20Core/Headers/NSDateAdditions.h deleted file mode 100644 index 649c0987bd..0000000000 --- a/src/Three20Core/Headers/NSDateAdditions.h +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@interface NSDate (TTCategory) - -/** - * Returns the current date with the time set to midnight. - */ -+ (NSDate*)dateWithToday; - -/** - * Returns a copy of the date with the time set to midnight on the same day. - */ -- (NSDate*)dateAtMidnight; - -/** - * Formats the date with 'h:mm a' or the localized equivalent. - */ -- (NSString*)formatTime; - -/** - * Formats the date with 'EEEE, LLLL d, YYYY' or the localized equivalent. - */ -- (NSString*)formatDate; - -/** - * Formats the date according to how old it is. - * - * For dates less than a day old, the format is 'h:mm a', for less than a week old the - * format is 'EEEE', and for anything older the format is 'M/d/yy'. - */ -- (NSString*)formatShortTime; - -/** - * Formats the date according to how old it is. - * - * For dates less than a day old, the format is 'h:mm a', for less than a week old the - * format is 'EEE h:mm a', and for anything older the format is 'MMM d h:mm a'. - */ -- (NSString*)formatDateTime; - -/** - * Formats dates within 24 hours like '5 minutes ago', or calls formatDateTime if older. - */ -- (NSString*)formatRelativeTime; - -/** - * Formats dates within 1 week like '5m' or '2d', or calls formatShortTime if older. - */ -- (NSString*)formatShortRelativeTime; - -/** - * Formats the date with 'MMMM d", "Today", or "Yesterday". - * - * You must supply date components for today and yesterday because they are relatively expensive - * to create, so it is best to avoid creating them every time you call this method if you - * are going to be calling it multiple times in a loop. - */ -- (NSString*)formatDay:(NSDateComponents*)today yesterday:(NSDateComponents*)yesterday; - -/** - * Formats the date with 'MMMM". - */ -- (NSString*)formatMonth; - -/** - * Formats the date with 'yyyy". - */ -- (NSString*)formatYear; - -@end diff --git a/src/Three20Core/Headers/NSMutableArrayAdditions.h b/src/Three20Core/Headers/NSMutableArrayAdditions.h deleted file mode 100644 index a95f320709..0000000000 --- a/src/Three20Core/Headers/NSMutableArrayAdditions.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@interface NSMutableArray (TTCategory) - -/** - * Adds a string on the condition that it's non-nil and non-empty. - */ -- (void)addNonEmptyString:(NSString*)string; - -@end diff --git a/src/Three20Core/Headers/NSMutableDictionaryAdditions.h b/src/Three20Core/Headers/NSMutableDictionaryAdditions.h deleted file mode 100644 index b01ad1c40d..0000000000 --- a/src/Three20Core/Headers/NSMutableDictionaryAdditions.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@interface NSMutableDictionary (TTCategory) - -/** - * Adds a string on the condition that it's non-nil and non-empty. - */ -- (void)setNonEmptyString:(NSString*)string forKey:(id)key; - -@end diff --git a/src/Three20Core/Headers/NSObjectAdditions.h b/src/Three20Core/Headers/NSObjectAdditions.h deleted file mode 100644 index 23684c645b..0000000000 --- a/src/Three20Core/Headers/NSObjectAdditions.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@interface NSObject (TTAdditions) - -/** - * Additional performSelector signatures that support up to 7 arguments. - */ -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3; -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 - withObject:(id)p4; -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 - withObject:(id)p4 withObject:(id)p5; -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 - withObject:(id)p4 withObject:(id)p5 withObject:(id)p6; -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 - withObject:(id)p4 withObject:(id)p5 withObject:(id)p6 withObject:(id)p7; - -@end diff --git a/src/Three20Core/Headers/NSStringAdditions.h b/src/Three20Core/Headers/NSStringAdditions.h deleted file mode 100644 index 64cc7bd3be..0000000000 --- a/src/Three20Core/Headers/NSStringAdditions.h +++ /dev/null @@ -1,125 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import "Three20Core/TTCorePreprocessorMacros.h" // For __TTDEPRECATED_METHOD - -/** - * Doxygen does not handle categories very well, so please refer to the .m file in general - * for the documentation that is reflected on api.three20.info. - */ -@interface NSString (TTAdditions) - -/** - * Determines if the string contains only whitespace and newlines. - */ -- (BOOL)isWhitespaceAndNewlines; - -/** - * Determines if the string is empty or contains only whitespace. - * @deprecated Use TTIsStringWithAnyText() instead. Updating your use of - * this method is non-trivial. See the note below. - * - * Notes for updating your use of isEmptyOrWhitespace: - * - * if (!textField.text.isEmptyOrWhitespace) { - * - * becomes - * - * if (TTIsStringWithAnyText(textField.text) && !textField.text.isWhitespaceAndNewlines) { - * - * and - * - * if (textField.text.isEmptyOrWhitespace) { - * - * becomes - * - * if (0 == textField.text.length || textField.text.isWhitespaceAndNewlines) { - */ -- (BOOL)isEmptyOrWhitespace __TTDEPRECATED_METHOD; - -/** - * Parses a URL query string into a dictionary. - * - * @deprecated Use queryContentsUsingEncoding: instead. - */ -- (NSDictionary*)queryDictionaryUsingEncoding:(NSStringEncoding)encoding __TTDEPRECATED_METHOD; - -/** - * Parses a URL query string into a dictionary where the values are arrays. - */ -- (NSDictionary*)queryContentsUsingEncoding:(NSStringEncoding)encoding; - -/** - * Parses a URL, adds query parameters to its query, and re-encodes it as a new URL. - */ -- (NSString*)stringByAddingQueryDictionary:(NSDictionary*)query; - -/** - * Returns a string with all HTML tags removed. - */ -- (NSString*)stringByRemovingHTMLTags; - -/** - * Compares two strings expressing software versions. - * - * The comparison is (except for the development version provisions noted below) lexicographic - * string comparison. So as long as the strings being compared use consistent version formats, - * a variety of schemes are supported. For example "3.02" < "3.03" and "3.0.2" < "3.0.3". If you - * mix such schemes, like trying to compare "3.02" and "3.0.3", the result may not be what you - * expect. - * - * Development versions are also supported by adding an "a" character and more version info after - * it. For example "3.0a1" or "3.01a4". The way these are handled is as follows: if the parts - * before the "a" are different, the parts after the "a" are ignored. If the parts before the "a" - * are identical, the result of the comparison is the result of NUMERICALLY comparing the parts - * after the "a". If the part after the "a" is empty, it is treated as if it were "0". If one - * string has an "a" and the other does not (e.g. "3.0" and "3.0a1") the one without the "a" - * is newer. - * - * Examples (?? means undefined): - * "3.0" = "3.0" - * "3.0a2" = "3.0a2" - * "3.0" > "2.5" - * "3.1" > "3.0" - * "3.0a1" < "3.0" - * "3.0a1" < "3.0a4" - * "3.0a2" < "3.0a19" <-- numeric, not lexicographic - * "3.0a" < "3.0a1" - * "3.02" < "3.03" - * "3.0.2" < "3.0.3" - * "3.00" ?? "3.0" - * "3.02" ?? "3.0.3" - * "3.02" ?? "3.0.2" - */ -- (NSComparisonResult)versionStringCompare:(NSString *)other; - -/** - * Calculate the md5 hash of this string using CC_MD5. - * - * @return md5 hash of this string - */ -@property (nonatomic, readonly) NSString* md5Hash; - -/** - * Calculate the SHA1 hash of this string using CommonCrypto CC_SHA1. - * - * @return NSString with SHA1 hash of this string - */ -@property (nonatomic, readonly) NSString* sha1Hash; - -@end - diff --git a/src/Three20Core/Headers/TTCorePreprocessorMacros.h b/src/Three20Core/Headers/TTCorePreprocessorMacros.h deleted file mode 100644 index 47828ab5f2..0000000000 --- a/src/Three20Core/Headers/TTCorePreprocessorMacros.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Code Management - -/** - * Borrowed from Apple's AvailabiltyInternal.h header. There's no reason why we shouldn't be - * able to use this macro, as it's a gcc-supported flag. - * Here's what we based it off of. - * __AVAILABILITY_INTERNAL_DEPRECATED __attribute__((deprecated)) - */ -#define __TTDEPRECATED_METHOD __attribute__((deprecated)) - -/** - * Add this macro before each category implementation, so we don't have to use - * -all_load or -force_load to load object files from static libraries that only contain - * categories and no classes. - * See http://developer.apple.com/library/mac/#qa/qa2006/qa1490.html for more info. - */ -#define TT_FIX_CATEGORY_BUG(name) @interface TT_FIX_CATEGORY_BUG_##name @end \ - @implementation TT_FIX_CATEGORY_BUG_##name @end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Flags - -/** - * For when the flag might be a set of bits, this will ensure that the exact set of bits in - * the flag have been set in the value. - */ -#define IS_MASK_SET(value, flag) (((value) & (flag)) == (flag)) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Time - -#define TT_MINUTE 60 -#define TT_HOUR (60 * TT_MINUTE) -#define TT_DAY (24 * TT_HOUR) -#define TT_5_DAYS (5 * TT_DAY) -#define TT_WEEK (7 * TT_DAY) -#define TT_MONTH (30.5 * TT_DAY) -#define TT_YEAR (365 * TT_DAY) - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Safe releases - -#define TT_RELEASE_SAFELY(__POINTER) { [__POINTER release]; __POINTER = nil; } -#define TT_INVALIDATE_TIMER(__TIMER) { [__TIMER invalidate]; __TIMER = nil; } - -// Release a CoreFoundation object safely. -#define TT_RELEASE_CF_SAFELY(__REF) { if (nil != (__REF)) { CFRelease(__REF); __REF = nil; } } diff --git a/src/Three20Core/Headers/TTDebug.h b/src/Three20Core/Headers/TTDebug.h deleted file mode 100644 index f4e910d1c8..0000000000 --- a/src/Three20Core/Headers/TTDebug.h +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/** - * Three20 Debugging tools. - * - * Provided in this header are a set of debugging tools. This is meant quite literally, in that - * all of the macros below will only function when the DEBUG preprocessor macro is specified. - * - * TTDASSERT(); - * If is false, the statement will be written to the log and if you are running in - * the simulator with a debugger attached, the app will break on the assertion line. - * - * TTDPRINT(@"formatted log text %d", param1); - * Print the given formatted text to the log. - * - * TTDPRINTMETHODNAME(); - * Print the current method name to the log. - * - * TTDCONDITIONLOG(, @"formatted log text %d", param1); - * If is true, then the formatted text will be written to the log. - * - * TTDINFO/TTDWARNING/TTDERROR(@"formatted log text %d", param1); - * Will only write the formatted text to the log if TTMAXLOGLEVEL is greater than the respective - * TTD* method's log level. See below for log levels. - * - * The default maximum log level is TTLOGLEVEL_WARNING. - */ - -#define TTLOGLEVEL_INFO 5 -#define TTLOGLEVEL_WARNING 3 -#define TTLOGLEVEL_ERROR 1 - -#ifndef TTMAXLOGLEVEL - #define TTMAXLOGLEVEL TTLOGLEVEL_WARNING -#endif - -// The general purpose logger. This ignores logging levels. -#ifdef DEBUG - #define TTDPRINT(xx, ...) NSLog(@"%s(%d): " xx, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) -#else - #define TTDPRINT(xx, ...) ((void)0) -#endif // #ifdef DEBUG - -// Prints the current method's name. -#define TTDPRINTMETHODNAME() TTDPRINT(@"%s", __PRETTY_FUNCTION__) - -// Debug-only assertions. -#ifdef DEBUG - -#import - -#if TARGET_IPHONE_SIMULATOR - - int TTIsInDebugger(); - // We leave the __asm__ in this macro so that when a break occurs, we don't have to step out of - // a "breakInDebugger" function. - #define TTDASSERT(xx) { if (!(xx)) { TTDPRINT(@"TTDASSERT failed: %s", #xx); \ - if (TTIsInDebugger()) { __asm__("int $3\n" : : ); }; } \ - } ((void)0) -#else - #define TTDASSERT(xx) { if (!(xx)) { TTDPRINT(@"TTDASSERT failed: %s", #xx); } } ((void)0) -#endif // #if TARGET_IPHONE_SIMULATOR - -#else - #define TTDASSERT(xx) ((void)0) -#endif // #ifdef DEBUG - -// Log-level based logging macros. -#if TTLOGLEVEL_ERROR <= TTMAXLOGLEVEL - #define TTDERROR(xx, ...) TTDPRINT(xx, ##__VA_ARGS__) -#else - #define TTDERROR(xx, ...) ((void)0) -#endif // #if TTLOGLEVEL_ERROR <= TTMAXLOGLEVEL - -#if TTLOGLEVEL_WARNING <= TTMAXLOGLEVEL - #define TTDWARNING(xx, ...) TTDPRINT(xx, ##__VA_ARGS__) -#else - #define TTDWARNING(xx, ...) ((void)0) -#endif // #if TTLOGLEVEL_WARNING <= TTMAXLOGLEVEL - -#if TTLOGLEVEL_INFO <= TTMAXLOGLEVEL - #define TTDINFO(xx, ...) TTDPRINT(xx, ##__VA_ARGS__) -#else - #define TTDINFO(xx, ...) ((void)0) -#endif // #if TTLOGLEVEL_INFO <= TTMAXLOGLEVEL - -#ifdef DEBUG - #define TTDCONDITIONLOG(condition, xx, ...) { if ((condition)) { \ - TTDPRINT(xx, ##__VA_ARGS__); \ - } \ - } ((void)0) -#else - #define TTDCONDITIONLOG(condition, xx, ...) ((void)0) -#endif // #ifdef DEBUG diff --git a/src/Three20Core/Headers/TTDebugFlags.h b/src/Three20Core/Headers/TTDebugFlags.h deleted file mode 100644 index 9c64b4cbef..0000000000 --- a/src/Three20Core/Headers/TTDebugFlags.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/** - * These flags are used primarily by TTDCONDITIONLOG. - * Example: - * - * TTDCONDITIONLOG(TTDFLAG_NAVIGATOR, @"TTNavigator activated"); - * - * This will only write to the log if the TTDFLAG_NAVIGATOR is set to non-zero. - */ -#define TTDFLAG_VIEWCONTROLLERS 0 -#define TTDFLAG_CONTROLLERGARBAGECOLLECTION 0 -#define TTDFLAG_NAVIGATOR 0 -#define TTDFLAG_TABLEVIEWMODIFICATIONS 0 -#define TTDFLAG_LAUNCHERVIEW 0 -#define TTDFLAG_URLREQUEST 0 -#define TTDFLAG_URLCACHE 0 -#define TTDFLAG_XMLPARSER 0 -#define TTDFLAG_ETAGS 0 diff --git a/src/Three20Core/Headers/TTEntityTables.h b/src/Three20Core/Headers/TTEntityTables.h deleted file mode 100644 index 8c824b92dc..0000000000 --- a/src/Three20Core/Headers/TTEntityTables.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * Standard entity tables for use with XML parsers. - * - * Supported entity tables: ISO 8859-1. - * - * Each table is a dictionary of entity names to NSData objects containing the character. - */ -@interface TTEntityTables : NSObject { - NSDictionary* _iso88591; -} - -/** - * Entity table for ISO 8859-1. - */ -@property (nonatomic, readonly) NSDictionary* iso88591; - -@end - - -@interface TTEntityTables (TTSingleton) - -// Access the singleton instance: [[TTEntityTables sharedInstance] ] -+ (TTEntityTables*)sharedInstance; - -// Release the shared instance. -+ (void)releaseSharedInstance; - -@end diff --git a/src/Three20Core/Headers/TTExtensionAuthor.h b/src/Three20Core/Headers/TTExtensionAuthor.h deleted file mode 100644 index c595be39c4..0000000000 --- a/src/Three20Core/Headers/TTExtensionAuthor.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTExtensionAuthor : NSObject { -@private - NSString* _name; - NSString* _github; - NSString* _twitter; - NSString* _website; -} - -@property (nonatomic, copy) NSString* name; -@property (nonatomic, copy) NSString* github; -@property (nonatomic, copy) NSString* twitter; -@property (nonatomic, copy) NSString* website; - -+ (id)authorWithName: (NSString*)name; - -+ (id)authorWithName: (NSString*)name - github: (NSString*)github - twitter: (NSString*)twitter - website: (NSString*)website; - -// Designated initializer -- (id)initWithName: (NSString*)name - github: (NSString*)github - twitter: (NSString*)twitter - website: (NSString*)website; - -@end diff --git a/src/Three20Core/Headers/TTExtensionInfo.h b/src/Three20Core/Headers/TTExtensionInfo.h deleted file mode 100644 index d701342f68..0000000000 --- a/src/Three20Core/Headers/TTExtensionInfo.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTExtensionInfo : NSObject { -@private - NSString* _id; - NSString* _name; - NSString* _description; - NSString* _version; - NSString* _copyright; - NSString* _license; - NSArray* _authors; -} - -@property (nonatomic, readonly) NSString* identifier; -@property (nonatomic, copy) NSString* name; -@property (nonatomic, copy) NSString* description; -@property (nonatomic, copy) NSString* version; -@property (nonatomic, copy) NSString* copyright; -@property (nonatomic, copy) NSString* license; -@property (nonatomic, copy) NSArray* authors; // NSArray of TTExtensionAuthor* objects. - -@end diff --git a/src/Three20Core/Headers/TTExtensionInfoPrivate.h b/src/Three20Core/Headers/TTExtensionInfoPrivate.h deleted file mode 100644 index 244ca04204..0000000000 --- a/src/Three20Core/Headers/TTExtensionInfoPrivate.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTExtensionInfo.h" - - -@interface TTExtensionInfo (TTPrivate) - -- (void)setIdentifier:(NSString*)identifier; - -@end - diff --git a/src/Three20Core/Headers/TTExtensionLoader.h b/src/Three20Core/Headers/TTExtensionLoader.h deleted file mode 100644 index 3729063a29..0000000000 --- a/src/Three20Core/Headers/TTExtensionLoader.h +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * The extension loader provides basic utility methods to load extensions once an application - * has started running. - * - * [TTExtensionLoader loadAllExtensions]; - * - * is likely the only method you'll need to use. - * - * How it works: - * - * An extension creates a TTExtensionLoader category, e.g.: - * - * @interface TTExtensionLoader (TTXMLExtension) - * - * The extension then implements a method in this category with the prefix "loadExtensionNamed" - * - * - (BOOL)loadExtensionNamedThree20XML; - * - * This method will be called when loadAllExtensions is called and should be used to initialize - * any extension-specific functionality. A simple example of this might be to register some global - * navigator URLs for use by the application. - * - * The extension can then optionally implement a second method with the prefix - * "extensionInfoNamed". The text after the prefix should match that of the load method. - * - * - (TTExtensionInfo*)extensionInfoNamedThree20XML; - * - * This method should return an autoreleased TTExtensionInfo object that has been populated with - * any information the extension wishes to provide. If this method isn't implemented, a default - * TTExtensionInfo object will be created. - */ -@interface TTExtensionLoader : NSObject { - -} - -/** - * Load all extensions that provide a method of the following signature: - * - (BOOL)loadExtensionNamed - * - * For example: - * - (BOOL)loadExtensionNamedThree20XML - */ -+ (void)loadAllExtensions; - -/** - * Retrieve the map of available extensions. - * - * Format: - * [(NSString*)identifier] => (TTExtensionInfo*)extension - */ -+ (NSDictionary*)availableExtensions; - -/** - * Retrieve the map of loaded extensions. - * - * Format: - * [(NSString*)identifier] => (TTExtensionInfo*)extension - */ -+ (NSDictionary*)loadedExtensions; - -/** - * Retrieve the map of extensions that failed to load. - * - * Format: - * [(NSString*)identifier] => (TTExtensionInfo*)extension - */ -+ (NSDictionary*)failedExtensions; - -@end diff --git a/src/Three20Core/Headers/TTGlobalCore.h b/src/Three20Core/Headers/TTGlobalCore.h deleted file mode 100644 index 60b4f8a973..0000000000 --- a/src/Three20Core/Headers/TTGlobalCore.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -/** - * Creates a mutable array which does not retain references to the objects it contains. - * - * Typically used with arrays of delegates. - */ -NSMutableArray* TTCreateNonRetainingArray(); - -/** - * Creates a mutable dictionary which does not retain references to the values it contains. - * - * Typically used with dictionaries of delegates. - */ -NSMutableDictionary* TTCreateNonRetainingDictionary(); - -/** - * Tests if an object is an array which is not empty. - */ -BOOL TTIsArrayWithItems(id object); - -/** - * Tests if an object is a set which is not empty. - */ -BOOL TTIsSetWithItems(id object); - -/** - * Tests if an object is a string which is not empty. - */ -BOOL TTIsStringWithAnyText(id object); - -/** - * Swap the two method implementations on the given class. - * Uses method_exchangeImplementations to accomplish this. - */ -void TTSwapMethods(Class cls, SEL originalSel, SEL newSel); diff --git a/src/Three20Core/Headers/TTGlobalCoreLocale.h b/src/Three20Core/Headers/TTGlobalCoreLocale.h deleted file mode 100644 index eca9ae49ce..0000000000 --- a/src/Three20Core/Headers/TTGlobalCoreLocale.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -/** - * Gets the current system locale chosen by the user. - * - * This is necessary because [NSLocale currentLocale] always returns en_US. - */ -NSLocale* TTCurrentLocale(); - -/** - * @return A localized string from the Three20 bundle. - */ -NSString* TTLocalizedString(NSString* key, NSString* comment); - -/** - * @return A localized description for NSURLErrorDomain errors. - * - * Error codes handled: - * - NSURLErrorTimedOut - * - NSURLErrorNotConnectedToInternet - * - All other NSURLErrorDomain errors fall through to "Connection Error". - */ -NSString* TTDescriptionForError(NSError* error); - -/** - * @return The given number formatted as XX,XXX,XXX.XX - * - * TODO(jverkoey 04/19/2010): This should likely be locale-aware. - */ -NSString* TTFormatInteger(NSInteger num); diff --git a/src/Three20Core/Headers/TTGlobalCorePaths.h b/src/Three20Core/Headers/TTGlobalCorePaths.h deleted file mode 100644 index 9bde321e4b..0000000000 --- a/src/Three20Core/Headers/TTGlobalCorePaths.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -/** - * @return YES if the URL begins with "bundle://" - */ -BOOL TTIsBundleURL(NSString* URL); - -/** - * @return YES if the URL begins with "documents://" - */ -BOOL TTIsDocumentsURL(NSString* URL); - -/** - * Used by TTPathForBundleResource to construct the bundle path. - * - * Retains the given bundle. - * - * @default nil (See TTGetDefaultBundle for what this means) - */ -void TTSetDefaultBundle(NSBundle* bundle); - -/** - * Retrieves the default bundle. - * - * If the default bundle is nil, returns [NSBundle mainBundle]. - * - * @see TTSetDefaultBundle - */ -NSBundle* TTGetDefaultBundle(); - -/** - * @return The main bundle path concatenated with the given relative path. - */ -NSString* TTPathForBundleResource(NSString* relativePath); - -/** - * @return The documents path concatenated with the given relative path. - */ -NSString* TTPathForDocumentsResource(NSString* relativePath); diff --git a/src/Three20Core/Headers/TTGlobalCoreRects.h b/src/Three20Core/Headers/TTGlobalCoreRects.h deleted file mode 100644 index 073f62c6f9..0000000000 --- a/src/Three20Core/Headers/TTGlobalCoreRects.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * @return a rectangle with dx and dy subtracted from the width and height, respectively. - * - * Example result: CGRectMake(x, y, w - dx, h - dy) - */ -CGRect TTRectContract(CGRect rect, CGFloat dx, CGFloat dy); - -/** - * @return a rectangle whose origin has been offset by dx, dy, and whose size has been - * contracted by dx, dy. - * - * Example result: CGRectMake(x + dx, y + dy, w - dx, h - dy) - */ -CGRect TTRectShift(CGRect rect, CGFloat dx, CGFloat dy); - -/** - * @return a rectangle with the given insets. - * - * Example result: CGRectMake(x + left, y + top, w - (left + right), h - (top + bottom)) - */ -CGRect TTRectInset(CGRect rect, UIEdgeInsets insets); diff --git a/src/Three20Core/Headers/TTMarkupStripper.h b/src/Three20Core/Headers/TTMarkupStripper.h deleted file mode 100644 index eec1518267..0000000000 --- a/src/Three20Core/Headers/TTMarkupStripper.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -#if __IPHONE_4_0 && __IPHONE_4_0 <= __IPHONE_OS_VERSION_MAX_ALLOWED -@interface TTMarkupStripper : NSObject { -#else -@interface TTMarkupStripper : NSObject { -#endif -@private - NSMutableArray* _strings; -} - -/** - * Strips markup from the given string and returns the result. - */ -- (NSString*)parse:(NSString*)string; - -@end diff --git a/src/Three20Core/Headers/Three20Core+Additions.h b/src/Three20Core/Headers/Three20Core+Additions.h deleted file mode 100644 index c9a7c6770c..0000000000 --- a/src/Three20Core/Headers/Three20Core+Additions.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/Three20Core.h" - -// Additions -#import "Three20Core/NSArrayAdditions.h" -#import "Three20Core/NSDataAdditions.h" -#import "Three20Core/NSDateAdditions.h" -#import "Three20Core/NSMutableArrayAdditions.h" -#import "Three20Core/NSMutableDictionaryAdditions.h" -#import "Three20Core/NSObjectAdditions.h" -#import "Three20Core/NSStringAdditions.h" diff --git a/src/Three20Core/Headers/Three20Core.h b/src/Three20Core/Headers/Three20Core.h deleted file mode 100644 index ae4c933690..0000000000 --- a/src/Three20Core/Headers/Three20Core.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Core - -// - Global -#import "Three20Core/TTCorePreprocessorMacros.h" - -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTGlobalCoreLocale.h" -#import "Three20Core/TTGlobalCorePaths.h" -#import "Three20Core/TTGlobalCoreRects.h" - -// - Debug -#import "Three20Core/TTDebug.h" - -// - Extensions -#import "Three20Core/TTExtensionInfo.h" -#import "Three20Core/TTExtensionAuthor.h" -#import "Three20Core/TTExtensionLoader.h" - -// - Entity Tables -#import "Three20Core/TTEntityTables.h" - -// - Classes -#import "Three20Core/TTMarkupStripper.h" diff --git a/src/Three20Core/Headers/Three20Core_Prefix.pch b/src/Three20Core/Headers/Three20Core_Prefix.pch deleted file mode 100644 index 28f5d8f8f2..0000000000 --- a/src/Three20Core/Headers/Three20Core_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Three20Core' target in the 'Three20Core' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/src/Three20Core/README.mdown b/src/Three20Core/README.mdown deleted file mode 100644 index 6802a9040f..0000000000 --- a/src/Three20Core/README.mdown +++ /dev/null @@ -1,79 +0,0 @@ - -Three20 Core -============ - -A set of utilities to improve the most basic aspects of Objective-C development. Included -in this library are debugging macros, optional Foundation object additions, and global -utility methods for localization, paths, and rects. - - -How to use it -------------- - -* Add Three20Core.xcodeproj to your project. -* In your project, select Three20Core.xcodeproj and click the checkbox next to libThree20Core.a. - This will link the Three20Core static library with your app. -* In your target settings, under the "Build" tab, add the relative path to - `three20/Build/Products/three20` in the "Header Search Paths". -* In your target settings, under the "General" tab, add Three20Core as a direct dependency. -* Now #import "Three20Core/Three20Core.h" in your precompiled header (or wherever you choose). -* Build and go! - - -Example projects ----------------- - -three20/samples/Core/TTCoreDemo - -A dead-simple project that demos an iPhone app using only Three20Core. - - -Breakdown ---------- - -Within Core you'll find the following tools. - - -### Markup Stripper - -Fairly self-explanatory. Strips markup from an NSString using the native XML parser. - - -### Entity Tables - -Some standard entity tables for use in decoding entities. - - -### Debugging Tools - -A set of debugging and logging macros. - - -### Global Utilities - -A diverse set of utility methods for localization, file system paths, and rects. - - -### (Optional) Additions - -By including Three20Core+Additions, you'll have access to the library's Foundation additions, -including helpful additions to NSArrays, NSDictionaries, and NSStrings. - - - -Hacking the Core -================ - -General information for when you're making modifications to the Core. - - -Importing specific files ------------------------- - - #import "Three20Core/.h" - - -Dependencies ------------- - -None. diff --git a/src/Three20Core/Sources/NSArrayAdditions.m b/src/Three20Core/Sources/NSArrayAdditions.m deleted file mode 100644 index 90949dd16d..0000000000 --- a/src/Three20Core/Sources/NSArrayAdditions.m +++ /dev/null @@ -1,140 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/NSArrayAdditions.h" - -// Core -#import "Three20Core/NSObjectAdditions.h" -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(NSArrayAdditions) - -@implementation NSArray (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)perform:(SEL)selector { - NSArray *copy = [[NSArray alloc] initWithArray:self]; - NSEnumerator* e = [copy objectEnumerator]; - for (id delegate; (delegate = [e nextObject]); ) { - if ([delegate respondsToSelector:selector]) { - [delegate performSelector:selector]; - } - } - [copy release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)perform:(SEL)selector withObject:(id)p1 { - NSArray *copy = [[NSArray alloc] initWithArray:self]; - NSEnumerator* e = [copy objectEnumerator]; - for (id delegate; (delegate = [e nextObject]); ) { - if ([delegate respondsToSelector:selector]) { - [delegate performSelector:selector withObject:p1]; - } - } - [copy release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)perform:(SEL)selector withObject:(id)p1 withObject:(id)p2 { - NSArray *copy = [[NSArray alloc] initWithArray:self]; - NSEnumerator* e = [copy objectEnumerator]; - for (id delegate; (delegate = [e nextObject]); ) { - if ([delegate respondsToSelector:selector]) { - [delegate performSelector:selector withObject:p1 withObject:p2]; - } - } - [copy release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)perform:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 { - NSArray *copy = [[NSArray alloc] initWithArray:self]; - NSEnumerator* e = [copy objectEnumerator]; - for (id delegate; (delegate = [e nextObject]); ) { - if ([delegate respondsToSelector:selector]) { - [delegate performSelector:selector withObject:p1 withObject:p2 withObject:p3]; - } - } - [copy release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)makeObjectsPerformSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 { - for (id delegate in self) { - [delegate performSelector:selector withObject:p1 withObject:p2]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)makeObjectsPerformSelector: (SEL)selector - withObject: (id)p1 - withObject: (id)p2 - withObject: (id)p3 { - for (id delegate in self) { - [delegate performSelector:selector withObject:p1 withObject:p2 withObject:p3]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectWithValue:(id)value forKey:(id)key { - for (id object in self) { - id propertyValue = [object valueForKey:key]; - if ([propertyValue isEqual:value]) { - return object; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectWithClass:(Class)cls { - for (id object in self) { - if ([object isKindOfClass:cls]) { - return object; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)containsObject:(id)object withSelector:(SEL)selector { - for (id item in self) { - if ([[item performSelector:selector withObject:object] boolValue]) { - return YES; - } - } - return NO; -} - - -@end diff --git a/src/Three20Core/Sources/NSDataAdditions.m b/src/Three20Core/Sources/NSDataAdditions.m deleted file mode 100644 index cd1126ea1b..0000000000 --- a/src/Three20Core/Sources/NSDataAdditions.m +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/NSDataAdditions.h" - -#import - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(NSDataAdditions) - -@implementation NSData (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)md5Hash { - unsigned char result[CC_MD5_DIGEST_LENGTH]; - CC_MD5([self bytes], [self length], result); - - return [NSString stringWithFormat: - @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7], - result[8], result[9], result[10], result[11], result[12], result[13], result[14], result[15] - ]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)sha1Hash { - unsigned char result[CC_SHA1_DIGEST_LENGTH]; - CC_SHA1([self bytes], [self length], result); - - return [NSString stringWithFormat: - @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7], - result[8], result[9], result[10], result[11], result[12], result[13], result[14], result[15], - result[16], result[17], result[18], result[19] - ]; -} - -@end diff --git a/src/Three20Core/Sources/NSDateAdditions.m b/src/Three20Core/Sources/NSDateAdditions.m deleted file mode 100644 index d0ec60c2f1..0000000000 --- a/src/Three20Core/Sources/NSDateAdditions.m +++ /dev/null @@ -1,258 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/NSDateAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreLocale.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(NSDateAdditions) - -@implementation NSDate (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (NSDate*)dateWithToday { - NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = @"yyyy-d-M"; - - NSString* formattedTime = [formatter stringFromDate:[NSDate date]]; - NSDate* date = [formatter dateFromString:formattedTime]; - TT_RELEASE_SAFELY(formatter); - - return date; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDate*)dateAtMidnight { - NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = @"yyyy-d-M"; - - NSString* formattedTime = [formatter stringFromDate:self]; - NSDate* date = [formatter dateFromString:formattedTime]; - TT_RELEASE_SAFELY(formatter); - - return date; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatTime { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = TTLocalizedString(@"h:mm a", @"Date format: 1:05 pm"); - formatter.locale = TTCurrentLocale(); - } - return [formatter stringFromDate:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatDate { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = - TTLocalizedString(@"EEEE, LLLL d, YYYY", @"Date format: Monday, July 27, 2009"); - formatter.locale = TTCurrentLocale(); - } - return [formatter stringFromDate:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatShortTime { - NSTimeInterval diff = abs([self timeIntervalSinceNow]); - - if (diff < TT_DAY) { - return [self formatTime]; - - } else if (diff < TT_5_DAYS) { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = TTLocalizedString(@"EEEE", @"Date format: Monday"); - formatter.locale = TTCurrentLocale(); - } - return [formatter stringFromDate:self]; - - } else { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = TTLocalizedString(@"M/d/yy", @"Date format: 7/27/09"); - formatter.locale = TTCurrentLocale(); - } - return [formatter stringFromDate:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatDateTime { - NSTimeInterval diff = abs([self timeIntervalSinceNow]); - if (diff < TT_DAY) { - return [self formatTime]; - - } else if (diff < TT_5_DAYS) { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = TTLocalizedString(@"EEE h:mm a", @"Date format: Mon 1:05 pm"); - formatter.locale = TTCurrentLocale(); - } - return [formatter stringFromDate:self]; - - } else { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = TTLocalizedString(@"MMM d h:mm a", @"Date format: Jul 27 1:05 pm"); - formatter.locale = TTCurrentLocale(); - } - return [formatter stringFromDate:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatRelativeTime { - NSTimeInterval elapsed = abs([self timeIntervalSinceNow]); - if (elapsed <= 1) { - return TTLocalizedString(@"just a moment ago", @""); - - } else if (elapsed < TT_MINUTE) { - int seconds = (int)(elapsed); - return [NSString stringWithFormat:TTLocalizedString(@"%d seconds ago", @""), seconds]; - - } else if (elapsed < 2*TT_MINUTE) { - return TTLocalizedString(@"about a minute ago", @""); - - } else if (elapsed < TT_HOUR) { - int mins = (int)(elapsed/TT_MINUTE); - return [NSString stringWithFormat:TTLocalizedString(@"%d minutes ago", @""), mins]; - - } else if (elapsed < TT_HOUR*1.5) { - return TTLocalizedString(@"about an hour ago", @""); - - } else if (elapsed < TT_DAY) { - int hours = (int)((elapsed+TT_HOUR/2)/TT_HOUR); - return [NSString stringWithFormat:TTLocalizedString(@"%d hours ago", @""), hours]; - - } else { - return [self formatDateTime]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatShortRelativeTime { - NSTimeInterval elapsed = abs([self timeIntervalSinceNow]); - - if (elapsed < TT_MINUTE) { - return TTLocalizedString(@"<1m", @"Date format: less than one minute ago"); - - } else if (elapsed < TT_HOUR) { - int mins = (int)(elapsed / TT_MINUTE); - return [NSString stringWithFormat:TTLocalizedString(@"%dm", @"Date format: 50m"), mins]; - - } else if (elapsed < TT_DAY) { - int hours = (int)((elapsed + TT_HOUR / 2) / TT_HOUR); - return [NSString stringWithFormat:TTLocalizedString(@"%dh", @"Date format: 3h"), hours]; - - } else if (elapsed < TT_WEEK) { - int day = (int)((elapsed + TT_DAY / 2) / TT_DAY); - return [NSString stringWithFormat:TTLocalizedString(@"%dd", @"Date format: 3d"), day]; - - } else { - return [self formatShortTime]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatDay:(NSDateComponents*)today yesterday:(NSDateComponents*)yesterday { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = TTLocalizedString(@"MMMM d", @"Date format: July 27"); - formatter.locale = TTCurrentLocale(); - } - - NSCalendar* cal = [NSCalendar currentCalendar]; - NSDateComponents* day = [cal components:NSDayCalendarUnit|NSMonthCalendarUnit|NSYearCalendarUnit - fromDate:self]; - - if (day.day == today.day && day.month == today.month && day.year == today.year) { - return TTLocalizedString(@"Today", @""); - - } else if (day.day == yesterday.day && day.month == yesterday.month - && day.year == yesterday.year) { - return TTLocalizedString(@"Yesterday", @""); - - } else { - return [formatter stringFromDate:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatMonth { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = TTLocalizedString(@"MMMM", @"Date format: July"); - formatter.locale = TTCurrentLocale(); - } - return [formatter stringFromDate:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)formatYear { - static NSDateFormatter* formatter = nil; - if (nil == formatter) { - formatter = [[NSDateFormatter alloc] init]; - formatter.dateFormat = TTLocalizedString(@"yyyy", @"Date format: 2009"); - formatter.locale = TTCurrentLocale(); - } - return [formatter stringFromDate:self]; -} - - -@end diff --git a/src/Three20Core/Sources/NSMutableArrayAdditions.m b/src/Three20Core/Sources/NSMutableArrayAdditions.m deleted file mode 100644 index c996605538..0000000000 --- a/src/Three20Core/Sources/NSMutableArrayAdditions.m +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/NSMutableArrayAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCore.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(NSMutableArrayAdditions) - -@implementation NSMutableArray (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) addNonEmptyString:(NSString*)string { - if (TTIsStringWithAnyText(string)) { - [self addObject:string]; - } -} - - -@end diff --git a/src/Three20Core/Sources/NSMutableDictionaryAdditions.m b/src/Three20Core/Sources/NSMutableDictionaryAdditions.m deleted file mode 100644 index 8fd20bec44..0000000000 --- a/src/Three20Core/Sources/NSMutableDictionaryAdditions.m +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/NSMutableDictionaryAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCore.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(NSMutableDictionaryAdditions) - -@implementation NSMutableDictionary (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setNonEmptyString:(NSString*)string forKey:(id)key { - if (TTIsStringWithAnyText(string)) { - [self setObject:string forKey:key]; - } -} - - -@end diff --git a/src/Three20Core/Sources/NSObjectAdditions.m b/src/Three20Core/Sources/NSObjectAdditions.m deleted file mode 100644 index 1c72bd7370..0000000000 --- a/src/Three20Core/Sources/NSObjectAdditions.m +++ /dev/null @@ -1,178 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/NSObjectAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(NSObjectAdditions) - -@implementation NSObject (TTAdditions) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 { - NSMethodSignature *sig = [self methodSignatureForSelector:selector]; - if (sig) { - NSInvocation* invo = [NSInvocation invocationWithMethodSignature:sig]; - [invo setTarget:self]; - [invo setSelector:selector]; - [invo setArgument:&p1 atIndex:2]; - [invo setArgument:&p2 atIndex:3]; - [invo setArgument:&p3 atIndex:4]; - [invo invoke]; - if (sig.methodReturnLength) { - id anObject; - [invo getReturnValue:&anObject]; - return anObject; - - } else { - return nil; - } - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 - withObject:(id)p4 { - NSMethodSignature *sig = [self methodSignatureForSelector:selector]; - if (sig) { - NSInvocation* invo = [NSInvocation invocationWithMethodSignature:sig]; - [invo setTarget:self]; - [invo setSelector:selector]; - [invo setArgument:&p1 atIndex:2]; - [invo setArgument:&p2 atIndex:3]; - [invo setArgument:&p3 atIndex:4]; - [invo setArgument:&p4 atIndex:5]; - [invo invoke]; - if (sig.methodReturnLength) { - id anObject; - [invo getReturnValue:&anObject]; - return anObject; - - } else { - return nil; - } - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 - withObject:(id)p4 withObject:(id)p5 { - NSMethodSignature *sig = [self methodSignatureForSelector:selector]; - if (sig) { - NSInvocation* invo = [NSInvocation invocationWithMethodSignature:sig]; - [invo setTarget:self]; - [invo setSelector:selector]; - [invo setArgument:&p1 atIndex:2]; - [invo setArgument:&p2 atIndex:3]; - [invo setArgument:&p3 atIndex:4]; - [invo setArgument:&p4 atIndex:5]; - [invo setArgument:&p5 atIndex:6]; - [invo invoke]; - if (sig.methodReturnLength) { - id anObject; - [invo getReturnValue:&anObject]; - return anObject; - - } else { - return nil; - } - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 - withObject:(id)p4 withObject:(id)p5 withObject:(id)p6 { - NSMethodSignature *sig = [self methodSignatureForSelector:selector]; - if (sig) { - NSInvocation* invo = [NSInvocation invocationWithMethodSignature:sig]; - [invo setTarget:self]; - [invo setSelector:selector]; - [invo setArgument:&p1 atIndex:2]; - [invo setArgument:&p2 atIndex:3]; - [invo setArgument:&p3 atIndex:4]; - [invo setArgument:&p4 atIndex:5]; - [invo setArgument:&p5 atIndex:6]; - [invo setArgument:&p6 atIndex:7]; - [invo invoke]; - if (sig.methodReturnLength) { - id anObject; - [invo getReturnValue:&anObject]; - return anObject; - - } else { - return nil; - } - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)performSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 - withObject:(id)p4 withObject:(id)p5 withObject:(id)p6 withObject:(id)p7 { - NSMethodSignature *sig = [self methodSignatureForSelector:selector]; - if (sig) { - NSInvocation* invo = [NSInvocation invocationWithMethodSignature:sig]; - [invo setTarget:self]; - [invo setSelector:selector]; - [invo setArgument:&p1 atIndex:2]; - [invo setArgument:&p2 atIndex:3]; - [invo setArgument:&p3 atIndex:4]; - [invo setArgument:&p4 atIndex:5]; - [invo setArgument:&p5 atIndex:6]; - [invo setArgument:&p6 atIndex:7]; - [invo setArgument:&p7 atIndex:8]; - [invo invoke]; - if (sig.methodReturnLength) { - id anObject; - [invo getReturnValue:&anObject]; - return anObject; - - } else { - return nil; - } - - } else { - return nil; - } -} - - -@end diff --git a/src/Three20Core/Sources/NSStringAdditions.m b/src/Three20Core/Sources/NSStringAdditions.m deleted file mode 100644 index f681268817..0000000000 --- a/src/Three20Core/Sources/NSStringAdditions.m +++ /dev/null @@ -1,192 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/NSStringAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTMarkupStripper.h" -#import "Three20Core/NSDataAdditions.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(NSStringAdditions) - -@implementation NSString (TTAdditions) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isWhitespaceAndNewlines { - NSCharacterSet* whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet]; - for (NSInteger i = 0; i < self.length; ++i) { - unichar c = [self characterAtIndex:i]; - if (![whitespace characterIsMember:c]) { - return NO; - } - } - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Deprecated - https://github.com/facebook/three20/issues/367 - */ -- (BOOL)isEmptyOrWhitespace { - // A nil or NULL string is not the same as an empty string - return 0 == self.length || - ![self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]].length; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)stringByRemovingHTMLTags { - TTMarkupStripper* stripper = [[[TTMarkupStripper alloc] init] autorelease]; - return [stripper parse:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Copied and pasted from http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg28175.html - * Deprecated - */ -- (NSDictionary*)queryDictionaryUsingEncoding:(NSStringEncoding)encoding { - NSCharacterSet* delimiterSet = [NSCharacterSet characterSetWithCharactersInString:@"&;"]; - NSMutableDictionary* pairs = [NSMutableDictionary dictionary]; - NSScanner* scanner = [[[NSScanner alloc] initWithString:self] autorelease]; - while (![scanner isAtEnd]) { - NSString* pairString = nil; - [scanner scanUpToCharactersFromSet:delimiterSet intoString:&pairString]; - [scanner scanCharactersFromSet:delimiterSet intoString:NULL]; - NSArray* kvPair = [pairString componentsSeparatedByString:@"="]; - if (kvPair.count == 2) { - NSString* key = [[kvPair objectAtIndex:0] - stringByReplacingPercentEscapesUsingEncoding:encoding]; - NSString* value = [[kvPair objectAtIndex:1] - stringByReplacingPercentEscapesUsingEncoding:encoding]; - [pairs setObject:value forKey:key]; - } - } - - return [NSDictionary dictionaryWithDictionary:pairs]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)queryContentsUsingEncoding:(NSStringEncoding)encoding { - NSCharacterSet* delimiterSet = [NSCharacterSet characterSetWithCharactersInString:@"&;"]; - NSMutableDictionary* pairs = [NSMutableDictionary dictionary]; - NSScanner* scanner = [[[NSScanner alloc] initWithString:self] autorelease]; - while (![scanner isAtEnd]) { - NSString* pairString = nil; - [scanner scanUpToCharactersFromSet:delimiterSet intoString:&pairString]; - [scanner scanCharactersFromSet:delimiterSet intoString:NULL]; - NSArray* kvPair = [pairString componentsSeparatedByString:@"="]; - if (kvPair.count == 1 || kvPair.count == 2) { - NSString* key = [[kvPair objectAtIndex:0] - stringByReplacingPercentEscapesUsingEncoding:encoding]; - NSMutableArray* values = [pairs objectForKey:key]; - if (nil == values) { - values = [NSMutableArray array]; - [pairs setObject:values forKey:key]; - } - if (kvPair.count == 1) { - [values addObject:[NSNull null]]; - - } else if (kvPair.count == 2) { - NSString* value = [[kvPair objectAtIndex:1] - stringByReplacingPercentEscapesUsingEncoding:encoding]; - [values addObject:value]; - } - } - } - return [NSDictionary dictionaryWithDictionary:pairs]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)stringByAddingQueryDictionary:(NSDictionary*)query { - NSMutableArray* pairs = [NSMutableArray array]; - for (NSString* key in [query keyEnumerator]) { - NSString* value = [query objectForKey:key]; - value = [value stringByReplacingOccurrencesOfString:@"?" withString:@"%3F"]; - value = [value stringByReplacingOccurrencesOfString:@"=" withString:@"%3D"]; - NSString* pair = [NSString stringWithFormat:@"%@=%@", key, value]; - [pairs addObject:pair]; - } - - NSString* params = [pairs componentsJoinedByString:@"&"]; - if ([self rangeOfString:@"?"].location == NSNotFound) { - return [self stringByAppendingFormat:@"?%@", params]; - - } else { - return [self stringByAppendingFormat:@"&%@", params]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSComparisonResult)versionStringCompare:(NSString *)other { - NSArray *oneComponents = [self componentsSeparatedByString:@"a"]; - NSArray *twoComponents = [other componentsSeparatedByString:@"a"]; - - // The parts before the "a" - NSString *oneMain = [oneComponents objectAtIndex:0]; - NSString *twoMain = [twoComponents objectAtIndex:0]; - - // If main parts are different, return that result, regardless of alpha part - NSComparisonResult mainDiff; - if ((mainDiff = [oneMain compare:twoMain]) != NSOrderedSame) { - return mainDiff; - } - - // At this point the main parts are the same; just deal with alpha stuff - // If one has an alpha part and the other doesn't, the one without is newer - if ([oneComponents count] < [twoComponents count]) { - return NSOrderedDescending; - - } else if ([oneComponents count] > [twoComponents count]) { - return NSOrderedAscending; - - } else if ([oneComponents count] == 1) { - // Neither has an alpha part, and we know the main parts are the same - return NSOrderedSame; - } - - // At this point the main parts are the same and both have alpha parts. Compare the alpha parts - // numerically. If it's not a valid number (including empty string) it's treated as zero. - NSNumber *oneAlpha = [NSNumber numberWithInt:[[oneComponents objectAtIndex:1] intValue]]; - NSNumber *twoAlpha = [NSNumber numberWithInt:[[twoComponents objectAtIndex:1] intValue]]; - return [oneAlpha compare:twoAlpha]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)md5Hash { - return [[self dataUsingEncoding:NSUTF8StringEncoding] md5Hash]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)sha1Hash { - return [[self dataUsingEncoding:NSUTF8StringEncoding] sha1Hash]; -} - -@end diff --git a/src/Three20Core/Sources/TTDebug.m b/src/Three20Core/Sources/TTDebug.m deleted file mode 100644 index e3e9c8529f..0000000000 --- a/src/Three20Core/Sources/TTDebug.m +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTDebug.h" - -#ifdef DEBUG - -#if TARGET_IPHONE_SIMULATOR - -#import -#import - -// From: http://developer.apple.com/mac/library/qa/qa2004/qa1361.html -int TTIsInDebugger(void) { - int mib[4]; - struct kinfo_proc info; - size_t size; - - // Initialize the flags so that, if sysctl fails for some bizarre - // reason, we get a predictable result. - - info.kp_proc.p_flag = 0; - - // Initialize mib, which tells sysctl the info we want, in this case - // we're looking for information about a specific process ID. - - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PID; - mib[3] = getpid(); - - // Call sysctl. - - size = sizeof(info); - sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0); - - // We're being debugged if the P_TRACED flag is set. - - return (info.kp_proc.p_flag & P_TRACED) != 0; -} - -#endif // #ifdef TARGET_IPHONE_SIMULATOR - -#endif // #ifdef DEBUG diff --git a/src/Three20Core/Sources/TTEntityTables.m b/src/Three20Core/Sources/TTEntityTables.m deleted file mode 100644 index 2c57c7362a..0000000000 --- a/src/Three20Core/Sources/TTEntityTables.m +++ /dev/null @@ -1,234 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTEntityTables.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTEntityTables - -@synthesize iso88591 = _iso88591; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_iso88591); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)iso88591 { - if (nil == _iso88591) { - _iso88591 = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSData dataWithBytes:"\"" length:1], @"quot", - [NSData dataWithBytes:"'" length:1], @"apos", - [NSData dataWithBytes:"&" length:1], @"amp", - [NSData dataWithBytes:"<" length:1], @"lt", - [NSData dataWithBytes:">" length:1], @"gt", - [NSData dataWithBytes:" " length:1], @"nbsp", - - [@" " dataUsingEncoding:NSUTF8StringEncoding], @"nbsp", - [@"¡" dataUsingEncoding:NSUTF8StringEncoding], @"iexcl", - [@"¢" dataUsingEncoding:NSUTF8StringEncoding], @"cent", - [@"£" dataUsingEncoding:NSUTF8StringEncoding], @"pound", - [@"¤" dataUsingEncoding:NSUTF8StringEncoding], @"curren", - [@"¥" dataUsingEncoding:NSUTF8StringEncoding], @"yen", - [@"¦" dataUsingEncoding:NSUTF8StringEncoding], @"brvbar", - [@"§" dataUsingEncoding:NSUTF8StringEncoding], @"sect", - [@"¨" dataUsingEncoding:NSUTF8StringEncoding], @"uml", - [@"©" dataUsingEncoding:NSUTF8StringEncoding], @"copy", - [@"ª" dataUsingEncoding:NSUTF8StringEncoding], @"ordf", - [@"«" dataUsingEncoding:NSUTF8StringEncoding], @"laquo", - [@"¬" dataUsingEncoding:NSUTF8StringEncoding], @"not", - [@"®" dataUsingEncoding:NSUTF8StringEncoding], @"reg", - [@"¯" dataUsingEncoding:NSUTF8StringEncoding], @"macr", - [@"°" dataUsingEncoding:NSUTF8StringEncoding], @"deg", - [@"±" dataUsingEncoding:NSUTF8StringEncoding], @"plusmn", - [@"²" dataUsingEncoding:NSUTF8StringEncoding], @"sup2", - [@"³" dataUsingEncoding:NSUTF8StringEncoding], @"sup3", - [@"´" dataUsingEncoding:NSUTF8StringEncoding], @"acute", - [@"µ" dataUsingEncoding:NSUTF8StringEncoding], @"micro", - [@"¶" dataUsingEncoding:NSUTF8StringEncoding], @"para", - [@"·" dataUsingEncoding:NSUTF8StringEncoding], @"middot", - [@"¸" dataUsingEncoding:NSUTF8StringEncoding], @"cedil", - [@"¹" dataUsingEncoding:NSUTF8StringEncoding], @"sup1", - [@"º" dataUsingEncoding:NSUTF8StringEncoding], @"ordm", - [@"»" dataUsingEncoding:NSUTF8StringEncoding], @"raquo", - [@"¼" dataUsingEncoding:NSUTF8StringEncoding], @"frac14", - [@"½" dataUsingEncoding:NSUTF8StringEncoding], @"frac12", - [@"¾" dataUsingEncoding:NSUTF8StringEncoding], @"frac34", - [@"¿" dataUsingEncoding:NSUTF8StringEncoding], @"iquest", - [@"×" dataUsingEncoding:NSUTF8StringEncoding], @"times", - [@"÷" dataUsingEncoding:NSUTF8StringEncoding], @"divide", - - [@"À" dataUsingEncoding:NSUTF8StringEncoding], @"Agrave", - [@"Á" dataUsingEncoding:NSUTF8StringEncoding], @"Aacute", - [@"Â" dataUsingEncoding:NSUTF8StringEncoding], @"Acirc", - [@"Ã" dataUsingEncoding:NSUTF8StringEncoding], @"Atilde", - [@"Ä" dataUsingEncoding:NSUTF8StringEncoding], @"Auml", - [@"Å" dataUsingEncoding:NSUTF8StringEncoding], @"Aring", - [@"Æ" dataUsingEncoding:NSUTF8StringEncoding], @"AElig", - [@"Ç" dataUsingEncoding:NSUTF8StringEncoding], @"Ccedil", - [@"È" dataUsingEncoding:NSUTF8StringEncoding], @"Egrave", - [@"É" dataUsingEncoding:NSUTF8StringEncoding], @"Eacute", - [@"Ê" dataUsingEncoding:NSUTF8StringEncoding], @"Ecirc", - [@"Ë" dataUsingEncoding:NSUTF8StringEncoding], @"Euml", - [@"Ì" dataUsingEncoding:NSUTF8StringEncoding], @"Igrave", - [@"Í" dataUsingEncoding:NSUTF8StringEncoding], @"Iacute", - [@"Î" dataUsingEncoding:NSUTF8StringEncoding], @"Icirc", - [@"Ï" dataUsingEncoding:NSUTF8StringEncoding], @"Iuml", - [@"Ð" dataUsingEncoding:NSUTF8StringEncoding], @"ETH", - [@"Ñ" dataUsingEncoding:NSUTF8StringEncoding], @"Ntilde", - [@"Ò" dataUsingEncoding:NSUTF8StringEncoding], @"Ograve", - [@"Ó" dataUsingEncoding:NSUTF8StringEncoding], @"Oacute", - [@"Ô" dataUsingEncoding:NSUTF8StringEncoding], @"Ocirc", - [@"Õ" dataUsingEncoding:NSUTF8StringEncoding], @"Otilde", - [@"Ö" dataUsingEncoding:NSUTF8StringEncoding], @"Ouml", - [@"Ø" dataUsingEncoding:NSUTF8StringEncoding], @"Oslash", - [@"Ù" dataUsingEncoding:NSUTF8StringEncoding], @"Ugrave", - [@"Ú" dataUsingEncoding:NSUTF8StringEncoding], @"Uacute", - [@"Û" dataUsingEncoding:NSUTF8StringEncoding], @"Ucirc", - [@"Ü" dataUsingEncoding:NSUTF8StringEncoding], @"Uuml", - [@"Ý" dataUsingEncoding:NSUTF8StringEncoding], @"Yacute", - [@"Þ" dataUsingEncoding:NSUTF8StringEncoding], @"THORN", - [@"ß" dataUsingEncoding:NSUTF8StringEncoding], @"szlig", - [@"à" dataUsingEncoding:NSUTF8StringEncoding], @"agrave", - [@"á" dataUsingEncoding:NSUTF8StringEncoding], @"aacute", - [@"â" dataUsingEncoding:NSUTF8StringEncoding], @"acirc", - [@"ã" dataUsingEncoding:NSUTF8StringEncoding], @"atilde", - [@"ä" dataUsingEncoding:NSUTF8StringEncoding], @"auml", - [@"å" dataUsingEncoding:NSUTF8StringEncoding], @"aring", - [@"æ" dataUsingEncoding:NSUTF8StringEncoding], @"aelig", - [@"ç" dataUsingEncoding:NSUTF8StringEncoding], @"ccedil", - [@"è" dataUsingEncoding:NSUTF8StringEncoding], @"egrave", - [@"é" dataUsingEncoding:NSUTF8StringEncoding], @"eacute", - [@"ê" dataUsingEncoding:NSUTF8StringEncoding], @"ecirc", - [@"ë" dataUsingEncoding:NSUTF8StringEncoding], @"euml", - [@"ì" dataUsingEncoding:NSUTF8StringEncoding], @"igrave", - [@"í" dataUsingEncoding:NSUTF8StringEncoding], @"iacute", - [@"î" dataUsingEncoding:NSUTF8StringEncoding], @"icirc", - [@"ï" dataUsingEncoding:NSUTF8StringEncoding], @"iuml", - [@"ð" dataUsingEncoding:NSUTF8StringEncoding], @"eth", - [@"ñ" dataUsingEncoding:NSUTF8StringEncoding], @"ntilde", - [@"ò" dataUsingEncoding:NSUTF8StringEncoding], @"ograve", - [@"ó" dataUsingEncoding:NSUTF8StringEncoding], @"oacute", - [@"ô" dataUsingEncoding:NSUTF8StringEncoding], @"ocirc", - [@"õ" dataUsingEncoding:NSUTF8StringEncoding], @"otilde", - [@"ö" dataUsingEncoding:NSUTF8StringEncoding], @"ouml", - [@"ø" dataUsingEncoding:NSUTF8StringEncoding], @"oslash", - [@"ù" dataUsingEncoding:NSUTF8StringEncoding], @"ugrave", - [@"ú" dataUsingEncoding:NSUTF8StringEncoding], @"uacute", - [@"û" dataUsingEncoding:NSUTF8StringEncoding], @"ucirc", - [@"ü" dataUsingEncoding:NSUTF8StringEncoding], @"uuml", - [@"ý" dataUsingEncoding:NSUTF8StringEncoding], @"yacute", - [@"þ" dataUsingEncoding:NSUTF8StringEncoding], @"thorn", - [@"ÿ" dataUsingEncoding:NSUTF8StringEncoding], @"yuml", - - nil]; - } - - return _iso88591; -} - - -@end - - -//////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTEntityTables (TTSingleton) - -static TTEntityTables* sharedInstance = nil; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)sharedInstance { - @synchronized(self) { - if (nil == sharedInstance) { - sharedInstance = [[self alloc] init]; - } - } - return sharedInstance; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (oneway void)superRelease { - [super release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)releaseSharedInstance { - @synchronized(self) { - [sharedInstance superRelease]; - sharedInstance = nil; - } -} - - -//////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)allocWithZone:(NSZone*)zone { - @synchronized(self) { - if (nil == sharedInstance) { - sharedInstance = [super allocWithZone:zone]; - } - } - - return sharedInstance; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)copyWithZone:(NSZone *)zone { - return sharedInstance; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)retain { - return sharedInstance; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (unsigned)retainCount { - return NSUIntegerMax; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (oneway void)release { - // Do nothing. -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)autorelease { - return sharedInstance; -} - - -@end diff --git a/src/Three20Core/Sources/TTExtensionAuthor.m b/src/Three20Core/Sources/TTExtensionAuthor.m deleted file mode 100644 index 821023147f..0000000000 --- a/src/Three20Core/Sources/TTExtensionAuthor.m +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTExtensionAuthor.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTExtensionAuthor - -@synthesize name = _name; -@synthesize github = _github; -@synthesize twitter = _twitter; -@synthesize website = _website; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)authorWithName:(NSString*)name { - return [[[self alloc] initWithName: name - github: nil - twitter: nil - website: nil] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)authorWithName: (NSString*)name - github: (NSString*)github - twitter: (NSString*)twitter - website: (NSString*)website { - return [[[self alloc] initWithName: name - github: github - twitter: twitter - website: website] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithName: (NSString*)name - github: (NSString*)github - twitter: (NSString*)twitter - website: (NSString*)website { - if (self = [super init]) { - self.name = name; - self.github = github; - self.twitter = twitter; - self.website = website; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - return [self initWithName:@"Unknown" github:nil twitter:nil website:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_name); - TT_RELEASE_SAFELY(_github); - TT_RELEASE_SAFELY(_twitter); - TT_RELEASE_SAFELY(_website); - - [super dealloc]; -} - - -@end - diff --git a/src/Three20Core/Sources/TTExtensionInfo.m b/src/Three20Core/Sources/TTExtensionInfo.m deleted file mode 100644 index bf5ff60ee4..0000000000 --- a/src/Three20Core/Sources/TTExtensionInfo.m +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTExtensionInfo.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// Core (private) -#import "Three20Core/private/TTExtensionInfoPrivate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTExtensionInfo - -@synthesize identifier = _id; -@synthesize name = _name; -@synthesize description = _description; -@synthesize version = _version; -@synthesize copyright = _copyright; -@synthesize license = _license; -@synthesize authors = _authors; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - self.version = @"No version provided."; - self.description = @"No description provided."; - self.copyright = @"No copyright provided."; - self.license = @"No license provided."; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_id); - TT_RELEASE_SAFELY(_description); - TT_RELEASE_SAFELY(_name); - TT_RELEASE_SAFELY(_version); - TT_RELEASE_SAFELY(_copyright); - TT_RELEASE_SAFELY(_license); - TT_RELEASE_SAFELY(_authors); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isEqual:(TTExtensionInfo*)extension { - return [_id isEqualToString:extension.identifier]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setIdentifier:(NSString*)identifier { - if (_id != identifier) { - [_id release]; - _id = [identifier copy]; - } -} - - -@end - diff --git a/src/Three20Core/Sources/TTExtensionLoader.m b/src/Three20Core/Sources/TTExtensionLoader.m deleted file mode 100644 index 4035f1ab3a..0000000000 --- a/src/Three20Core/Sources/TTExtensionLoader.m +++ /dev/null @@ -1,167 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTExtensionLoader.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTExtensionInfo.h" - -// Core (private) -#import "Three20Core/private/TTExtensionInfoPrivate.h" - -#import - -static NSString* kLoadExtensionMethodPrefix = @"loadExtensionNamed"; -static NSString* kExtensionInfoMethodPrefix = @"extensionInfoNamed"; - -static NSMutableDictionary* sTTAvailableExtensions = nil; -static NSMutableDictionary* sTTLoadedExtensions = nil; -static NSMutableDictionary* sTTFailedExtensions = nil; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTExtensionLoader - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)callExtensionID:(NSString*)extensionID methodWithPrefix:(NSString*)prefix { - SEL selector = NSSelectorFromString([prefix - stringByAppendingString:extensionID]); - - id result = nil; - if ([self respondsToSelector:selector]) { - result = [self performSelector:selector]; - } - return result; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTExtensionInfo*)extensionWithID:(NSString*)extensionID { - TTExtensionInfo* extension = [self callExtensionID: extensionID - methodWithPrefix: kExtensionInfoMethodPrefix]; - if (nil == extension) { - extension = [[[TTExtensionInfo alloc] init] autorelease]; - } - extension.identifier = extensionID; - return extension; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadExtension:(TTExtensionInfo*)extension { - BOOL succeeded = [self callExtensionID: extension.identifier - methodWithPrefix: kLoadExtensionMethodPrefix] ? YES : NO; - - if (succeeded) { - [sTTLoadedExtensions setObject:extension forKey:extension.identifier]; - - } else { - [sTTFailedExtensions setObject:extension forKey:extension.identifier]; - } - - return succeeded; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)setupStaticData { - if (nil == sTTLoadedExtensions) { - sTTLoadedExtensions = [[NSMutableDictionary alloc] init]; - } - if (nil == sTTFailedExtensions) { - sTTFailedExtensions = [[NSMutableDictionary alloc] init]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)loadAllExtensions { - [self setupStaticData]; - - NSDictionary* availableExtensions = [self availableExtensions]; - - if ([availableExtensions count] > 0) { - TTExtensionLoader* loader = [[TTExtensionLoader alloc] init]; - - for (NSString* extensionID in availableExtensions) { - TTExtensionInfo* extension = [availableExtensions objectForKey:extensionID]; - [loader loadExtension:extension]; - } - - TT_RELEASE_SAFELY(loader); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (NSDictionary*)availableExtensions { - if (nil == sTTAvailableExtensions) { - sTTAvailableExtensions = [[NSMutableDictionary alloc] init]; - - unsigned int methodCount = 0; - Method* methods = class_copyMethodList([self class], &methodCount); - - if (nil != methods) { - TTExtensionLoader* loader = [[TTExtensionLoader alloc] init]; - - for (unsigned int ix = 0; ix < methodCount; ++ix) { - Method method = methods[ix]; - - SEL methodSelector = method_getName(method); - - NSString* methodName = [NSString stringWithCString: sel_getName(methodSelector) - encoding: NSUTF8StringEncoding]; - - if ([methodName hasPrefix:kLoadExtensionMethodPrefix]) { - NSString* extensionID = [methodName substringFromIndex: - [kLoadExtensionMethodPrefix length]]; - - TTExtensionInfo* extension = [loader extensionWithID:extensionID]; - TTDASSERT(nil != extension); - - if (nil != extension) { - [sTTAvailableExtensions setObject:extension forKey:extensionID]; - } - } - } - - TT_RELEASE_SAFELY(loader); - } - } - - return [NSDictionary dictionaryWithDictionary:sTTAvailableExtensions]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (NSDictionary*)loadedExtensions { - return [NSDictionary dictionaryWithDictionary:sTTLoadedExtensions]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (NSDictionary*)failedExtensions { - return [NSDictionary dictionaryWithDictionary:sTTFailedExtensions]; -} - - -@end - diff --git a/src/Three20Core/Sources/TTGlobalCore.m b/src/Three20Core/Sources/TTGlobalCore.m deleted file mode 100644 index 5fe212642d..0000000000 --- a/src/Three20Core/Sources/TTGlobalCore.m +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTGlobalCore.h" - -#import - -// No-ops for non-retaining objects. -static const void* TTRetainNoOp(CFAllocatorRef allocator, const void *value) { return value; } -static void TTReleaseNoOp(CFAllocatorRef allocator, const void *value) { } - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSMutableArray* TTCreateNonRetainingArray() { - CFArrayCallBacks callbacks = kCFTypeArrayCallBacks; - callbacks.retain = TTRetainNoOp; - callbacks.release = TTReleaseNoOp; - return (NSMutableArray*)CFArrayCreateMutable(nil, 0, &callbacks); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSMutableDictionary* TTCreateNonRetainingDictionary() { - CFDictionaryKeyCallBacks keyCallbacks = kCFTypeDictionaryKeyCallBacks; - CFDictionaryValueCallBacks callbacks = kCFTypeDictionaryValueCallBacks; - callbacks.retain = TTRetainNoOp; - callbacks.release = TTReleaseNoOp; - return (NSMutableDictionary*)CFDictionaryCreateMutable(nil, 0, &keyCallbacks, &callbacks); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsArrayWithItems(id object) { - return [object isKindOfClass:[NSArray class]] && [(NSArray*)object count] > 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsSetWithItems(id object) { - return [object isKindOfClass:[NSSet class]] && [(NSSet*)object count] > 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsStringWithAnyText(id object) { - return [object isKindOfClass:[NSString class]] && [(NSString*)object length] > 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -void TTSwapMethods(Class cls, SEL originalSel, SEL newSel) { - Method originalMethod = class_getInstanceMethod(cls, originalSel); - Method newMethod = class_getInstanceMethod(cls, newSel); - method_exchangeImplementations(originalMethod, newMethod); -} diff --git a/src/Three20Core/Sources/TTGlobalCoreLocale.m b/src/Three20Core/Sources/TTGlobalCoreLocale.m deleted file mode 100644 index eda6e78db4..0000000000 --- a/src/Three20Core/Sources/TTGlobalCoreLocale.m +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTGlobalCoreLocale.h" - -// Core -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSLocale* TTCurrentLocale() { - NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; - NSArray* languages = [defaults objectForKey:@"AppleLanguages"]; - if (languages.count > 0) { - NSString* currentLanguage = [languages objectAtIndex:0]; - return [[[NSLocale alloc] initWithLocaleIdentifier:currentLanguage] autorelease]; - - } else { - return [NSLocale currentLocale]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSString* TTLocalizedString(NSString* key, NSString* comment) { - static NSBundle* bundle = nil; - if (nil == bundle) { - NSString* path = [[[NSBundle mainBundle] resourcePath] - stringByAppendingPathComponent:@"Three20.bundle"]; - bundle = [[NSBundle bundleWithPath:path] retain]; - } - - return [bundle localizedStringForKey:key value:key table:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSString* TTDescriptionForError(NSError* error) { - TTDINFO(@"ERROR %@", error); - - if ([error.domain isEqualToString:NSURLErrorDomain]) { - // Note: If new error codes are added here, be sure to document them in the header. - if (error.code == NSURLErrorTimedOut) { - return TTLocalizedString(@"Connection Timed Out", @""); - - } else if (error.code == NSURLErrorNotConnectedToInternet) { - return TTLocalizedString(@"No Internet Connection", @""); - - } else { - return TTLocalizedString(@"Connection Error", @""); - } - } - return TTLocalizedString(@"Error", @""); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSString* TTFormatInteger(NSInteger num) { - NSNumber* number = [NSNumber numberWithInt:num]; - NSNumberFormatter* formatter = [[NSNumberFormatter alloc] init]; - [formatter setNumberStyle:NSNumberFormatterDecimalStyle]; - NSString* formatted = [formatter stringFromNumber:number]; - [formatter release]; - return formatted; -} diff --git a/src/Three20Core/Sources/TTGlobalCorePaths.m b/src/Three20Core/Sources/TTGlobalCorePaths.m deleted file mode 100644 index 7b60759b03..0000000000 --- a/src/Three20Core/Sources/TTGlobalCorePaths.m +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTGlobalCorePaths.h" - - -static NSBundle* globalBundle = nil; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsBundleURL(NSString* URL) { - return [URL hasPrefix:@"bundle://"]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsDocumentsURL(NSString* URL) { - return [URL hasPrefix:@"documents://"]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -void TTSetDefaultBundle(NSBundle* bundle) { - [bundle retain]; - [globalBundle release]; - globalBundle = bundle; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSBundle* TTGetDefaultBundle() { - return (nil != globalBundle) ? globalBundle : [NSBundle mainBundle]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSString* TTPathForBundleResource(NSString* relativePath) { - NSString* resourcePath = [TTGetDefaultBundle() resourcePath]; - return [resourcePath stringByAppendingPathComponent:relativePath]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -NSString* TTPathForDocumentsResource(NSString* relativePath) { - static NSString* documentsPath = nil; - if (nil == documentsPath) { - NSArray* dirs = NSSearchPathForDirectoriesInDomains( - NSDocumentDirectory, NSUserDomainMask, YES); - documentsPath = [[dirs objectAtIndex:0] retain]; - } - return [documentsPath stringByAppendingPathComponent:relativePath]; -} diff --git a/src/Three20Core/Sources/TTGlobalCoreRects.m b/src/Three20Core/Sources/TTGlobalCoreRects.m deleted file mode 100644 index 8d13f1d00c..0000000000 --- a/src/Three20Core/Sources/TTGlobalCoreRects.m +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTGlobalCoreRects.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGRect TTRectContract(CGRect rect, CGFloat dx, CGFloat dy) { - return CGRectMake(rect.origin.x, rect.origin.y, rect.size.width - dx, rect.size.height - dy); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGRect TTRectShift(CGRect rect, CGFloat dx, CGFloat dy) { - return CGRectOffset(TTRectContract(rect, dx, dy), dx, dy); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGRect TTRectInset(CGRect rect, UIEdgeInsets insets) { - return CGRectMake(rect.origin.x + insets.left, rect.origin.y + insets.top, - rect.size.width - (insets.left + insets.right), - rect.size.height - (insets.top + insets.bottom)); -} diff --git a/src/Three20Core/Sources/TTMarkupStripper.m b/src/Three20Core/Sources/TTMarkupStripper.m deleted file mode 100644 index 736e1e07d4..0000000000 --- a/src/Three20Core/Sources/TTMarkupStripper.m +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTMarkupStripper.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTEntityTables.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTMarkupStripper - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_strings); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSXMLParserDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parser:(NSXMLParser*)parser foundCharacters:(NSString*)string { - [_strings addObject:string]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData*) parser: (NSXMLParser*)parser - resolveExternalEntityName: (NSString*)entityName - systemID: (NSString*)systemID { - return [[[TTEntityTables sharedInstance] iso88591] objectForKey:entityName]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)parse:(NSString*)text { - _strings = [[NSMutableArray alloc] init]; - - NSString* document = [NSString stringWithFormat:@"%@", text]; - NSData* data = [document dataUsingEncoding:text.fastestEncoding]; - NSXMLParser* parser = [[NSXMLParser alloc] initWithData:data]; - parser.delegate = self; - [parser parse]; - TT_RELEASE_SAFELY(parser); - - NSString* result = [_strings componentsJoinedByString:@""]; - TT_RELEASE_SAFELY(_strings); - - return result; -} - - -@end diff --git a/src/Three20Core/Three20Core.xcodeproj/project.pbxproj b/src/Three20Core/Three20Core.xcodeproj/project.pbxproj deleted file mode 100755 index 072523fd79..0000000000 --- a/src/Three20Core/Three20Core.xcodeproj/project.pbxproj +++ /dev/null @@ -1,678 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 66ADC9091290B23A00855386 /* TTExtensionInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 66ADC9071290B23A00855386 /* TTExtensionInfo.m */; }; - 66ADC90F1290B24D00855386 /* TTExtensionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 66ADC90E1290B24D00855386 /* TTExtensionInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66ADCE681291BC1E00855386 /* TTExtensionInfoPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 66ADCE661291BC1E00855386 /* TTExtensionInfoPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 66ADCE871291BEAE00855386 /* TTExtensionAuthor.m in Sources */ = {isa = PBXBuildFile; fileRef = 66ADCE811291BEAE00855386 /* TTExtensionAuthor.m */; }; - 66ADCE8B1291BEBB00855386 /* TTExtensionAuthor.h in Headers */ = {isa = PBXBuildFile; fileRef = 66ADCE881291BEBB00855386 /* TTExtensionAuthor.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66ECA257128DFE28006C78C2 /* TTExtensionLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 66ECA251128DFE28006C78C2 /* TTExtensionLoader.m */; }; - 66ECA25B128DFE34006C78C2 /* TTExtensionLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 66ECA258128DFE34006C78C2 /* TTExtensionLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E178E811183C8E5003B099E /* TTGlobalCore.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E7B1183C8E5003B099E /* TTGlobalCore.m */; }; - 6E178E821183C8E5003B099E /* TTGlobalCoreLocale.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E7C1183C8E5003B099E /* TTGlobalCoreLocale.m */; }; - 6E178E831183C8E5003B099E /* TTGlobalCorePaths.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E7D1183C8E5003B099E /* TTGlobalCorePaths.m */; }; - 6E178E9B1183C8F6003B099E /* NSArrayAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E8D1183C8F6003B099E /* NSArrayAdditions.m */; }; - 6E178E9C1183C8F6003B099E /* NSDataAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E8E1183C8F6003B099E /* NSDataAdditions.m */; }; - 6E178E9D1183C8F6003B099E /* NSDateAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E8F1183C8F6003B099E /* NSDateAdditions.m */; }; - 6E178E9E1183C8F6003B099E /* NSMutableArrayAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E901183C8F6003B099E /* NSMutableArrayAdditions.m */; }; - 6E178EA01183C8F6003B099E /* NSObjectAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E921183C8F6003B099E /* NSObjectAdditions.m */; }; - 6E178EA11183C8F6003B099E /* NSStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E931183C8F6003B099E /* NSStringAdditions.m */; }; - 6E3680E311F9D4130029046C /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libThree20Core.a */; }; - 6E55A4971183C946002768DE /* TTDebug.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E55A4951183C946002768DE /* TTDebug.m */; }; - 6E55A49A1183C94F002768DE /* TTMarkupStripper.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E55A4981183C94F002768DE /* TTMarkupStripper.m */; }; - 6E55A49C1183C956002768DE /* TTMarkupStripper.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E55A49B1183C956002768DE /* TTMarkupStripper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E607C6F11AF286B00C93CD4 /* CoreMarkupStripperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E607C6E11AF286B00C93CD4 /* CoreMarkupStripperTests.m */; }; - 6E607CF111AF2FE400C93CD4 /* TTEntityTables.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E607CEE11AF2FCB00C93CD4 /* TTEntityTables.m */; }; - 6E607CF211AF2FE400C93CD4 /* TTEntityTables.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E607CF011AF2FD800C93CD4 /* TTEntityTables.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6454551184BE8600F08CB1 /* Three20Core.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454531184BE8600F08CB1 /* Three20Core.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6454561184BE8600F08CB1 /* Three20Core+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454541184BE8600F08CB1 /* Three20Core+Additions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB4605E1183CFB100685649 /* NSArrayAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178EB01183C906003B099E /* NSArrayAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB4605F1183CFB400685649 /* NSDataAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178EB11183C906003B099E /* NSDataAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB460601183CFB400685649 /* NSDateAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178EB21183C906003B099E /* NSDateAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB460611183CFB700685649 /* NSMutableArrayAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178EB31183C906003B099E /* NSMutableArrayAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB460621183CFB800685649 /* NSMutableDictionaryAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178EB41183C906003B099E /* NSMutableDictionaryAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB460631183CFB900685649 /* NSMutableDictionaryAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E178E911183C8F6003B099E /* NSMutableDictionaryAdditions.m */; }; - 6EB460641183CFB900685649 /* NSObjectAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178EB51183C906003B099E /* NSObjectAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB460651183CFBC00685649 /* NSStringAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178EB61183C906003B099E /* NSStringAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB460691183CFCA00685649 /* TTCorePreprocessorMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178E771183C8D3003B099E /* TTCorePreprocessorMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB4606A1183CFCB00685649 /* TTDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E55A4941183C93F002768DE /* TTDebug.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB4606B1183CFCF00685649 /* TTDebugFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178E761183C8B6003B099E /* TTDebugFlags.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB4606C1183CFD100685649 /* TTGlobalCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178E781183C8DA003B099E /* TTGlobalCore.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB4606D1183CFD200685649 /* TTGlobalCoreLocale.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178E791183C8DA003B099E /* TTGlobalCoreLocale.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB4606E1183CFD500685649 /* TTGlobalCorePaths.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E178E7A1183C8DA003B099E /* TTGlobalCorePaths.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB460901183D14800685649 /* CoreAdditionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EB4608E1183D14800685649 /* CoreAdditionTests.m */; }; - 6EB460911183D14800685649 /* CoreGlobalTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EB4608F1183D14800685649 /* CoreGlobalTests.m */; }; - 6EDAE9C7118CA1720008133C /* TTGlobalCoreRects.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EDAE9C6118CA1720008133C /* TTGlobalCoreRects.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EDAE9C9118CA1790008133C /* TTGlobalCoreRects.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EDAE9C8118CA1790008133C /* TTGlobalCoreRects.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6EB460DD1183D8D400685649 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 66ADC9071290B23A00855386 /* TTExtensionInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTExtensionInfo.m; path = Sources/TTExtensionInfo.m; sourceTree = ""; }; - 66ADC90E1290B24D00855386 /* TTExtensionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionInfo.h; path = Headers/TTExtensionInfo.h; sourceTree = ""; }; - 66ADCE661291BC1E00855386 /* TTExtensionInfoPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionInfoPrivate.h; path = Headers/TTExtensionInfoPrivate.h; sourceTree = ""; }; - 66ADCE811291BEAE00855386 /* TTExtensionAuthor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTExtensionAuthor.m; path = Sources/TTExtensionAuthor.m; sourceTree = ""; }; - 66ADCE881291BEBB00855386 /* TTExtensionAuthor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionAuthor.h; path = Headers/TTExtensionAuthor.h; sourceTree = ""; }; - 66ECA251128DFE28006C78C2 /* TTExtensionLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTExtensionLoader.m; path = Sources/TTExtensionLoader.m; sourceTree = ""; }; - 66ECA258128DFE34006C78C2 /* TTExtensionLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionLoader.h; path = Headers/TTExtensionLoader.h; sourceTree = ""; }; - 6E178E751183C8AE003B099E /* Three20Core_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20Core_Prefix.pch; path = Headers/Three20Core_Prefix.pch; sourceTree = ""; }; - 6E178E761183C8B6003B099E /* TTDebugFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTDebugFlags.h; path = Headers/TTDebugFlags.h; sourceTree = ""; }; - 6E178E771183C8D3003B099E /* TTCorePreprocessorMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTCorePreprocessorMacros.h; path = Headers/TTCorePreprocessorMacros.h; sourceTree = ""; }; - 6E178E781183C8DA003B099E /* TTGlobalCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGlobalCore.h; path = Headers/TTGlobalCore.h; sourceTree = ""; }; - 6E178E791183C8DA003B099E /* TTGlobalCoreLocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGlobalCoreLocale.h; path = Headers/TTGlobalCoreLocale.h; sourceTree = ""; }; - 6E178E7A1183C8DA003B099E /* TTGlobalCorePaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGlobalCorePaths.h; path = Headers/TTGlobalCorePaths.h; sourceTree = ""; }; - 6E178E7B1183C8E5003B099E /* TTGlobalCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGlobalCore.m; path = Sources/TTGlobalCore.m; sourceTree = ""; }; - 6E178E7C1183C8E5003B099E /* TTGlobalCoreLocale.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGlobalCoreLocale.m; path = Sources/TTGlobalCoreLocale.m; sourceTree = ""; }; - 6E178E7D1183C8E5003B099E /* TTGlobalCorePaths.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGlobalCorePaths.m; path = Sources/TTGlobalCorePaths.m; sourceTree = ""; }; - 6E178E8D1183C8F6003B099E /* NSArrayAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSArrayAdditions.m; path = Sources/NSArrayAdditions.m; sourceTree = ""; }; - 6E178E8E1183C8F6003B099E /* NSDataAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSDataAdditions.m; path = Sources/NSDataAdditions.m; sourceTree = ""; }; - 6E178E8F1183C8F6003B099E /* NSDateAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSDateAdditions.m; path = Sources/NSDateAdditions.m; sourceTree = ""; }; - 6E178E901183C8F6003B099E /* NSMutableArrayAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSMutableArrayAdditions.m; path = Sources/NSMutableArrayAdditions.m; sourceTree = ""; }; - 6E178E911183C8F6003B099E /* NSMutableDictionaryAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSMutableDictionaryAdditions.m; path = Sources/NSMutableDictionaryAdditions.m; sourceTree = ""; }; - 6E178E921183C8F6003B099E /* NSObjectAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSObjectAdditions.m; path = Sources/NSObjectAdditions.m; sourceTree = ""; }; - 6E178E931183C8F6003B099E /* NSStringAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSStringAdditions.m; path = Sources/NSStringAdditions.m; sourceTree = ""; }; - 6E178EB01183C906003B099E /* NSArrayAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSArrayAdditions.h; path = Headers/NSArrayAdditions.h; sourceTree = ""; }; - 6E178EB11183C906003B099E /* NSDataAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSDataAdditions.h; path = Headers/NSDataAdditions.h; sourceTree = ""; }; - 6E178EB21183C906003B099E /* NSDateAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSDateAdditions.h; path = Headers/NSDateAdditions.h; sourceTree = ""; }; - 6E178EB31183C906003B099E /* NSMutableArrayAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSMutableArrayAdditions.h; path = Headers/NSMutableArrayAdditions.h; sourceTree = ""; }; - 6E178EB41183C906003B099E /* NSMutableDictionaryAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSMutableDictionaryAdditions.h; path = Headers/NSMutableDictionaryAdditions.h; sourceTree = ""; }; - 6E178EB51183C906003B099E /* NSObjectAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSObjectAdditions.h; path = Headers/NSObjectAdditions.h; sourceTree = ""; }; - 6E178EB61183C906003B099E /* NSStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSStringAdditions.h; path = Headers/NSStringAdditions.h; sourceTree = ""; }; - 6E55A4941183C93F002768DE /* TTDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTDebug.h; path = Headers/TTDebug.h; sourceTree = ""; }; - 6E55A4951183C946002768DE /* TTDebug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTDebug.m; path = Sources/TTDebug.m; sourceTree = ""; }; - 6E55A4981183C94F002768DE /* TTMarkupStripper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTMarkupStripper.m; path = Sources/TTMarkupStripper.m; sourceTree = ""; }; - 6E55A49B1183C956002768DE /* TTMarkupStripper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTMarkupStripper.h; path = Headers/TTMarkupStripper.h; sourceTree = ""; }; - 6E55A4B31183CA80002768DE /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6E607C6E11AF286B00C93CD4 /* CoreMarkupStripperTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CoreMarkupStripperTests.m; path = UnitTests/CoreMarkupStripperTests.m; sourceTree = ""; }; - 6E607CEE11AF2FCB00C93CD4 /* TTEntityTables.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTEntityTables.m; path = Sources/TTEntityTables.m; sourceTree = ""; }; - 6E607CF011AF2FD800C93CD4 /* TTEntityTables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTEntityTables.h; path = Headers/TTEntityTables.h; sourceTree = ""; }; - 6E6454021184BDD500F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E6454531184BE8600F08CB1 /* Three20Core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20Core.h; path = Headers/Three20Core.h; sourceTree = ""; }; - 6E6454541184BE8600F08CB1 /* Three20Core+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Three20Core+Additions.h"; path = "Headers/Three20Core+Additions.h"; sourceTree = ""; }; - 6E7F9310118E0DA800443B46 /* Protect.command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Protect.command; path = ../scripts/Protect.command; sourceTree = SOURCE_ROOT; }; - 6EB4608E1183D14800685649 /* CoreAdditionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CoreAdditionTests.m; path = UnitTests/CoreAdditionTests.m; sourceTree = ""; }; - 6EB4608F1183D14800685649 /* CoreGlobalTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CoreGlobalTests.m; path = UnitTests/CoreGlobalTests.m; sourceTree = ""; }; - 6EB460921183D16000685649 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6EC8E92411AB936D00A5AD2C /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = ""; }; - 6EDAE9C6118CA1720008133C /* TTGlobalCoreRects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGlobalCoreRects.h; path = Headers/TTGlobalCoreRects.h; sourceTree = ""; }; - 6EDAE9C8118CA1790008133C /* TTGlobalCoreRects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGlobalCoreRects.m; path = Sources/TTGlobalCoreRects.m; sourceTree = ""; }; - BEF31F3A0F352DF5000DE5D2 /* libThree20Core.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libThree20Core.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* CoreUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoreUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3680E311F9D4130029046C /* libThree20Core.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libThree20Core.a */, - EB9E6C6210B6A8F800DE563C /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6EC8E92411AB936D00A5AD2C /* README.mdown */, - 6E6454531184BE8600F08CB1 /* Three20Core.h */, - 6E6454541184BE8600F08CB1 /* Three20Core+Additions.h */, - 6E178E751183C8AE003B099E /* Three20Core_Prefix.pch */, - 6E178E761183C8B6003B099E /* TTDebugFlags.h */, - 6EB4609C1183D1E000685649 /* Source */, - 6ED117ED1183BE770096AEBF /* Tests */, - 6E7F930B118E0D9000443B46 /* Scripts */, - 6ED118E41183C38A0096AEBF /* Configurations */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 6664448A129386CB0045A174 /* Private */ = { - isa = PBXGroup; - children = ( - 66ADCE661291BC1E00855386 /* TTExtensionInfoPrivate.h */, - ); - name = Private; - sourceTree = ""; - }; - 66ECA24F128DFE10006C78C2 /* Extensions */ = { - isa = PBXGroup; - children = ( - 66ECA258128DFE34006C78C2 /* TTExtensionLoader.h */, - 66ECA251128DFE28006C78C2 /* TTExtensionLoader.m */, - 66ADC90E1290B24D00855386 /* TTExtensionInfo.h */, - 66ADC9071290B23A00855386 /* TTExtensionInfo.m */, - 6664448A129386CB0045A174 /* Private */, - 66ADCE881291BEBB00855386 /* TTExtensionAuthor.h */, - 66ADCE811291BEAE00855386 /* TTExtensionAuthor.m */, - ); - name = Extensions; - sourceTree = ""; - }; - 6E607CAE11AF2DE800C93CD4 /* Entity Tables */ = { - isa = PBXGroup; - children = ( - 6E607CF011AF2FD800C93CD4 /* TTEntityTables.h */, - 6E607CEE11AF2FCB00C93CD4 /* TTEntityTables.m */, - ); - name = "Entity Tables"; - sourceTree = ""; - }; - 6E78061A1183BD810078A30B /* Classes */ = { - isa = PBXGroup; - children = ( - 6ED118421183C01F0096AEBF /* Markup Stripper */, - ); - name = Classes; - sourceTree = ""; - }; - 6E7F930B118E0D9000443B46 /* Scripts */ = { - isa = PBXGroup; - children = ( - 6E7F9310118E0DA800443B46 /* Protect.command */, - ); - name = Scripts; - sourceTree = ""; - }; - 6EB4609C1183D1E000685649 /* Source */ = { - isa = PBXGroup; - children = ( - 6ED117D21183BDBF0096AEBF /* Global */, - 6ED118141183BF9D0096AEBF /* Additions */, - 6ED118C21183C2310096AEBF /* Debug */, - 66ECA24F128DFE10006C78C2 /* Extensions */, - 6E607CAE11AF2DE800C93CD4 /* Entity Tables */, - 6E78061A1183BD810078A30B /* Classes */, - ); - name = Source; - sourceTree = ""; - }; - 6ED117D21183BDBF0096AEBF /* Global */ = { - isa = PBXGroup; - children = ( - 6E178E771183C8D3003B099E /* TTCorePreprocessorMacros.h */, - 6E178E781183C8DA003B099E /* TTGlobalCore.h */, - 6E178E7B1183C8E5003B099E /* TTGlobalCore.m */, - 6E178E791183C8DA003B099E /* TTGlobalCoreLocale.h */, - 6E178E7C1183C8E5003B099E /* TTGlobalCoreLocale.m */, - 6E178E7A1183C8DA003B099E /* TTGlobalCorePaths.h */, - 6E178E7D1183C8E5003B099E /* TTGlobalCorePaths.m */, - 6EDAE9C6118CA1720008133C /* TTGlobalCoreRects.h */, - 6EDAE9C8118CA1790008133C /* TTGlobalCoreRects.m */, - ); - name = Global; - sourceTree = ""; - }; - 6ED117E51183BE2A0096AEBF /* Resources */ = { - isa = PBXGroup; - children = ( - 6EB460921183D16000685649 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6ED117ED1183BE770096AEBF /* Tests */ = { - isa = PBXGroup; - children = ( - 6ED117E51183BE2A0096AEBF /* Resources */, - 6EB4608E1183D14800685649 /* CoreAdditionTests.m */, - 6EB4608F1183D14800685649 /* CoreGlobalTests.m */, - 6E607C6E11AF286B00C93CD4 /* CoreMarkupStripperTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6ED118141183BF9D0096AEBF /* Additions */ = { - isa = PBXGroup; - children = ( - 6E178EB01183C906003B099E /* NSArrayAdditions.h */, - 6E178E8D1183C8F6003B099E /* NSArrayAdditions.m */, - 6E178EB11183C906003B099E /* NSDataAdditions.h */, - 6E178E8E1183C8F6003B099E /* NSDataAdditions.m */, - 6E178EB21183C906003B099E /* NSDateAdditions.h */, - 6E178E8F1183C8F6003B099E /* NSDateAdditions.m */, - 6E178EB31183C906003B099E /* NSMutableArrayAdditions.h */, - 6E178E901183C8F6003B099E /* NSMutableArrayAdditions.m */, - 6E178EB41183C906003B099E /* NSMutableDictionaryAdditions.h */, - 6E178E911183C8F6003B099E /* NSMutableDictionaryAdditions.m */, - 6E178EB51183C906003B099E /* NSObjectAdditions.h */, - 6E178E921183C8F6003B099E /* NSObjectAdditions.m */, - 6E178EB61183C906003B099E /* NSStringAdditions.h */, - 6E178E931183C8F6003B099E /* NSStringAdditions.m */, - ); - name = Additions; - sourceTree = ""; - }; - 6ED118421183C01F0096AEBF /* Markup Stripper */ = { - isa = PBXGroup; - children = ( - 6E55A49B1183C956002768DE /* TTMarkupStripper.h */, - 6E55A4981183C94F002768DE /* TTMarkupStripper.m */, - ); - name = "Markup Stripper"; - sourceTree = ""; - }; - 6ED118C21183C2310096AEBF /* Debug */ = { - isa = PBXGroup; - children = ( - 6E55A4941183C93F002768DE /* TTDebug.h */, - 6E55A4951183C946002768DE /* TTDebug.m */, - ); - name = Debug; - sourceTree = ""; - }; - 6ED118E41183C38A0096AEBF /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E55A4B31183CA80002768DE /* Library.xcconfig */, - 6E6454021184BDD500F08CB1 /* Project.xcconfig */, - 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E55A49C1183C956002768DE /* TTMarkupStripper.h in Headers */, - 6EB4605E1183CFB100685649 /* NSArrayAdditions.h in Headers */, - 6EB4605F1183CFB400685649 /* NSDataAdditions.h in Headers */, - 6EB460601183CFB400685649 /* NSDateAdditions.h in Headers */, - 6EB460611183CFB700685649 /* NSMutableArrayAdditions.h in Headers */, - 6EB460621183CFB800685649 /* NSMutableDictionaryAdditions.h in Headers */, - 6EB460641183CFB900685649 /* NSObjectAdditions.h in Headers */, - 6EB460651183CFBC00685649 /* NSStringAdditions.h in Headers */, - 6EB460691183CFCA00685649 /* TTCorePreprocessorMacros.h in Headers */, - 6EB4606A1183CFCB00685649 /* TTDebug.h in Headers */, - 6EB4606B1183CFCF00685649 /* TTDebugFlags.h in Headers */, - 6EB4606C1183CFD100685649 /* TTGlobalCore.h in Headers */, - 6EB4606D1183CFD200685649 /* TTGlobalCoreLocale.h in Headers */, - 6EB4606E1183CFD500685649 /* TTGlobalCorePaths.h in Headers */, - 6E6454551184BE8600F08CB1 /* Three20Core.h in Headers */, - 6E6454561184BE8600F08CB1 /* Three20Core+Additions.h in Headers */, - 6EDAE9C7118CA1720008133C /* TTGlobalCoreRects.h in Headers */, - 6E607CF211AF2FE400C93CD4 /* TTEntityTables.h in Headers */, - 66ECA25B128DFE34006C78C2 /* TTExtensionLoader.h in Headers */, - 66ADC90F1290B24D00855386 /* TTExtensionInfo.h in Headers */, - 66ADCE681291BC1E00855386 /* TTExtensionInfoPrivate.h in Headers */, - 66ADCE8B1291BEBB00855386 /* TTExtensionAuthor.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* Three20Core */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20Core" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E645EC91187AB0500F08CB1 /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E63EA131A42F500ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Three20Core; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libThree20Core.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* Three20CoreUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20CoreUnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6EB460DE1183D8D400685649 /* PBXTargetDependency */, - ); - name = Three20CoreUnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* CoreUnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20Core" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* Three20Core */, - EB9E6C6110B6A8F800DE563C /* Three20CoreUnitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E63EA131A42F500ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E645EC91187AB0500F08CB1 /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E178E811183C8E5003B099E /* TTGlobalCore.m in Sources */, - 6E178E821183C8E5003B099E /* TTGlobalCoreLocale.m in Sources */, - 6E178E831183C8E5003B099E /* TTGlobalCorePaths.m in Sources */, - 6E178E9B1183C8F6003B099E /* NSArrayAdditions.m in Sources */, - 6E178E9C1183C8F6003B099E /* NSDataAdditions.m in Sources */, - 6E178E9D1183C8F6003B099E /* NSDateAdditions.m in Sources */, - 6E178E9E1183C8F6003B099E /* NSMutableArrayAdditions.m in Sources */, - 6E178EA01183C8F6003B099E /* NSObjectAdditions.m in Sources */, - 6E178EA11183C8F6003B099E /* NSStringAdditions.m in Sources */, - 6E55A4971183C946002768DE /* TTDebug.m in Sources */, - 6E55A49A1183C94F002768DE /* TTMarkupStripper.m in Sources */, - 6EB460631183CFB900685649 /* NSMutableDictionaryAdditions.m in Sources */, - 6EDAE9C9118CA1790008133C /* TTGlobalCoreRects.m in Sources */, - 6E607CF111AF2FE400C93CD4 /* TTEntityTables.m in Sources */, - 66ECA257128DFE28006C78C2 /* TTExtensionLoader.m in Sources */, - 66ADC9091290B23A00855386 /* TTExtensionInfo.m in Sources */, - 66ADCE871291BEAE00855386 /* TTExtensionAuthor.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EB460901183D14800685649 /* CoreAdditionTests.m in Sources */, - 6EB460911183D14800685649 /* CoreGlobalTests.m in Sources */, - 6E607C6F11AF286B00C93CD4 /* CoreMarkupStripperTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6EB460DE1183D8D400685649 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* Three20Core */; - targetProxy = 6EB460DD1183D8D400685649 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20Core" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20Core" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20CoreUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/Three20Core/UnitTests/CoreAdditionTests.m b/src/Three20Core/UnitTests/CoreAdditionTests.m deleted file mode 100644 index d878eee63b..0000000000 --- a/src/Three20Core/UnitTests/CoreAdditionTests.m +++ /dev/null @@ -1,504 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. -// See Also: http://bit.ly/hgpqd2 - -#import - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/NSArrayAdditions.h" -#import "Three20Core/NSDataAdditions.h" -#import "Three20Core/NSMutableArrayAdditions.h" -#import "Three20Core/NSMutableDictionaryAdditions.h" -#import "Three20Core/NSStringAdditions.h" - -/** - * Unit tests for the Core additions found within Three20. These tests are a part of - * the comprehensive test suite for the Core functionality of the library. - * - * Notice: - * - * NSDateAdditions cannot be easily tested from a library unit test due to their dependence upon - * TTLocalizedString. This is because the Three20.bundle file needs to be loaded for - * TTLocalizedString to work, but the octest framework does not play well with bundles. - * It tries to load the bundle from the simulator's /bin directory - * which is not a place we can normally copy to from the Xcode project settings. - */ - -@interface CoreAdditionTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation CoreAdditionTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSDataAdditions - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSData_md5Hash { - const char* bytes = "three20"; - NSData* data = [[NSData alloc] initWithBytes:bytes length:strlen(bytes)]; - - STAssertTrue([[data md5Hash] isEqualToString:@"2804d14501153a0c8495afb3c1185012"], - @"MD5 hashes don't match."); - - TT_RELEASE_SAFELY(data); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSData_sha1Hash { - const char* bytes = "three20"; - NSData* data = [[NSData alloc] initWithBytes:bytes length:strlen(bytes)]; - - STAssertTrue([[data sha1Hash] isEqualToString:@"ca264456199abfcc3023a880b6e924026ca57164"], - @"SHA1 hashes don't match."); - - TT_RELEASE_SAFELY(data); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSStringAdditions - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSString_isWhitespace { - // From the Apple docs: - // Returns a character set containing only the whitespace characters space (U+0020) and tab - // (U+0009) and the newline and nextline characters (U+000A–U+000D, U+0085). - STAssertTrue([@"" isWhitespaceAndNewlines], @"Empty string should be whitespace."); - STAssertTrue([@" " isWhitespaceAndNewlines], @"Space character should be whitespace."); - STAssertTrue([@"\t" isWhitespaceAndNewlines], @"Tab character should be whitespace."); - STAssertTrue([@"\n" isWhitespaceAndNewlines], @"Newline character should be whitespace."); - STAssertTrue([@"\r" isWhitespaceAndNewlines], @"Carriage return character should be whitespace."); - - // Unicode whitespace - for (int unicode = 0x000A; unicode <= 0x000D; ++unicode) { - NSString* str = [NSString stringWithFormat:@"%C", unicode]; - STAssertTrue([str isWhitespaceAndNewlines], - @"Unicode string #%X should be whitespace.", unicode); - } - - NSString* str = [NSString stringWithFormat:@"%C", 0x0085]; - STAssertTrue([str isWhitespaceAndNewlines], @"Unicode string should be whitespace."); - - STAssertTrue([@" \t\r\n" isWhitespaceAndNewlines], @"Empty string should be whitespace."); - - STAssertTrue(![@"a" isWhitespaceAndNewlines], @"Text should not be whitespace."); - STAssertTrue(![@" \r\n\ta\r\n " isWhitespaceAndNewlines], @"Text should not be whitespace."); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSString_isEmptyOrWhitespace { - // From the Apple docs: - // Returns a character set containing only the in-line whitespace characters space (U+0020) - // and tab (U+0009). - STAssertTrue([@"" isEmptyOrWhitespace], @"Empty string should be empty."); - STAssertTrue([@" " isEmptyOrWhitespace], @"Space character should be whitespace."); - STAssertTrue([@"\t" isEmptyOrWhitespace], @"Tab character should be whitespace."); - STAssertTrue(![@"\n" isEmptyOrWhitespace], @"Newline character should not be whitespace."); - STAssertTrue(![@"\r" isEmptyOrWhitespace], - @"Carriage return character should not be whitespace."); - - // Unicode whitespace - for (int unicode = 0x000A; unicode <= 0x000D; ++unicode) { - NSString* str = [NSString stringWithFormat:@"%C", unicode]; - STAssertTrue(![str isEmptyOrWhitespace], - @"Unicode string #%X should not be whitespace.", unicode); - } - - NSString* str = [NSString stringWithFormat:@"%C", 0x0085]; - STAssertTrue(![str isEmptyOrWhitespace], @"Unicode string should not be whitespace."); - - STAssertTrue([@" \t" isEmptyOrWhitespace], @"Empty string should be whitespace."); - - STAssertTrue(![@"a" isEmptyOrWhitespace], @"Text should not be whitespace."); - STAssertTrue(![@" \r\n\ta\r\n " isEmptyOrWhitespace], @"Text should not be whitespace."); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSString_stringByRemovingHTMLTags { - STAssertTrue([[@"" stringByRemovingHTMLTags] isEqualToString:@""], @"Empty case failed"); - - STAssertTrue([[@" " stringByRemovingHTMLTags] isEqualToString:@" "], - @"Didn't translate nbsp entity"); - STAssertTrue([[@"&" stringByRemovingHTMLTags] isEqualToString:@"&"], - @"Didn't translate amp entity"); - STAssertTrue([[@""" stringByRemovingHTMLTags] isEqualToString:@"\""], - @"Didn't translate quot entity"); - STAssertTrue([[@"<" stringByRemovingHTMLTags] isEqualToString:@"<"], - @"Didn't translate < entity"); - STAssertTrue([[@">" stringByRemovingHTMLTags] isEqualToString:@">"], - @"Didn't translate > entity"); - - STAssertTrue([[@"" stringByRemovingHTMLTags] isEqualToString:@""], @"Failed to remove tag"); - STAssertTrue([[@"three20" stringByRemovingHTMLTags] isEqualToString:@"three20"], - @"Failed to remove tag"); - STAssertTrue([[@"three20" - stringByRemovingHTMLTags] isEqualToString:@"three20"], @"Failed to remove tag"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSString_queryDictionaryUsingEncoding { - NSDictionary* query; - - query = [@"" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([query count] == 0, @"Query: %@", query); - - query = [@"q" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([query count] == 0, @"Query: %@", query); - - query = [@"q=" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqualToString:@""], @"Query: %@", query); - - query = [@"q=three20" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqualToString:@"three20"], @"Query: %@", query); - - query = [@"q=three20%20github" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqualToString:@"three20 github"], @"Query: %@", query); - - query = [@"q=three20&hl=en" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqualToString:@"three20"], @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqualToString:@"en"], @"Query: %@", query); - - query = [@"q=three20&hl=" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqualToString:@"three20"], @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqualToString:@""], @"Query: %@", query); - - query = [@"q=&&hl=" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqualToString:@""], @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqualToString:@""], @"Query: %@", query); - - query = [@"q=three20=repo&hl=en" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertNil([query objectForKey:@"q"], @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqualToString:@"en"], @"Query: %@", query); - - query = [@"&&" queryDictionaryUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([query count] == 0, @"Query: %@", query); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSString_queryContentsUsingEncoding { - NSDictionary* query; - - query = [@"" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([query count] == 0, @"Query: %@", query); - - query = [@"q" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqual:[NSArray arrayWithObject:[NSNull null]]], - @"Query: %@", query); - - query = [@"q=" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqual:[NSArray arrayWithObject:@""]], - @"Query: %@", query); - - query = [@"q=three20" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqual:[NSArray arrayWithObject:@"three20"]], - @"Query: %@", query); - - query = [@"q=three20%20github" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqual:[NSArray arrayWithObject:@"three20 github"]], - @"Query: %@", query); - - query = [@"q=three20&hl=en" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqual:[NSArray arrayWithObject:@"three20"]], - @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqual:[NSArray arrayWithObject:@"en"]], - @"Query: %@", query); - - query = [@"q=three20&hl=" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqual:[NSArray arrayWithObject:@"three20"]], - @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqual:[NSArray arrayWithObject:@""]], - @"Query: %@", query); - - query = [@"q=&&hl=" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([[query objectForKey:@"q"] isEqual:[NSArray arrayWithObject:@""]], - @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqual:[NSArray arrayWithObject:@""]], - @"Query: %@", query); - - query = [@"q=three20=repo&hl=en" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertNil([query objectForKey:@"q"], @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqual:[NSArray arrayWithObject:@"en"]], - @"Query: %@", query); - - query = [@"&&" queryContentsUsingEncoding:NSUTF8StringEncoding]; - STAssertTrue([query count] == 0, @"Query: %@", query); - - query = [@"q=foo&q=three20" queryContentsUsingEncoding:NSUTF8StringEncoding]; - NSArray* qArr = [NSArray arrayWithObjects:@"foo", @"three20", nil]; - STAssertTrue([[query objectForKey:@"q"] isEqual:qArr], @"Query: %@", query); - - query = [@"q=foo&q=three20&hl=en" queryContentsUsingEncoding:NSUTF8StringEncoding]; - qArr = [NSArray arrayWithObjects:@"foo", @"three20", nil]; - STAssertTrue([[query objectForKey:@"q"] isEqual:qArr], @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqual:[NSArray arrayWithObject:@"en"]], - @"Query: %@", query); - - query = [@"q=foo&q=three20&hl=en&g" queryContentsUsingEncoding:NSUTF8StringEncoding]; - qArr = [NSArray arrayWithObjects:@"foo", @"three20", nil]; - STAssertTrue([[query objectForKey:@"q"] isEqual:qArr], @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqual:[NSArray arrayWithObject:@"en"]], - @"Query: %@", query); - STAssertTrue([[query objectForKey:@"g"] isEqual:[NSArray arrayWithObject:[NSNull null]]], - @"Query: %@", query); - - query = [@"q&q=three20&hl=en&g" queryContentsUsingEncoding:NSUTF8StringEncoding]; - qArr = [NSArray arrayWithObjects:[NSNull null], @"three20", nil]; - STAssertTrue([[query objectForKey:@"q"] isEqual:qArr], @"Query: %@", query); - STAssertTrue([[query objectForKey:@"hl"] isEqual:[NSArray arrayWithObject:@"en"]], - @"Query: %@", query); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSString_stringByAddingQueryDictionary { - NSString* baseUrl = @"http://google.com/search"; - STAssertTrue([[baseUrl stringByAddingQueryDictionary:nil] isEqualToString: - [baseUrl stringByAppendingString:@"?"]], @"Empty dictionary fail."); - - STAssertTrue([[baseUrl stringByAddingQueryDictionary:[NSDictionary dictionary]] isEqualToString: - [baseUrl stringByAppendingString:@"?"]], @"Empty dictionary fail."); - - STAssertTrue([[baseUrl stringByAddingQueryDictionary:[NSDictionary - dictionaryWithObject:@"three20" forKey:@"q"]] isEqualToString: - [baseUrl stringByAppendingString:@"?q=three20"]], @"Single parameter fail."); - - NSDictionary* query = [NSDictionary - dictionaryWithObjectsAndKeys: - @"three20", @"q", - @"en", @"hl", - nil]; - NSString* baseUrlWithQuery = [baseUrl stringByAddingQueryDictionary:query]; - STAssertTrue([baseUrlWithQuery isEqualToString:[baseUrl - stringByAppendingString:@"?hl=en&q=three20"]] - || [baseUrlWithQuery isEqualToString:[baseUrl - stringByAppendingString:@"?q=three20&hl=en"]], - @"Additional query parameters not correct. %@", [baseUrl stringByAddingQueryDictionary:query]); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSString_versionStringCompare { - STAssertTrue([@"3.0" versionStringCompare:@"3.0"] == NSOrderedSame, @"same version"); - STAssertTrue([@"3.0a2" versionStringCompare:@"3.0a2"] == NSOrderedSame, @"same version alpha"); - STAssertTrue([@"3.0" versionStringCompare:@"2.5"] == NSOrderedDescending, @"major no alpha"); - STAssertTrue([@"3.1" versionStringCompare:@"3.0"] == NSOrderedDescending, @"minor no alpha"); - STAssertTrue([@"3.0a1" versionStringCompare:@"3.0"] == NSOrderedAscending, @"alpha-no alpha"); - STAssertTrue([@"3.0a1" versionStringCompare:@"3.0a4"] == NSOrderedAscending, @"alpha diff"); - STAssertTrue([@"3.0a2" versionStringCompare:@"3.0a19"] == NSOrderedAscending, @"numeric alpha"); - STAssertTrue([@"3.0a" versionStringCompare:@"3.0a1"] == NSOrderedAscending, @"empty alpha"); - STAssertTrue([@"3.02" versionStringCompare:@"3.03"] == NSOrderedAscending, @"point diff"); - STAssertTrue([@"3.0.2" versionStringCompare:@"3.0.3"] == NSOrderedAscending, @"point diff"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSArrayAdditions - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSArray_perform { - NSMutableArray* obj1 = [[NSMutableArray alloc] init]; - NSMutableArray* obj2 = [[NSMutableArray alloc] init]; - NSMutableArray* obj3 = [[NSMutableArray alloc] init]; - - NSArray* arrayWithObjects = [[NSArray alloc] initWithObjects:obj1, obj2, obj3, nil]; - - // Invalid selector - - [arrayWithObjects perform:@selector(three20)]; - - // No parameters - - [arrayWithObjects perform:@selector(retain)]; - - for (id obj in arrayWithObjects) { - STAssertTrue([obj retainCount] == 3, @"Retain count wasn't modified, %d", [obj retainCount]); - } - - [arrayWithObjects perform:@selector(release)]; - - for (id obj in arrayWithObjects) { - STAssertTrue([obj retainCount] == 2, @"Retain count wasn't modified, %d", [obj retainCount]); - } - - // One parameter - - NSMutableArray* obj4 = [[NSMutableArray alloc] init]; - [arrayWithObjects perform:@selector(addObject:) withObject:obj4]; - - for (id obj in arrayWithObjects) { - STAssertTrue([obj count] == 1, @"The new object wasn't added, %d", [obj count]); - } - - // Two parameters - - NSMutableArray* obj5 = [[NSMutableArray alloc] init]; - [arrayWithObjects perform:@selector(replaceObjectAtIndex:withObject:) - withObject:0 withObject:obj5]; - - for (id obj in arrayWithObjects) { - STAssertTrue([obj count] == 1, @"The array should have the same count, %d", [obj count]); - STAssertEquals([obj objectAtIndex:0], obj5, @"The new object should have been swapped"); - } - - TT_RELEASE_SAFELY(arrayWithObjects); - TT_RELEASE_SAFELY(obj1); - TT_RELEASE_SAFELY(obj2); - TT_RELEASE_SAFELY(obj3); - TT_RELEASE_SAFELY(obj4); - TT_RELEASE_SAFELY(obj5); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSArray_makeObjectsPerformSelector { - NSMutableArray* obj1 = [[NSMutableArray alloc] init]; - NSMutableArray* obj2 = [[NSMutableArray alloc] init]; - NSMutableArray* obj3 = [[NSMutableArray alloc] init]; - - NSArray* arrayWithObjects = [[NSArray alloc] initWithObjects:obj1, obj2, obj3, nil]; - - // Two parameters - - NSMutableArray* obj5 = [[NSMutableArray alloc] init]; - [arrayWithObjects makeObjectsPerformSelector:@selector(insertObject:atIndex:) - withObject:obj5 withObject:0]; - - for (id obj in arrayWithObjects) { - STAssertTrue([obj count] == 1, @"The array should have the same count, %d", [obj count]); - STAssertEquals([obj objectAtIndex:0], obj5, @"The new object should have been swapped"); - } - - TT_RELEASE_SAFELY(arrayWithObjects); - TT_RELEASE_SAFELY(obj1); - TT_RELEASE_SAFELY(obj2); - TT_RELEASE_SAFELY(obj3); - TT_RELEASE_SAFELY(obj5); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSArray_objectWithValue { - NSArray* arrayWithObjects = [[NSArray alloc] initWithObjects: - [NSDictionary dictionaryWithObject:@"three20" forKey:@"name"], - [NSDictionary dictionaryWithObject:@"objc" forKey:@"name"], - nil]; - - STAssertNotNil([arrayWithObjects objectWithValue:@"three20" forKey:@"name"], - @"Should have found an object"); - - STAssertNil([arrayWithObjects objectWithValue:@"three20" forKey:@"no"], - @"Should not have found an object"); - - STAssertNil([arrayWithObjects objectWithValue:@"three20" forKey:nil], - @"Should not have found an object"); - - STAssertNil([arrayWithObjects objectWithValue:nil forKey:@"name"], - @"Should not have found an object"); - - STAssertNil([arrayWithObjects objectWithValue:nil forKey:nil], - @"Should not have found an object"); - - TT_RELEASE_SAFELY(arrayWithObjects); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSArray_objectWithClass { - NSArray* arrayWithObjects = [[NSArray alloc] initWithObjects: - [NSMutableDictionary dictionaryWithObject:@"three20" forKey:@"name"], - [NSMutableDictionary dictionaryWithObject:@"objc" forKey:@"name"], - nil]; - - STAssertNotNil([arrayWithObjects objectWithClass:[NSDictionary class]], - @"Should have found an object"); - - STAssertNotNil([arrayWithObjects objectWithClass:[NSMutableDictionary class]], - @"Should have found an object"); - - STAssertNil([arrayWithObjects objectWithClass:[NSArray class]], - @"Should not have found an object"); - - STAssertNil([arrayWithObjects objectWithClass:nil], - @"Should not have found an object"); - - TT_RELEASE_SAFELY(arrayWithObjects); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Non-empty strings for NSMutableArray and NSMutableDictionary - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSMutableArray_NonEmptyStrings { - NSMutableArray* arrayOfStrings = [[NSMutableArray alloc] init]; - - [arrayOfStrings addNonEmptyString:nil]; - STAssertTrue([arrayOfStrings count] == 0, @"nil shouldn't be added"); - - [arrayOfStrings addNonEmptyString:@""]; - STAssertTrue([arrayOfStrings count] == 0, @"empty string shouldn't be added"); - - [arrayOfStrings addNonEmptyString:@"three20"]; - STAssertTrue([arrayOfStrings count] == 1, @"string should have been added"); - - TT_RELEASE_SAFELY(arrayOfStrings); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNSMutableDictionary_NonEmptyStrings { - NSMutableDictionary* dictionaryOfStrings = [[NSMutableDictionary alloc] init]; - - [dictionaryOfStrings setNonEmptyString:nil forKey:@"name"]; - STAssertTrue([dictionaryOfStrings count] == 0, @"nil shouldn't be added"); - - [dictionaryOfStrings setNonEmptyString:@"" forKey:@"name"]; - STAssertTrue([dictionaryOfStrings count] == 0, @"empty string shouldn't be added"); - - [dictionaryOfStrings setNonEmptyString:@"three20" forKey:@"name"]; - STAssertTrue([dictionaryOfStrings count] == 1, @"string should have been added"); - - TT_RELEASE_SAFELY(dictionaryOfStrings); -} - - -@end diff --git a/src/Three20Core/UnitTests/CoreGlobalTests.m b/src/Three20Core/UnitTests/CoreGlobalTests.m deleted file mode 100644 index 5a92203bc9..0000000000 --- a/src/Three20Core/UnitTests/CoreGlobalTests.m +++ /dev/null @@ -1,203 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCorePaths.h" -#import "Three20Core/TTGlobalCore.h" - -/** - * Unit tests for the global methods found within Three20. These tests are a part of - * the comprehensive test suite for the Core functionality of the library. - */ - -@interface CoreGlobalTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation CoreGlobalTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testSuccess { - // This is just a test to ensure that you're building the unit tests properly. - STAssertTrue(YES, @"Something is terribly, terribly wrong."); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Macros - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testIsMaskSet { - STAssertTrue(IS_MASK_SET(1, 1), @"1 is set"); - STAssertTrue(IS_MASK_SET(0, 0), @"0 is set"); - STAssertTrue(IS_MASK_SET(0xF0|0x01, 0xF1), @"0xF1 is set"); - STAssertFalse(IS_MASK_SET(0xF0|0x00, 0xF1), @"0xF1 is not set"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Bundles - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testDefaultBundles { - STAssertEquals([NSBundle mainBundle], TTGetDefaultBundle(), - @"Default bundle should be mainBundle"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testSettingDefaultBundles { - NSBundle* testBundle = [NSBundle bundleWithIdentifier:@"com.facebook.three20.UnitTests"]; - STAssertTrue(nil != testBundle, @"Unable to find the bundle %@", [NSBundle allBundles]); - - TTSetDefaultBundle(testBundle); - - STAssertEquals(testBundle, TTGetDefaultBundle(), - @"Default bundle should be set to the unit test bundle"); - - TTSetDefaultBundle(nil); - - STAssertEquals([NSBundle mainBundle], TTGetDefaultBundle(), - @"Default bundle should be back to mainBundle"); -} - - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Non Retaining Objects - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNonRetainingArray { - NSMutableArray* array = TTCreateNonRetainingArray(); - id testObject = [[NSArray alloc] init]; - NSUInteger initialRetainCount = [testObject retainCount]; - - STAssertTrue(initialRetainCount > 0, @"Improper initial retain count"); - - [array addObject:testObject]; - STAssertEquals([testObject retainCount], initialRetainCount, @"Improper new retain count"); - - TT_RELEASE_SAFELY(array); - STAssertEquals([testObject retainCount], initialRetainCount, - @"Improper retain count after release"); - - TT_RELEASE_SAFELY(testObject); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testNonRetainingDictionary { - NSMutableDictionary* dictionary = TTCreateNonRetainingDictionary(); - id testObject = [[NSArray alloc] init]; - NSUInteger initialRetainCount = [testObject retainCount]; - - STAssertTrue(initialRetainCount > 0, @"Improper initial retain count"); - - [dictionary setObject:testObject forKey:@"obj"]; - STAssertEquals([testObject retainCount], initialRetainCount, @"Improper new retain count"); - - TT_RELEASE_SAFELY(dictionary); - STAssertEquals([testObject retainCount], initialRetainCount, - @"Improper retain count after release"); - - TT_RELEASE_SAFELY(testObject); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Empty Objects - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testIsArrayWithItems { - STAssertTrue(!TTIsArrayWithItems(nil), @"nil should not be an array with items."); - - NSMutableArray* array = [[NSMutableArray alloc] init]; - - STAssertTrue(!TTIsArrayWithItems(array), @"This array should not have any items."); - - NSDictionary* dictionary = [[NSDictionary alloc] init]; - STAssertTrue(!TTIsArrayWithItems(dictionary), @"This is not an array."); - - [array addObject:dictionary]; - STAssertTrue(TTIsArrayWithItems(array), @"This array should have items."); - - TT_RELEASE_SAFELY(array); - TT_RELEASE_SAFELY(dictionary); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testIsSetWithItems { - STAssertTrue(!TTIsSetWithItems(nil), @"nil should not be a set with items."); - - NSMutableSet* set = [[NSMutableSet alloc] init]; - - STAssertTrue(!TTIsSetWithItems(set), @"This set should not have any items."); - - NSDictionary* dictionary = [[NSDictionary alloc] init]; - STAssertTrue(!TTIsSetWithItems(dictionary), @"This is not an set."); - - [set addObject:dictionary]; - STAssertTrue(TTIsSetWithItems(set), @"This set should have items."); - - TT_RELEASE_SAFELY(set); - TT_RELEASE_SAFELY(dictionary); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testIsStringWithAnyText { - STAssertTrue(!TTIsStringWithAnyText(nil), @"nil should not be a string with any text."); - - NSString* string = [[NSString alloc] init]; - - STAssertTrue(!TTIsStringWithAnyText(string), @"This should be an empty string."); - - NSDictionary* dictionary = [[NSDictionary alloc] init]; - STAssertTrue(!TTIsStringWithAnyText(dictionary), @"This is not a string."); - - STAssertTrue(!TTIsStringWithAnyText(@""), @"This should be an empty string."); - STAssertTrue(TTIsStringWithAnyText(@"three20"), @"This should be a string with text."); - - TT_RELEASE_SAFELY(string); - TT_RELEASE_SAFELY(dictionary); -} - - -@end diff --git a/src/Three20Core/UnitTests/CoreMarkupStripperTests.m b/src/Three20Core/UnitTests/CoreMarkupStripperTests.m deleted file mode 100644 index 3e405820b6..0000000000 --- a/src/Three20Core/UnitTests/CoreMarkupStripperTests.m +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTMarkupStripper.h" - -/** - * Unit tests for the markup stripper found within Three20. These tests are a part of - * the comprehensive test suite for the Core functionality of the library. - */ - -@interface CoreMarkupStripperTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation CoreMarkupStripperTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testIsMaskSet { - TTMarkupStripper* stripper = [[TTMarkupStripper alloc] init]; - - STAssertTrue([[stripper parse:nil] isEqualToString:@"(null)"] - || [[stripper parse:nil] isEqualToString:@""], - @"Nil returns an empty string."); - - STAssertTrue([[stripper parse:@""] isEqualToString:@""], - @"Empty string returns an empty string."); - - STAssertTrue([[stripper parse:@"a"] isEqualToString:@"a"], - @"No markup should still be no markup."); - - STAssertTrue([[stripper parse:@"a"] isEqualToString:@"a"], - @"Link should be removed."); - - STAssertTrue([[stripper parse:@"a"] isEqualToString:@"a"], - @"Nested markup should be removed."); - - STAssertTrue([[stripper parse:@"a"] isEqualToString:@"a"], - @"Improperly nested markup should be removed."); - - // Entity decoding. - STAssertTrue([[stripper parse:@" "] isEqualToString:@" "], - @"Entity decoding should be in effect."); - - STAssertTrue([[stripper parse:@"&"] isEqualToString:@"&"], - @"Entity decoding should be in effect."); - - STAssertTrue([[stripper parse:@"""] isEqualToString:@"\""], - @"Entity decoding should be in effect."); - - STAssertTrue([[stripper parse:@"'"] isEqualToString:@"'"], - @"Entity decoding should be in effect."); - - STAssertTrue([[stripper parse:@"É"] isEqualToString:@"É"], - @"Entity decoding should be in effect."); - - STAssertTrue([[stripper parse:@"ø"] isEqualToString:@"ø"], - @"Entity decoding should be in effect."); - - TT_RELEASE_SAFELY(stripper); -} - - -@end diff --git a/src/Three20Core/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/Three20Core/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/Three20Core/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/Three20Network/Configurations/Library.xcconfig b/src/Three20Network/Configurations/Library.xcconfig deleted file mode 100644 index a3f80e7ae7..0000000000 --- a/src/Three20Network/Configurations/Library.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = Three20Network -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/src/Three20Network/Configurations/Project.xcconfig b/src/Three20Network/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/Three20Network/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/Three20Network/Configurations/UnitTests.xcconfig b/src/Three20Network/Configurations/UnitTests.xcconfig deleted file mode 100644 index f057aca3a2..0000000000 --- a/src/Three20Network/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = NetworkUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 diff --git a/src/Three20Network/Headers/TTErrorCodes.h b/src/Three20Network/Headers/TTErrorCodes.h deleted file mode 100644 index e197bafea1..0000000000 --- a/src/Three20Network/Headers/TTErrorCodes.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -extern NSString* const kTTNetworkErrorDomain; -extern NSInteger const kTTNetworkErrorCodeInvalidImage; - diff --git a/src/Three20Network/Headers/TTGlobalNetwork.h b/src/Three20Network/Headers/TTGlobalNetwork.h deleted file mode 100644 index a6a558fff2..0000000000 --- a/src/Three20Network/Headers/TTGlobalNetwork.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -#define TT_DEFAULT_CACHE_INVALIDATION_AGE (60*60*24) // 1 day -#define TT_DEFAULT_CACHE_EXPIRATION_AGE (60*60*24*7) // 1 week -#define TT_CACHE_EXPIRATION_AGE_NEVER (1.0 / 0.0) // inf - -/** - * Increment the number of active network requests. - * - * The status bar activity indicator will be spinning while there are active requests. - * - * @threadsafe - */ -void TTNetworkRequestStarted(); - -/** - * Decrement the number of active network requests. - * - * The status bar activity indicator will be spinning while there are active requests. - * - * @threadsafe - */ -void TTNetworkRequestStopped(); - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Images - -#define TTIMAGE(_URL) [[TTURLCache sharedCache] imageForURL:_URL] diff --git a/src/Three20Network/Headers/TTModel.h b/src/Three20Network/Headers/TTModel.h deleted file mode 100644 index 8d22df5149..0000000000 --- a/src/Three20Network/Headers/TTModel.h +++ /dev/null @@ -1,145 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -// Network -#import "Three20Network/TTURLRequestCachePolicy.h" - -/** - * TTModel describes the state of an object that can be loaded from a remote source. - * - * By implementing this protocol, you can communicate to the user the state of network - * activity in an object. - */ -@protocol TTModel - -/** - * An array of objects that conform to the TTModelDelegate protocol. - */ -- (NSMutableArray*)delegates; - -/** - * Indicates that the data has been loaded. - * - * Default implementation returns YES. - */ -- (BOOL)isLoaded; - -/** - * Indicates that the data is in the process of loading. - * - * Default implementation returns NO. - */ -- (BOOL)isLoading; - -/** - * Indicates that the data is in the process of loading additional data. - * - * Default implementation returns NO. - */ -- (BOOL)isLoadingMore; - -/** - * Indicates that the model is of date and should be reloaded as soon as possible. - * - * Default implementation returns NO. - */ --(BOOL)isOutdated; - -/** - * Loads the model. - * - * Default implementation does nothing. - */ -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more; - -/** - * Cancels a load that is in progress. - * - * Default implementation does nothing. - */ -- (void)cancel; - -/** - * Invalidates data stored in the cache or optionally erases it. - * - * Default implementation does nothing. - */ -- (void)invalidate:(BOOL)erase; - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * A default implementation of TTModel does nothing other than appear to be loaded. - */ -@interface TTModel : NSObject { - NSMutableArray* _delegates; -} - -/** - * Notifies delegates that the model started to load. - */ -- (void)didStartLoad; - -/** - * Notifies delegates that the model finished loading - */ -- (void)didFinishLoad; - -/** - * Notifies delegates that the model failed to load. - */ -- (void)didFailLoadWithError:(NSError*)error; - -/** - * Notifies delegates that the model canceled its load. - */ -- (void)didCancelLoad; - -/** - * Notifies delegates that the model has begun making multiple updates. - */ -- (void)beginUpdates; - -/** - * Notifies delegates that the model has completed its updates. - */ -- (void)endUpdates; - -/** - * Notifies delegates that an object was updated. - */ -- (void)didUpdateObject:(id)object atIndexPath:(NSIndexPath*)indexPath; - -/** - * Notifies delegates that an object was inserted. - */ -- (void)didInsertObject:(id)object atIndexPath:(NSIndexPath*)indexPath; - -/** - * Notifies delegates that an object was deleted. - */ -- (void)didDeleteObject:(id)object atIndexPath:(NSIndexPath*)indexPath; - -/** - * Notifies delegates that the model changed in some fundamental way. - */ -- (void)didChange; - -@end diff --git a/src/Three20Network/Headers/TTModelDelegate.h b/src/Three20Network/Headers/TTModelDelegate.h deleted file mode 100644 index 1573239093..0000000000 --- a/src/Three20Network/Headers/TTModelDelegate.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@protocol TTModel; - -@protocol TTModelDelegate - -@optional - -- (void)modelDidStartLoad:(id)model; - -- (void)modelDidFinishLoad:(id)model; - -- (void)model:(id)model didFailLoadWithError:(NSError*)error; - -- (void)modelDidCancelLoad:(id)model; - -/** - * Informs the delegate that the model has changed in some fundamental way. - * - * The change is not described specifically, so the delegate must assume that the entire - * contents of the model may have changed, and react almost as if it was given a new model. - */ -- (void)modelDidChange:(id)model; - -- (void)model:(id)model didUpdateObject:(id)object atIndexPath:(NSIndexPath*)indexPath; - -- (void)model:(id)model didInsertObject:(id)object atIndexPath:(NSIndexPath*)indexPath; - -- (void)model:(id)model didDeleteObject:(id)object atIndexPath:(NSIndexPath*)indexPath; - -/** - * Informs the delegate that the model is about to begin a multi-stage update. - * - * Models should use this method to condense multiple updates into a single visible update. - * This avoids having the view update multiple times for each change. Instead, the user will - * only see the end result of all of your changes when you call modelDidEndUpdates. - */ -- (void)modelDidBeginUpdates:(id)model; - -/** - * Informs the delegate that the model has completed a multi-stage update. - * - * The exact nature of the change is not specified, so the receiver should investigate the - * new state of the model by examining its properties. - */ -- (void)modelDidEndUpdates:(id)model; - -@end diff --git a/src/Three20Network/Headers/TTRequestLoader.h b/src/Three20Network/Headers/TTRequestLoader.h deleted file mode 100644 index c681c3cfe0..0000000000 --- a/src/Three20Network/Headers/TTRequestLoader.h +++ /dev/null @@ -1,133 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -// Network -#import "Three20Network/TTURLRequestCachePolicy.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" // For __TTDEPRECATED_METHOD - -@class TTURLRequestQueue; -@class TTURLRequest; - -/** - * The loader manages a set of TTURLRequests and makes the necessary callbacks for each. - * It implements the NSURLConnectionDelegate protocol and calls the required operations on the - * queue as the protocol methods are invoked. - * - * NSURLErrorCannotFindHost errors are retried at least twice before completely giving up. - * - * The loader collects identical GET TTURLRequests into a single object. This logic is handled in - * TTURLRequestQueue's sendRequest. - * For all other TTURLRequest types, they will each have their own loader. - */ -@interface TTRequestLoader : NSObject { - NSString* _urlPath; - - TTURLRequestQueue* _queue; - - NSString* _cacheKey; - TTURLRequestCachePolicy _cachePolicy; - NSTimeInterval _cacheExpirationAge; - - NSMutableArray* _requests; - NSURLConnection* _connection; - - NSHTTPURLResponse* _response; - NSMutableData* _responseData; - - /** - * When load requests fail we'll attempt the request again, as many as 2 times by default. - */ - int _retriesLeft; -} - -/** - * The list of TTURLRequests currently attached to this loader. - */ -@property (nonatomic, readonly) NSArray* requests; - -/** - * The common urlPath shared by every request. - */ -@property (nonatomic, readonly) NSString* urlPath; - -/** - * The common cacheKey shared by every request. - */ -@property (nonatomic, readonly) NSString* cacheKey; - -/** - * The common cache policy shared by every request. - */ -@property (nonatomic, readonly) TTURLRequestCachePolicy cachePolicy; - -/** - * The common cache expiration age shared by ever request. - */ -@property (nonatomic, readonly) NSTimeInterval cacheExpirationAge; - -/** - * Whether or not any of the requests in this loader are loading. - */ -@property (nonatomic, readonly) BOOL isLoading; - -/** - * Deprecated due to name ambiguity. Use urlPath instead. - * Remove after May 6, 2010. - */ -@property (nonatomic, readonly) NSString* URL __TTDEPRECATED_METHOD; - - -- (id)initForRequest:(TTURLRequest*)request queue:(TTURLRequestQueue*)queue; - -/** - * Duplication is possible due to the use of an NSArray for the request list. - */ -- (void)addRequest:(TTURLRequest*)request; -- (void)removeRequest:(TTURLRequest*)request; - -/** - * If the loader isn't already active, create the NSURLRequest from the first TTURLRequest added - * to this loader and fire it off. - */ -- (void)load:(NSURL*)URL; - -/** - * As with load:, will create the NSURLRequest from the first TTURLRequest added to the loader. - * Unlike load:, this method will not return until the request has been fully completed. - * - * This is useful for threads that need to block while waiting for resources from the net. - */ -- (void)loadSynchronously:(NSURL*)URL; - -/** - * Cancel only the given request. - * - * @return NO If there are no requests left. - * YES If there are any requests left. - */ -- (BOOL)cancel:(TTURLRequest*)request; - -- (NSError*)processResponse:(NSHTTPURLResponse*)response data:(id)data; -- (void)dispatchError:(NSError*)error; -- (void)dispatchLoaded:(NSDate*)timestamp; -- (void)dispatchAuthenticationChallenge:(NSURLAuthenticationChallenge*)challenge; -- (void)cancel; - -@end diff --git a/src/Three20Network/Headers/TTURLCache.h b/src/Three20Network/Headers/TTURLCache.h deleted file mode 100644 index 28ff465859..0000000000 --- a/src/Three20Network/Headers/TTURLCache.h +++ /dev/null @@ -1,239 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTURLRequest; - -/** - * A general purpose URL cache for caching data in memory and on disk. - * - * Etags are supported. - */ -@interface TTURLCache : NSObject { - NSString* _name; - NSString* _cachePath; - NSMutableDictionary* _imageCache; - NSMutableArray* _imageSortedList; - NSUInteger _totalPixelCount; - NSUInteger _maxPixelCount; - NSInteger _totalLoading; - NSTimeInterval _invalidationAge; - BOOL _disableDiskCache; - BOOL _disableImageCache; -} - -/** - * Disables the disk cache. Disables etag support as well. - */ -@property (nonatomic) BOOL disableDiskCache; - -/** - * Disables the in-memory cache for images. - */ -@property (nonatomic) BOOL disableImageCache; - -/** - * Gets the path to the directory of the disk cache. - */ -@property (nonatomic, copy) NSString* cachePath; - -/** - * Gets the path to the directory of the disk cache for etags. - */ -@property (nonatomic, readonly) NSString* etagCachePath; - -/** - * The maximum number of pixels to keep in memory for cached images. - * - * Setting this to zero will allow an unlimited number of images to be cached. The default - * is zero. - */ -@property (nonatomic) NSUInteger maxPixelCount; - -/** - * The amount of time to set back the modification timestamp on files when invalidating them. - */ -@property (nonatomic) NSTimeInterval invalidationAge; - - -/** - * Gets a shared cache identified with a unique name. - */ -+ (TTURLCache*)cacheWithName:(NSString*)name; - -/** - * Gets the shared cache singleton used across the application. - */ -+ (TTURLCache*)sharedCache; - -/** - * Sets the shared cache singleton used across the application. - */ -+ (void)setSharedCache:(TTURLCache*)cache; - -- (id)initWithName:(NSString*)name; - -/** - * Gets the key that would be used to cache a URL response. - */ -- (NSString *)keyForURL:(NSString*)URL; - -/** - * Gets the path in the cache where a URL may be stored. - */ -- (NSString*)cachePathForURL:(NSString*)URL; - -/** - * Gets the path in the cache where a key may be stored. - */ -- (NSString*)cachePathForKey:(NSString*)key; - -/** - * Etag cache files are stored in the following way: - * File name: - * File data: - * - * @return The etag cache path for the given key. - */ -- (NSString*)etagCachePathForKey:(NSString*)key; - -/** - * Determines if there is a cache entry for a URL. - */ -- (BOOL)hasDataForURL:(NSString*)URL; - -/** - * Determines if there is a cache entry for a key. - */ -- (BOOL)hasDataForKey:(NSString*)key expires:(NSTimeInterval)expirationAge; - -/** - * Determines if there is an image cache entry for a URL. - */ -- (BOOL)hasImageForURL:(NSString*)URL fromDisk:(BOOL)fromDisk; - -/** - * Gets the data for a URL from the cache if it exists. - * - * @return nil if the URL is not cached. - */ -- (NSData*)dataForURL:(NSString*)URL; - -/** - * Gets the data for a URL from the cache if it exists and is newer than a minimum timestamp. - * - * @return nil if hthe URL is not cached or if the cache entry is older than the minimum. - */ -- (NSData*)dataForURL:(NSString*)URL expires:(NSTimeInterval)expirationAge - timestamp:(NSDate**)timestamp; -- (NSData*)dataForKey:(NSString*)key expires:(NSTimeInterval)expirationAge - timestamp:(NSDate**)timestamp; - -/** - * Gets an image from the in-memory image cache. - * - * @return nil if the URL is not cached. - */ -- (id)imageForURL:(NSString*)URL; -- (id)imageForURL:(NSString*)URL fromDisk:(BOOL)fromDisk; - -/** - * Get an etag value for a given cache key. - */ -- (NSString*)etagForKey:(NSString*)key; - -/** - * Stores a data on disk. - */ -- (void)storeData:(NSData*)data forURL:(NSString*)URL; -- (void)storeData:(NSData*)data forKey:(NSString*)key; - -/** - * Stores an image in the memory cache. - */ -- (void)storeImage:(UIImage*)image forURL:(NSString*)URL; - -/** - * Stores an etag value in the etag cache. - */ -- (void)storeEtag:(NSString*)etag forKey:(NSString*)key; - -/** - * Convenient way to create a temporary URL for some data and cache it in memory. - * - * @return The temporary URL - */ -- (NSString*)storeTemporaryImage:(UIImage*)image toDisk:(BOOL)toDisk; - -/** - * Convenient way to create a temporary URL for some data and cache in on disk. - * - * @return The temporary URL - */ -- (NSString*)storeTemporaryData:(NSData*)data; - -/** - * Convenient way to create a temporary URL for a file and move it to the disk cache. - * - * @return The temporary URL - */ -- (NSString*)storeTemporaryFile:(NSURL*)fileURL; - -/** - * Moves the data currently stored under one URL to another URL. - * - * This is handy when you are caching data at a temporary URL while the permanent URL is being - * retrieved from a server. Once you know the permanent URL you can use this to move the data. - */ -- (void)moveDataForURL:(NSString*)oldURL toURL:(NSString*)newURL; - -- (void)moveDataFromPath:(NSString*)path toURL:(NSString*)newURL; - -- (NSString*)moveDataFromPathToTemporaryURL:(NSString*)path; - -/** - * Removes the data for a URL from the memory cache and optionally from the disk cache. - */ -- (void)removeURL:(NSString*)URL fromDisk:(BOOL)fromDisk; - -- (void)removeKey:(NSString*)key; - -/** - * Erases the memory cache and optionally the disk cache. - */ -- (void)removeAll:(BOOL)fromDisk; - -/** - * Invalidates the file in the disk cache so that its modified timestamp is the current - * time minus the default cache expiration age. - * - * This ensures that the next time the URL is requested from the cache it will be loaded - * from the network if the default cache expiration age is used. - */ -- (void)invalidateURL:(NSString*)URL; - -- (void)invalidateKey:(NSString*)key; - -/** - * Invalidates all files in the disk cache according to rules explained in `invalidateURL`. - */ -- (void)invalidateAll; - -- (void)logMemoryUsage; - -@end diff --git a/src/Three20Network/Headers/TTURLDataResponse.h b/src/Three20Network/Headers/TTURLDataResponse.h deleted file mode 100644 index 4cd295d950..0000000000 --- a/src/Three20Network/Headers/TTURLDataResponse.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Network -#import "Three20Network/TTURLResponse.h" - -/** - * An implementation of the TTURLResponse protocal for generic NSData objects. - */ -@interface TTURLDataResponse : NSObject { - NSData* _data; -} - -@property (nonatomic, readonly) NSData* data; - -@end - diff --git a/src/Three20Network/Headers/TTURLImageResponse.h b/src/Three20Network/Headers/TTURLImageResponse.h deleted file mode 100644 index dd52a0d7c5..0000000000 --- a/src/Three20Network/Headers/TTURLImageResponse.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Network -#import "Three20Network/TTURLResponse.h" - -/** - * An implementation of the TTURLResponse protocal for UIImage objects. - * - * This response expects either a UIImage or an NSData object. - * If it receives an NSData object, it updates the image cache. - * If the image wasn't in the cache, it stores the downloaded image in the cache. - */ -@interface TTURLImageResponse : NSObject { - UIImage* _image; -} - -@property (nonatomic, readonly) UIImage* image; - -@end diff --git a/src/Three20Network/Headers/TTURLRequest.h b/src/Three20Network/Headers/TTURLRequest.h deleted file mode 100644 index a45eb54851..0000000000 --- a/src/Three20Network/Headers/TTURLRequest.h +++ /dev/null @@ -1,264 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -// Network -#import "Three20Network/TTURLRequestCachePolicy.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" // For __TTDEPRECATED_METHOD - -@protocol TTURLRequestDelegate; -@protocol TTURLResponse; - -/** - * The Three20 network request object, built to work with the Three20 cache and co. - * - * Allows customization of the http method, body, and parameters, as well as natural response - * processing using TTURLResponse objects. - */ -@interface TTURLRequest : NSObject { - NSString* _urlPath; - - NSString* _httpMethod; - NSData* _httpBody; - NSMutableDictionary* _parameters; - NSMutableDictionary* _headers; - - NSString* _contentType; - NSStringEncoding _charsetForMultipart; - - NSMutableArray* _files; - - id _response; - - TTURLRequestCachePolicy _cachePolicy; - NSTimeInterval _cacheExpirationAge; - NSString* _cacheKey; - - NSDate* _timestamp; - - NSInteger _totalBytesLoaded; - NSInteger _totalBytesExpected; - - NSInteger _totalBytesDownloaded; - NSInteger _totalContentLength; - - id _userInfo; - - BOOL _isLoading; - BOOL _shouldHandleCookies; - BOOL _respondedFromCache; - BOOL _filterPasswordLogging; - - NSMutableArray* _delegates; -} - -/** - * The URL path to be loaded by the request. - */ -@property (nonatomic, copy) NSString* urlPath; - -/** - * The URL path to be loaded by the request. - * - * Deprecated due to name ambiguity. Use urlPath instead. - * Remove after May 6, 2010. - */ -@property (nonatomic, copy) NSString* URL __TTDEPRECATED_METHOD; - -/** - * The HTTP method to send with the request. - * - * @example @"POST" - * @example @"GET" - * @example @"PUT" - * @default nil (equivalent to @"GET") - */ -@property (nonatomic, copy) NSString* httpMethod; - -/** - * An object that handles the response data and may parse and validate it. - * - * @see TTURLDataResponse - * @see TTURLImageResponse - * @see TTURLXMLResponse - */ -@property (nonatomic, retain) id response; - -/** - * The HTTP body to send with the request. - * - * If provided, will always be used. Please consider this when using POST/PUT methods: if - * httpBody is provided, then the POST/PUT data generated from the parameters property will not - * be used. - */ -@property (nonatomic, retain) NSData* httpBody; - -/** - * The content type of the data in the request. - * - * If not provided and httpMethod is POST/PUT, then contentType is @"multipart/form-data". - */ -@property (nonatomic, copy) NSString* contentType; - -/** - * Parameters to use for an HTTP POST/PUT. - */ -@property (nonatomic, readonly) NSMutableDictionary* parameters; - -/** - * Custom HTTP headers. - */ -@property (nonatomic, readonly) NSMutableDictionary* headers; - -/** - * @default TTURLRequestCachePolicyDefault - */ -@property (nonatomic) TTURLRequestCachePolicy cachePolicy; - -/** - * The maximum age of cached data that can be used as a response. - * - * @default TT_DEFAULT_CACHE_EXPIRATION_AGE (1 week) - */ -@property (nonatomic) NSTimeInterval cacheExpirationAge; - -/** - * If no cache key is provided, a unique key is generated from the request data. If the request - * is a POST/PUT request, then the POST/PUT parameters are also used to generate the cache key. - * - * By setting the cacheKey, you may override the default cache key generator with your own. - */ -@property (nonatomic, copy) NSString* cacheKey; - -/** - * A dummy object used to uniquely identify this request object once it's been sent into the fray. - * Generally TTUserInfo objects are used here. - * - * @see TTUserInfo - */ -@property (nonatomic, retain) id userInfo; - -@property (nonatomic, retain) NSDate* timestamp; - -/** - * Whether or not the request is currently active. - */ -@property (nonatomic) BOOL isLoading; - -/** - * Decide whether default cookie handling will happen for this request. - * - * @param YES if cookies should be sent with and set for this request; - * otherwise NO. - * @discussion The default is YES - in other words, cookies are sent from and - * stored to the cookie manager by default. - * - * @default YES - */ -@property (nonatomic) BOOL shouldHandleCookies; - -/** - * The number of bytes loaded by this request. - */ -@property (nonatomic) NSInteger totalBytesLoaded; - -/** - * The number of expected bytes from this request. - */ -@property (nonatomic) NSInteger totalBytesExpected; - -/** - * The number of downloaded bytes from server. - */ -@property (nonatomic) NSInteger totalBytesDownloaded; - -/** - * The number of content length of request. - */ -@property (nonatomic) NSInteger totalContentLength; - -/** - * Whether or not the request was loaded from the cache. - * - * This is only valid after the request has completed. - */ -@property (nonatomic) BOOL respondedFromCache; - -/** - * Whether parameters named "password" should be suppressed in log messages. - */ -@property (nonatomic, assign) BOOL filterPasswordLogging; - -/** - * Charset to use when creating multipart/form-data data. - * - * @default NSUTF8StringEncoding to remain backwards compatible. - */ -@property (nonatomic) NSStringEncoding charsetForMultipart; - -/** - * An array of non-retained objects that receive messages about the progress of the request. - */ -@property (nonatomic, readonly) NSMutableArray* delegates; - - -+ (TTURLRequest*)request; - -+ (TTURLRequest*)requestWithURL:(NSString*)URL delegate:(id /**/)delegate; - -- (id)initWithURL:(NSString*)URL delegate:(id /**/)delegate; - -- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field; - -/** - * Add a file whose data will be posted. - */ -- (void)addFile:(NSData*)data mimeType:(NSString*)mimeType fileName:(NSString*)fileName; - -/** - * Attempt to send a request. - * - * If the request can be resolved by the cache, it will happen synchronously. Otherwise, - * the request will respond to its delegate asynchronously. - * - * @return YES if the request was loaded synchronously from the cache. - */ -- (BOOL)send; - -/** - * Attempt to send a synchronous request. - * - * The request will happen synchronously, regardless of whether the data is being grabbed from - * the network or from the cache. - * - * @return YES if the request was loaded from the cache. - */ -- (BOOL)sendSynchronously; - -/** - * Cancel the request. - * - * If there are multiple requests going to the same URL as this request, the others will - * not be cancelled. - */ -- (void)cancel; - -- (NSURLRequest*)createNSURLRequest; - -@end diff --git a/src/Three20Network/Headers/TTURLRequestCachePolicy.h b/src/Three20Network/Headers/TTURLRequestCachePolicy.h deleted file mode 100644 index 8e60e30792..0000000000 --- a/src/Three20Network/Headers/TTURLRequestCachePolicy.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/** - * Facts concerning cache policies: - * - * - Using NoCache will also disable Etag support. - */ -typedef enum { - TTURLRequestCachePolicyNone = 0, - TTURLRequestCachePolicyMemory = 1, - TTURLRequestCachePolicyDisk = 2, - TTURLRequestCachePolicyNetwork = 4, - TTURLRequestCachePolicyNoCache = 8, - TTURLRequestCachePolicyEtag = 16 | TTURLRequestCachePolicyDisk, - TTURLRequestCachePolicyLocal - = (TTURLRequestCachePolicyMemory | TTURLRequestCachePolicyDisk), - TTURLRequestCachePolicyDefault - = (TTURLRequestCachePolicyMemory | TTURLRequestCachePolicyDisk - | TTURLRequestCachePolicyNetwork), -} TTURLRequestCachePolicy; diff --git a/src/Three20Network/Headers/TTURLRequestDelegate.h b/src/Three20Network/Headers/TTURLRequestDelegate.h deleted file mode 100644 index de1455b4b3..0000000000 --- a/src/Three20Network/Headers/TTURLRequestDelegate.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@class TTURLRequest; - -@protocol TTURLRequestDelegate -@optional - -/** - * The request has begun loading. - * - * This method will not be called if the data is loaded immediately from the cache. - * @see requestDidFinishLoad: - */ -- (void)requestDidStartLoad:(TTURLRequest*)request; - -/** - * The request has loaded some more data. - * - * Check the totalBytesLoaded and totalBytesExpected properties for details. - */ -- (void)requestDidUploadData:(TTURLRequest*)request; - -/** - * The request has loaded data and been processed into a response. - * - * If the request is served from the cache, this is the only delegate method that will be called. - */ -- (void)requestDidFinishLoad:(TTURLRequest*)request; - -/** - * Allows delegate to handle any authentication challenges. - */ -- (void)request:(TTURLRequest*)request - didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge*)challenge; - -/** - * The request failed to load. - */ -- (void)request:(TTURLRequest*)request didFailLoadWithError:(NSError*)error; - -/** - * The request was canceled. - */ -- (void)requestDidCancelLoad:(TTURLRequest*)request; - -@end diff --git a/src/Three20Network/Headers/TTURLRequestModel.h b/src/Three20Network/Headers/TTURLRequestModel.h deleted file mode 100644 index 4d1a870b27..0000000000 --- a/src/Three20Network/Headers/TTURLRequestModel.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Network -#import "Three20Network/TTModel.h" -#import "Three20Network/TTURLRequestDelegate.h" - -/** - * An implementation of TTModel which is built to work with TTURLRequests. - * - * If you use a TTURLRequestModel as the delegate of your TTURLRequests, it will automatically - * manage many of the TTModel properties based on the state of your requests. - */ -@interface TTURLRequestModel : TTModel { - TTURLRequest* _loadingRequest; - - NSDate* _loadedTime; - NSString* _cacheKey; - - BOOL _isLoadingMore; - BOOL _hasNoMore; -} - -/** - * Valid upon completion of the URL request. Represents the timestamp of the completed request. - */ -@property (nonatomic, retain) NSDate* loadedTime; - -/** - * Valid upon completion of the URL request. Represents the request's cache key. - */ -@property (nonatomic, copy) NSString* cacheKey; - -/** - * Not used internally, but intended for book-keeping purposes when making requests. - */ -@property (nonatomic) BOOL hasNoMore; - -/** - * Resets the model to its original state before any data was loaded. - */ -- (void)reset; - -/** - * Valid while loading. Returns download progress as between 0 and 1. - */ - -- (float)downloadProgress; - -@end - diff --git a/src/Three20Network/Headers/TTURLRequestQueue.h b/src/Three20Network/Headers/TTURLRequestQueue.h deleted file mode 100644 index 01f9bee59f..0000000000 --- a/src/Three20Network/Headers/TTURLRequestQueue.h +++ /dev/null @@ -1,122 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTURLRequest; - -@interface TTURLRequestQueue : NSObject { -@private - NSMutableDictionary* _loaders; - - NSMutableArray* _loaderQueue; - NSTimer* _loaderQueueTimer; - - NSInteger _totalLoading; - - NSUInteger _maxContentLength; - NSString* _userAgent; - - CGFloat _imageCompressionQuality; - - BOOL _suspended; -} - -/** - * Gets the flag that determines if new load requests are allowed to reach the network. - * - * Because network requests tend to slow down performance, this property can be used to - * temporarily delay them. All requests made while suspended are queued, and when - * suspended becomes false again they are executed. - */ -@property (nonatomic) BOOL suspended; - -/** - * The maximum size of a download that is allowed. - * - * If a response reports a content length greater than the max, the download will be - * cancelled. This is helpful for preventing excessive memory usage. Setting this to - * zero will allow all downloads regardless of size. - * - * @default 150000 bytes - */ -@property (nonatomic) NSUInteger maxContentLength; - -/** - * The user-agent string that is sent with all HTTP requests. - * If set to 'nil', User-Agent set by NSURLRequest will be used, - * which looks like: 'APP_NAME/N.N CFNetwork/NNN Darwin/NN.N.NNN'. - * - * @default nil - */ -@property (nonatomic, copy) NSString* userAgent; - -/** - * The compression quality used for encoding images sent with HTTP posts. - * - * @default 0.75 - */ -@property (nonatomic) CGFloat imageCompressionQuality; - -/** - * Get the shared cache singleton used across the application. - */ -+ (TTURLRequestQueue*)mainQueue; - -/** - * Set the shared cache singleton used across the application. - */ -+ (void)setMainQueue:(TTURLRequestQueue*)queue; - -/** - * Load a request from the cache or the network if it is not in the cache. - * - * @return YES if the request was loaded synchronously from the cache. - */ -- (BOOL)sendRequest:(TTURLRequest*)request; - -/** - * Synchronously load a request from the cache or the network if it is not in the cache. - * - * @return YES if the request was loaded from the cache. - */ -- (BOOL)sendSynchronousRequest:(TTURLRequest*)request; - -/** - * Cancel a request that is in progress. - */ -- (void)cancelRequest:(TTURLRequest*)request; - -/** - * Cancel all active or pending requests whose delegate or response is an object. - * - * This is useful for when an object is about to be destroyed and you want to remove pointers - * to it from active requests to prevent crashes when those pointers are later referenced. - */ -- (void)cancelRequestsWithDelegate:(id)delegate; - -/** - * Cancel all active or pending requests. - */ -- (void)cancelAllRequests; - -/** - * Create a Cocoa URL request from a Three20 URL request. - */ -- (NSURLRequest*)createNSURLRequest:(TTURLRequest*)request URL:(NSURL*)URL; - -@end diff --git a/src/Three20Network/Headers/TTURLRequestQueueInternal.h b/src/Three20Network/Headers/TTURLRequestQueueInternal.h deleted file mode 100644 index f47de8600c..0000000000 --- a/src/Three20Network/Headers/TTURLRequestQueueInternal.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTURLRequestQueue.h" - -@class TTRequestLoader; - -/** - * The internal interface for the TTRequestLoaders to interact with the TTURLRequestQueue. - */ -@interface TTURLRequestQueue (TTRequestLoader) - -- (void) loader: (TTRequestLoader*)loader - didReceiveAuthenticationChallenge: (NSURLAuthenticationChallenge*)challenge; - -- (void) loader: (TTRequestLoader*)loader - didLoadResponse: (NSHTTPURLResponse*)response - data: (id)data; - -- (void) loader:(TTRequestLoader*)loader - didLoadUnmodifiedResponse:(NSHTTPURLResponse*)response; - -- (void)loader:(TTRequestLoader*)loader didFailLoadWithError:(NSError*)error; -- (void)loaderDidCancel:(TTRequestLoader*)loader wasLoading:(BOOL)wasLoading; - -@end diff --git a/src/Three20Network/Headers/TTURLResponse.h b/src/Three20Network/Headers/TTURLResponse.h deleted file mode 100644 index 33db199bc5..0000000000 --- a/src/Three20Network/Headers/TTURLResponse.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTURLRequest; - -/** - * A response protocol for TTURLRequest. This protocol is used upon the successful retrieval of - * data from a TTURLRequest. The processResponse method is used to process the data, whether it - * be an image or an XML string. - * - * @see TTURLDataResponse - * @see TTURLImageResponse - */ -@protocol TTURLResponse -@required - -/** - * Processes the data from a successful request and determines if it is valid. - * - * If the data is not valid, return an error. The data will not be cached if there is an error. - * - * @param request The request this response is bound to. - * @param response The response object, useful for getting the status code. - * @param data The data received from the TTURLRequest. - * @return NSError if there was an error parsing the data. nil otherwise. - * - * @required - */ -- (NSError*)request:(TTURLRequest*)request processResponse:(NSHTTPURLResponse*)response - data:(id)data; - -@end diff --git a/src/Three20Network/Headers/TTUserInfo.h b/src/Three20Network/Headers/TTUserInfo.h deleted file mode 100644 index dbe82a9a1f..0000000000 --- a/src/Three20Network/Headers/TTUserInfo.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -/** - * A helper class for storing user info to help identify a request. - * - * This class lets you store both a strong reference and a weak reference for the duration of - * the request. The weak reference is special because TTURLRequestQueue will examine it when - * you call cancelRequestsWithDelegate to see if the weak object is the delegate in question. - * For this reason, this object is a safe way to store an object that may be destroyed before - * the request completes if you call cancelRequestsWithDelegate in the object's destructor. - */ -@interface TTUserInfo : NSObject { - NSString* _topic; - id _strongRef; - id _weakRef; -} - -@property (nonatomic, copy) NSString* topic; -@property (nonatomic, retain) id strongRef; -@property (nonatomic, assign) id weakRef; - -+ (id)topic:(NSString*)topic strongRef:(id)strongRef weakRef:(id)weakRef; -+ (id)topic:(NSString*)topic; -+ (id)weakRef:(id)weakRef; - -- (id)initWithTopic:(NSString*)topic strongRef:(id)strongRef weakRef:(id)weakRef; - - -@end diff --git a/src/Three20Network/Headers/Three20Network.h b/src/Three20Network/Headers/Three20Network.h deleted file mode 100644 index 2f10515458..0000000000 --- a/src/Three20Network/Headers/Three20Network.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/Three20Core.h" - -// Network - -// - Global -#import "Three20Network/TTGlobalNetwork.h" -#import "Three20Network/TTURLRequestCachePolicy.h" -#import "Three20Network/TTErrorCodes.h" - -// - Models -#import "Three20Network/TTModel.h" -#import "Three20Network/TTModelDelegate.h" -#import "Three20Network/TTURLRequestModel.h" - -// - Requests -#import "Three20Network/TTURLRequest.h" -#import "Three20Network/TTURLRequestDelegate.h" - -// - Responses -#import "Three20Network/TTURLResponse.h" -#import "Three20Network/TTURLDataResponse.h" -#import "Three20Network/TTURLImageResponse.h" -// TODO (jverkoey April 27, 2010: Add back support for XML. -//#import "Three20Network/TTURLXMLResponse.h" - -// - Classes -#import "Three20Network/TTUserInfo.h" -#import "Three20Network/TTURLRequestQueue.h" -#import "Three20Network/TTURLCache.h" diff --git a/src/Three20Network/Headers/Three20Network_Prefix.pch b/src/Three20Network/Headers/Three20Network_Prefix.pch deleted file mode 100644 index 28f5d8f8f2..0000000000 --- a/src/Three20Network/Headers/Three20Network_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Three20Core' target in the 'Three20Core' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/src/Three20Network/Sources/TTErrorCodes.m b/src/Three20Network/Sources/TTErrorCodes.m deleted file mode 100644 index a9eac0a3d0..0000000000 --- a/src/Three20Network/Sources/TTErrorCodes.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTErrorCodes.h" - -NSString* const kTTNetworkErrorDomain = @"three20.network"; -NSInteger const kTTNetworkErrorCodeInvalidImage = 100; - diff --git a/src/Three20Network/Sources/TTGlobalNetwork.m b/src/Three20Network/Sources/TTGlobalNetwork.m deleted file mode 100644 index a337612d16..0000000000 --- a/src/Three20Network/Sources/TTGlobalNetwork.m +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTGlobalNetwork.h" - -// Core -#import "Three20Core/TTDebug.h" - -#import -#import - -static int gNetworkTaskCount = 0; -static pthread_mutex_t gMutex = PTHREAD_MUTEX_INITIALIZER; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -void TTNetworkRequestStarted() { - pthread_mutex_lock(&gMutex); - - if (0 == gNetworkTaskCount) { - [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; - } - gNetworkTaskCount++; - - pthread_mutex_unlock(&gMutex); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -void TTNetworkRequestStopped() { - pthread_mutex_lock(&gMutex); - - --gNetworkTaskCount; - // If this asserts, you don't have enough stop requests to match your start requests. - TTDASSERT(gNetworkTaskCount >= 0); - gNetworkTaskCount = MAX(0, gNetworkTaskCount); - - if (gNetworkTaskCount == 0) { - [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; - } - - pthread_mutex_unlock(&gMutex); -} diff --git a/src/Three20Network/Sources/TTModel.m b/src/Three20Network/Sources/TTModel.m deleted file mode 100644 index b411a2d74e..0000000000 --- a/src/Three20Network/Sources/TTModel.m +++ /dev/null @@ -1,169 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTModel.h" - -// Core -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/NSArrayAdditions.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTModel - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_delegates); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModel - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableArray*)delegates { - if (nil == _delegates) { - _delegates = TTCreateNonRetainingArray(); - } - return _delegates; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoaded { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoading { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoadingMore { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isOutdated { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidate:(BOOL)erase { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didStartLoad { - [_delegates perform:@selector(modelDidStartLoad:) withObject:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didFinishLoad { - [_delegates perform:@selector(modelDidFinishLoad:) withObject:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didFailLoadWithError:(NSError*)error { - [_delegates perform:@selector(model:didFailLoadWithError:) withObject:self - withObject:error]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didCancelLoad { - [_delegates perform:@selector(modelDidCancelLoad:) withObject:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)beginUpdates { - [_delegates perform:@selector(modelDidBeginUpdates:) withObject:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endUpdates { - [_delegates perform:@selector(modelDidEndUpdates:) withObject:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didUpdateObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - [_delegates perform: @selector(model:didUpdateObject:atIndexPath:) - withObject: self - withObject: object - withObject: indexPath]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didInsertObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - [_delegates perform: @selector(model:didInsertObject:atIndexPath:) - withObject: self - withObject: object - withObject: indexPath]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didDeleteObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - [_delegates perform: @selector(model:didDeleteObject:atIndexPath:) - withObject: self - withObject: object - withObject: indexPath]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didChange { - [_delegates perform:@selector(modelDidChange:) withObject:self]; -} - - -@end diff --git a/src/Three20Network/Sources/TTRequestLoader.m b/src/Three20Network/Sources/TTRequestLoader.m deleted file mode 100644 index b750598ea9..0000000000 --- a/src/Three20Network/Sources/TTRequestLoader.m +++ /dev/null @@ -1,408 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/private/TTRequestLoader.h" - -// Network -#import "Three20Network/TTGlobalNetwork.h" -#import "Three20Network/TTURLRequest.h" -#import "Three20Network/TTURLRequestDelegate.h" -#import "Three20Network/TTURLRequestQueue.h" -#import "Three20Network/TTURLResponse.h" - -// Network (private) -#import "Three20Network/private/TTURLRequestQueueInternal.h" - -// Core -#import "Three20Core/NSObjectAdditions.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" - -static const NSInteger kLoadMaxRetries = 2; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTRequestLoader - -@synthesize urlPath = _urlPath; -@synthesize requests = _requests; -@synthesize cacheKey = _cacheKey; -@synthesize cachePolicy = _cachePolicy; -@synthesize cacheExpirationAge = _cacheExpirationAge; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initForRequest:(TTURLRequest*)request queue:(TTURLRequestQueue*)queue { - if (self = [super init]) { - _urlPath = [request.urlPath copy]; - _queue = queue; - _cacheKey = [request.cacheKey retain]; - _cachePolicy = request.cachePolicy; - _cacheExpirationAge = request.cacheExpirationAge; - _requests = [[NSMutableArray alloc] init]; - _retriesLeft = kLoadMaxRetries; - - [self addRequest:request]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [_connection cancel]; - TT_RELEASE_SAFELY(_connection); - TT_RELEASE_SAFELY(_response); - TT_RELEASE_SAFELY(_responseData); - TT_RELEASE_SAFELY(_urlPath); - TT_RELEASE_SAFELY(_cacheKey); - TT_RELEASE_SAFELY(_requests); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)connectToURL:(NSURL*)URL { - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"Connecting to %@", _urlPath); - TTNetworkRequestStarted(); - - TTURLRequest* request = _requests.count == 1 ? [_requests objectAtIndex:0] : nil; - NSURLRequest* URLRequest = [_queue createNSURLRequest:request URL:URL]; - - _connection = [[NSURLConnection alloc] initWithRequest:URLRequest delegate:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dispatchLoadedBytes:(NSInteger)bytesLoaded expected:(NSInteger)bytesExpected { - for (TTURLRequest* request in [[_requests copy] autorelease]) { - request.totalBytesLoaded = bytesLoaded; - request.totalBytesExpected = bytesExpected; - - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(requestDidUploadData:)]) { - [delegate requestDidUploadData:request]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRequest:(TTURLRequest*)request { - // TODO (jverkoey April 27, 2010): Look into the repercussions of adding a request with - // different properties. - //TTDASSERT([_urlPath isEqualToString:request.urlPath]); - //TTDASSERT(_cacheKey == request.cacheKey); - //TTDASSERT(_cachePolicy == request.cachePolicy); - //TTDASSERT(_cacheExpirationAge == request.cacheExpirationAge); - - [_requests addObject:request]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeRequest:(TTURLRequest*)request { - [_requests removeObject:request]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)load:(NSURL*)URL { - if (nil == _connection) { - [self connectToURL:URL]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadSynchronously:(NSURL*)URL { - // This method simulates an asynchronous network connection. If your delegate isn't being called - // correctly, this would be the place to start tracing for errors. - TTNetworkRequestStarted(); - - TTURLRequest* request = _requests.count == 1 ? [_requests objectAtIndex:0] : nil; - NSURLRequest* URLRequest = [_queue createNSURLRequest:request URL:URL]; - - NSHTTPURLResponse* response = nil; - NSError* error = nil; - NSData* data = [NSURLConnection - sendSynchronousRequest: URLRequest - returningResponse: &response - error: &error]; - - if (nil != error) { - TTNetworkRequestStopped(); - - TT_RELEASE_SAFELY(_responseData); - TT_RELEASE_SAFELY(_connection); - - [_queue loader:self didFailLoadWithError:error]; - - } else { - [self connection:nil didReceiveResponse:(NSHTTPURLResponse*)response]; - [self connection:nil didReceiveData:data]; - - [self connectionDidFinishLoading:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)cancel:(TTURLRequest*)request { - NSUInteger requestIndex = [_requests indexOfObject:request]; - if (requestIndex != NSNotFound) { - request.isLoading = NO; - - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(requestDidCancelLoad:)]) { - [delegate requestDidCancelLoad:request]; - } - } - - [_requests removeObjectAtIndex:requestIndex]; - } - - if (![_requests count]) { - [_queue loaderDidCancel:self wasLoading:!!_connection]; - if (nil != _connection) { - TTNetworkRequestStopped(); - [_connection cancel]; - TT_RELEASE_SAFELY(_connection); - } - return NO; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSError*)processResponse:(NSHTTPURLResponse*)response data:(id)data { - for (TTURLRequest* request in _requests) { - NSError* error = [request.response request:request processResponse:response data:data]; - if (error) { - return error; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dispatchError:(NSError*)error { - for (TTURLRequest* request in [[_requests copy] autorelease]) { - request.isLoading = NO; - - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(request:didFailLoadWithError:)]) { - [delegate request:request didFailLoadWithError:error]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dispatchLoaded:(NSDate*)timestamp { - for (TTURLRequest* request in [[_requests copy] autorelease]) { - request.timestamp = timestamp; - request.isLoading = NO; - - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(requestDidFinishLoad:)]) { - [delegate requestDidFinishLoad:request]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dispatchAuthenticationChallenge:(NSURLAuthenticationChallenge*)challenge { - for (TTURLRequest* request in [[_requests copy] autorelease]) { - - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(request:didReceiveAuthenticationChallenge:)]) { - [delegate request:request didReceiveAuthenticationChallenge:challenge]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { - NSArray* requestsToCancel = [_requests copy]; - for (id request in requestsToCancel) { - [self cancel:request]; - } - [requestsToCancel release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSURLConnectionDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSHTTPURLResponse*)response { - _response = [response retain]; - NSDictionary* headers = [response allHeaderFields]; - int contentLength = [[headers objectForKey:@"Content-Length"] intValue]; - - // If you hit this assertion it's because a massive file is about to be downloaded. - // If you're sure you want to do this, add the following line to your app delegate startup - // method. Setting the max content length to zero allows anything to go through. If you just - // want to raise the limit, set it to any positive byte size. - // [[TTURLRequestQueue mainQueue] setMaxContentLength:0] - TTDASSERT(0 == _queue.maxContentLength || contentLength <=_queue.maxContentLength); - - if (contentLength > _queue.maxContentLength && _queue.maxContentLength) { - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"MAX CONTENT LENGTH EXCEEDED (%d) %@", - contentLength, _urlPath); - [self cancel]; - } - - _responseData = [[NSMutableData alloc] initWithCapacity:contentLength]; - - for (TTURLRequest* request in [[_requests copy] autorelease]) { - request.totalContentLength = contentLength; - } - -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)connection:(NSURLConnection*)connection didReceiveData:(NSData*)data { - [_responseData appendData:data]; - for (TTURLRequest* request in [[_requests copy] autorelease]) { - request.totalBytesDownloaded += [data length]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSCachedURLResponse *)connection: (NSURLConnection *)connection - willCacheResponse: (NSCachedURLResponse *)cachedResponse { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) connection: (NSURLConnection *)connection - didSendBodyData: (NSInteger)bytesWritten - totalBytesWritten: (NSInteger)totalBytesWritten - totalBytesExpectedToWrite: (NSInteger)totalBytesExpectedToWrite { - [self dispatchLoadedBytes:totalBytesWritten expected:totalBytesExpectedToWrite]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)connectionDidFinishLoading:(NSURLConnection *)connection { - TTNetworkRequestStopped(); - - TTDCONDITIONLOG(TTDFLAG_ETAGS, @"Response status code: %d", _response.statusCode); - - // We need to accept valid HTTP status codes, not only 200. - if (_response.statusCode >= 200 && _response.statusCode < 300) { - [_queue loader:self didLoadResponse:_response data:_responseData]; - - } else if (_response.statusCode == 304) { - [_queue loader:self didLoadUnmodifiedResponse:_response]; - - } else { - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @" FAILED LOADING (%d) %@", - _response.statusCode, _urlPath); - NSError* error = [NSError errorWithDomain:NSURLErrorDomain code:_response.statusCode - userInfo:nil]; - [_queue loader:self didFailLoadWithError:error]; - } - - TT_RELEASE_SAFELY(_responseData); - TT_RELEASE_SAFELY(_connection); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)connection:(NSURLConnection *)connection -didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge{ - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @" RECEIVED AUTH CHALLENGE LOADING %@ ", _urlPath); - [_queue loader:self didReceiveAuthenticationChallenge:challenge]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @" FAILED LOADING %@ FOR %@", _urlPath, error); - - TTNetworkRequestStopped(); - - TT_RELEASE_SAFELY(_responseData); - TT_RELEASE_SAFELY(_connection); - - if ([error.domain isEqualToString:NSURLErrorDomain] && error.code == NSURLErrorCannotFindHost - && _retriesLeft) { - // If there is a network error then we will wait and retry a few times in case - // it was just a temporary blip in connectivity. - --_retriesLeft; - [self load:[NSURL URLWithString:_urlPath]]; - - } else { - [_queue loader:self didFailLoadWithError:error]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Accessors - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoading { - return !!_connection; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Deprecated - */ -- (NSString*)URL { - return _urlPath; -} - - -@end diff --git a/src/Three20Network/Sources/TTURLCache.m b/src/Three20Network/Sources/TTURLCache.m deleted file mode 100644 index 0c8cba5025..0000000000 --- a/src/Three20Network/Sources/TTURLCache.m +++ /dev/null @@ -1,707 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTURLCache.h" - -// Network -#import "Three20Network/TTGlobalNetwork.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCorePaths.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" -#import "Three20Core/NSStringAdditions.h" - -static const CGFloat kLargeImageSize = 600 * 400; - -static NSString* kDefaultCacheName = @"Three20"; -static NSString* kEtagCacheDirectoryName = @"etag"; - -static TTURLCache* gSharedCache = nil; -static NSMutableDictionary* gNamedCaches = nil; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTURLCache() - -/** - * Creates paths as necessary and returns the cache path for the given name. - */ -+ (NSString*)cachePathWithName:(NSString*)name; - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLCache - -@synthesize disableDiskCache = _disableDiskCache; -@synthesize disableImageCache = _disableImageCache; -@synthesize cachePath = _cachePath; -@synthesize maxPixelCount = _maxPixelCount; -@synthesize invalidationAge = _invalidationAge; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithName:(NSString*)name { - if (self == [super init]) { - _name = [name copy]; - _cachePath = [[TTURLCache cachePathWithName:name] retain]; - _invalidationAge = TT_DEFAULT_CACHE_INVALIDATION_AGE; - - // XXXjoe Disabling the built-in cache may save memory but it also makes UIWebView slow - // NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:0 diskCapacity:0 - // diskPath:nil]; - // [NSURLCache setSharedURLCache:sharedCache]; - // [sharedCache release]; - - [[NSNotificationCenter defaultCenter] - addObserver: self - selector: @selector(didReceiveMemoryWarning:) - name: UIApplicationDidReceiveMemoryWarningNotification - object: nil]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithName:kDefaultCacheName]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[NSNotificationCenter defaultCenter] - removeObserver: self - name: UIApplicationDidReceiveMemoryWarningNotification - object: nil]; - - TT_RELEASE_SAFELY(_name); - TT_RELEASE_SAFELY(_imageCache); - TT_RELEASE_SAFELY(_imageSortedList); - TT_RELEASE_SAFELY(_cachePath); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTURLCache*)cacheWithName:(NSString*)name { - if (nil == gNamedCaches) { - gNamedCaches = [[NSMutableDictionary alloc] init]; - } - TTURLCache* cache = [gNamedCaches objectForKey:name]; - if (nil == cache) { - cache = [[[TTURLCache alloc] initWithName:name] autorelease]; - [gNamedCaches setObject:cache forKey:name]; - } - return cache; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTURLCache*)sharedCache { - if (nil == gSharedCache) { - gSharedCache = [[TTURLCache alloc] init]; - } - return gSharedCache; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)setSharedCache:(TTURLCache*)cache { - if (gSharedCache != cache) { - [gSharedCache release]; - gSharedCache = [cache retain]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (BOOL)createPathIfNecessary:(NSString*)path { - BOOL succeeded = YES; - - NSFileManager* fm = [NSFileManager defaultManager]; - if (![fm fileExistsAtPath:path]) { - succeeded = [fm createDirectoryAtPath: path - withIntermediateDirectories: YES - attributes: nil - error: nil]; - } - - return succeeded; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (NSString*)cachePathWithName:(NSString*)name { - NSArray* paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); - NSString* cachesPath = [paths objectAtIndex:0]; - NSString* cachePath = [cachesPath stringByAppendingPathComponent:name]; - NSString* etagCachePath = [cachePath stringByAppendingPathComponent:kEtagCacheDirectoryName]; - - [self createPathIfNecessary:cachesPath]; - [self createPathIfNecessary:cachePath]; - [self createPathIfNecessary:etagCachePath]; - - return cachePath; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)expireImagesFromMemory { - while (_imageSortedList.count) { - NSString* key = [_imageSortedList objectAtIndex:0]; - UIImage* image = [_imageCache objectForKey:key]; - TTDCONDITIONLOG(TTDFLAG_URLCACHE, @"EXPIRING %@", key); - - _totalPixelCount -= image.size.width * image.size.height; - [_imageCache removeObjectForKey:key]; - [_imageSortedList removeObjectAtIndex:0]; - - if (_totalPixelCount <= _maxPixelCount) { - break; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)storeImage:(UIImage*)image forURL:(NSString*)URL force:(BOOL)force { - if (nil != image && (force || !_disableImageCache)) { - int pixelCount = image.size.width * image.size.height; - - if (force || pixelCount < kLargeImageSize) { - UIImage* existingImage = [_imageCache objectForKey:URL]; - if (nil != existingImage) { - _totalPixelCount -= existingImage.size.width * existingImage.size.height; - [_imageSortedList removeObject:URL]; - } - _totalPixelCount += pixelCount; - - if (_totalPixelCount > _maxPixelCount && _maxPixelCount) { - [self expireImagesFromMemory]; - } - - if (nil == _imageCache) { - _imageCache = [[NSMutableDictionary alloc] init]; - } - - if (nil == _imageSortedList) { - _imageSortedList = [[NSMutableArray alloc] init]; - } - - [_imageSortedList addObject:URL]; - [_imageCache setObject:image forKey:URL]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * TODO (jverkoey May 3, 2010): Clean up this redundant code. - */ -- (BOOL)imageExistsFromBundle:(NSString*)URL { - NSString* path = TTPathForBundleResource([URL substringFromIndex:9]); - NSFileManager* fm = [NSFileManager defaultManager]; - return [fm fileExistsAtPath:path]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)imageExistsFromDocuments:(NSString*)URL { - NSString* path = TTPathForDocumentsResource([URL substringFromIndex:12]); - NSFileManager* fm = [NSFileManager defaultManager]; - return [fm fileExistsAtPath:path]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)loadImageFromBundle:(NSString*)URL { - NSString* path = TTPathForBundleResource([URL substringFromIndex:9]); - return [UIImage imageWithContentsOfFile:path]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)loadImageFromDocuments:(NSString*)URL { - NSString* path = TTPathForDocumentsResource([URL substringFromIndex:12]); - NSData* data = [NSData dataWithContentsOfFile:path]; - return [UIImage imageWithData:data]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)loadEtagFromCacheWithKey:(NSString*)key { - NSString* path = [self etagCachePathForKey:key]; - NSData* data = [NSData dataWithContentsOfFile:path]; - return [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)createTemporaryURL { - static int temporaryURLIncrement = 0; - return [NSString stringWithFormat:@"temp:%d", temporaryURLIncrement++]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)createUniqueTemporaryURL { - NSFileManager* fm = [NSFileManager defaultManager]; - NSString* tempURL = nil; - NSString* newPath = nil; - do { - tempURL = [self createTemporaryURL]; - newPath = [self cachePathForURL:tempURL]; - } while ([fm fileExistsAtPath:newPath]); - return tempURL; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSNotifications - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didReceiveMemoryWarning:(void*)object { - // Empty the memory cache when memory is low - [self removeAll:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)etagCachePath { - return [self.cachePath stringByAppendingPathComponent:kEtagCacheDirectoryName]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString *)keyForURL:(NSString*)URL { - return [URL md5Hash]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)cachePathForURL:(NSString*)URL { - NSString* key = [self keyForURL:URL]; - return [self cachePathForKey:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)cachePathForKey:(NSString*)key { - return [_cachePath stringByAppendingPathComponent:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)etagCachePathForKey:(NSString*)key { - return [self.etagCachePath stringByAppendingPathComponent:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasDataForURL:(NSString*)URL { - NSString* filePath = [self cachePathForURL:URL]; - NSFileManager* fm = [NSFileManager defaultManager]; - return [fm fileExistsAtPath:filePath]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData*)dataForURL:(NSString*)URL { - return [self dataForURL:URL expires:TT_CACHE_EXPIRATION_AGE_NEVER timestamp:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData*)dataForURL:(NSString*)URL expires:(NSTimeInterval)expirationAge - timestamp:(NSDate**)timestamp { - NSString* key = [self keyForURL:URL]; - return [self dataForKey:key expires:expirationAge timestamp:timestamp]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasDataForKey:(NSString*)key expires:(NSTimeInterval)expirationAge { - NSString* filePath = [self cachePathForKey:key]; - NSFileManager* fm = [NSFileManager defaultManager]; - if ([fm fileExistsAtPath:filePath]) { - NSDictionary* attrs = [fm attributesOfItemAtPath:filePath error:nil]; - NSDate* modified = [attrs objectForKey:NSFileModificationDate]; - if ([modified timeIntervalSinceNow] < -expirationAge) { - return NO; - } - - return YES; - } - - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData*)dataForKey:(NSString*)key expires:(NSTimeInterval)expirationAge - timestamp:(NSDate**)timestamp { - NSString* filePath = [self cachePathForKey:key]; - NSFileManager* fm = [NSFileManager defaultManager]; - if ([fm fileExistsAtPath:filePath]) { - NSDictionary* attrs = [fm attributesOfItemAtPath:filePath error:nil]; - NSDate* modified = [attrs objectForKey:NSFileModificationDate]; - if ([modified timeIntervalSinceNow] < -expirationAge) { - return nil; - } - if (timestamp) { - *timestamp = modified; - } - - return [NSData dataWithContentsOfFile:filePath]; - } - - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * This method needs to handle urlPaths with and without extensions. - * So @"path.png" will resolve to @"path@2x.png" and - * @"path" will resolve to @"path@2x" - * - * Paths beginning with @"." will not be changed. - */ -+ (NSString*)doubleImageURLPath:(NSString*)urlPath { - if ([[urlPath substringToIndex:1] isEqualToString:@"."]) { - return urlPath; - } - - // We'd ideally use stringByAppendingPathExtension: in this method, but it seems - // to wreck bundle:// urls by replacing them with bundle:/ prefixes. Strange. - NSString* pathExtension = [urlPath pathExtension]; - - NSString* urlPathWithNoExtension = [urlPath substringToIndex: - [urlPath length] - [pathExtension length] - - (([pathExtension length] > 0) ? 1 : 0)]; - - urlPath = [urlPathWithNoExtension stringByAppendingString:@"@2x"]; - - if ([pathExtension length] > 0) { - urlPath = [urlPath stringByAppendingFormat:@".%@", pathExtension]; - } - - return urlPath; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasImageForURL:(NSString*)URL fromDisk:(BOOL)fromDisk { - BOOL hasImage = (nil != [_imageCache objectForKey:URL]); - - if (!hasImage && fromDisk) { - if (TTIsBundleURL(URL)) { - hasImage = [self imageExistsFromBundle:URL]; - if (!hasImage) { - hasImage = [self imageExistsFromBundle:[TTURLCache doubleImageURLPath:URL]]; - } - - } else if (TTIsDocumentsURL(URL)) { - hasImage = [self imageExistsFromDocuments:URL]; - if (!hasImage) { - hasImage = [self imageExistsFromDocuments:[TTURLCache doubleImageURLPath:URL]]; - } - - } - } - - return hasImage; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)imageForURL:(NSString*)URL { - return [self imageForURL:URL fromDisk:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)imageForURL:(NSString*)URL fromDisk:(BOOL)fromDisk { - UIImage* image = [_imageCache objectForKey:URL]; - - if (nil == image && fromDisk) { - if (TTIsBundleURL(URL)) { - image = [self loadImageFromBundle:URL]; - [self storeImage:image forURL:URL]; - - } else if (TTIsDocumentsURL(URL)) { - image = [self loadImageFromDocuments:URL]; - [self storeImage:image forURL:URL]; - } - } - - return image; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)etagForKey:(NSString*)key { - return [self loadEtagFromCacheWithKey:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)storeData:(NSData*)data forURL:(NSString*)URL { - NSString* key = [self keyForURL:URL]; - [self storeData:data forKey:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)storeData:(NSData*)data forKey:(NSString*)key { - if (!_disableDiskCache) { - NSString* filePath = [self cachePathForKey:key]; - NSFileManager* fm = [NSFileManager defaultManager]; - [fm createFileAtPath:filePath contents:data attributes:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)storeImage:(UIImage*)image forURL:(NSString*)URL { - [self storeImage:image forURL:URL force:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)storeEtag:(NSString*)etag forKey:(NSString*)key { - NSString* filePath = [self etagCachePathForKey:key]; - NSFileManager* fm = [NSFileManager defaultManager]; - [fm createFileAtPath: filePath - contents: [etag dataUsingEncoding:NSUTF8StringEncoding] - attributes: nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)storeTemporaryData:(NSData*)data { - NSString* URL = [self createUniqueTemporaryURL]; - [self storeData:data forURL:URL]; - return URL; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)storeTemporaryFile:(NSURL*)fileURL { - if ([fileURL isFileURL]) { - NSString* filePath = [fileURL path]; - NSFileManager* fm = [NSFileManager defaultManager]; - if ([fm fileExistsAtPath:filePath]) { - NSString* tempURL = nil; - NSString* newPath = nil; - do { - tempURL = [self createTemporaryURL]; - newPath = [self cachePathForURL:tempURL]; - } while ([fm fileExistsAtPath:newPath]); - - if ([fm moveItemAtPath:filePath toPath:newPath error:nil]) { - return tempURL; - } - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)storeTemporaryImage:(UIImage*)image toDisk:(BOOL)toDisk { - NSString* URL = [self createUniqueTemporaryURL]; - [self storeImage:image forURL:URL force:YES]; - - NSData* data = UIImagePNGRepresentation(image); - [self storeData:data forURL:URL]; - return URL; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)moveDataForURL:(NSString*)oldURL toURL:(NSString*)newURL { - id image = [self imageForURL:oldURL]; - if (image) { - [_imageSortedList removeObject:oldURL]; - [_imageCache removeObjectForKey:oldURL]; - [_imageSortedList addObject:newURL]; - [_imageCache setObject:image forKey:newURL]; - } - NSString* oldKey = [self keyForURL:oldURL]; - NSString* oldPath = [self cachePathForKey:oldKey]; - NSFileManager* fm = [NSFileManager defaultManager]; - if ([fm fileExistsAtPath:oldPath]) { - NSString* newKey = [self keyForURL:newURL]; - NSString* newPath = [self cachePathForKey:newKey]; - [fm moveItemAtPath:oldPath toPath:newPath error:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)moveDataFromPath:(NSString*)path toURL:(NSString*)newURL { - NSString* newKey = [self keyForURL:newURL]; - NSFileManager* fm = [NSFileManager defaultManager]; - if ([fm fileExistsAtPath:path]) { - NSString* newPath = [self cachePathForKey:newKey]; - [fm moveItemAtPath:path toPath:newPath error:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)moveDataFromPathToTemporaryURL:(NSString*)path { - NSString* tempURL = [self createUniqueTemporaryURL]; - [self moveDataFromPath:path toURL:tempURL]; - return tempURL; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeURL:(NSString*)URL fromDisk:(BOOL)fromDisk { - [_imageSortedList removeObject:URL]; - [_imageCache removeObjectForKey:URL]; - - if (fromDisk) { - NSString* key = [self keyForURL:URL]; - NSString* filePath = [self cachePathForKey:key]; - NSFileManager* fm = [NSFileManager defaultManager]; - if (filePath && [fm fileExistsAtPath:filePath]) { - [fm removeItemAtPath:filePath error:nil]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeKey:(NSString*)key { - NSString* filePath = [self cachePathForKey:key]; - NSFileManager* fm = [NSFileManager defaultManager]; - if (filePath && [fm fileExistsAtPath:filePath]) { - [fm removeItemAtPath:filePath error:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeAll:(BOOL)fromDisk { - [_imageCache removeAllObjects]; - [_imageSortedList removeAllObjects]; - _totalPixelCount = 0; - - if (fromDisk) { - NSFileManager* fm = [NSFileManager defaultManager]; - [fm removeItemAtPath:_cachePath error:nil]; - [TTURLCache createPathIfNecessary:_cachePath]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidateURL:(NSString*)URL { - NSString* key = [self keyForURL:URL]; - return [self invalidateKey:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidateKey:(NSString*)key { - NSString* filePath = [self cachePathForKey:key]; - NSFileManager* fm = [NSFileManager defaultManager]; - if (filePath && [fm fileExistsAtPath:filePath]) { - NSDate* invalidDate = [NSDate dateWithTimeIntervalSinceNow:-_invalidationAge]; - NSDictionary* attrs = [NSDictionary dictionaryWithObject:invalidDate - forKey:NSFileModificationDate]; - -#if __IPHONE_4_0 <= __IPHONE_OS_VERSION_MAX_ALLOWED - [fm setAttributes:attrs ofItemAtPath:filePath error:nil]; -#else - [fm changeFileAttributes:attrs atPath:filePath]; -#endif - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidateAll { - NSDate* invalidDate = [NSDate dateWithTimeIntervalSinceNow:-_invalidationAge]; - NSDictionary* attrs = [NSDictionary dictionaryWithObject:invalidDate - forKey:NSFileModificationDate]; - - NSFileManager* fm = [NSFileManager defaultManager]; - NSDirectoryEnumerator* e = [fm enumeratorAtPath:_cachePath]; - for (NSString* fileName; fileName = [e nextObject]; ) { - NSString* filePath = [_cachePath stringByAppendingPathComponent:fileName]; -#if __IPHONE_4_0 <= __IPHONE_OS_VERSION_MAX_ALLOWED - [fm setAttributes:attrs ofItemAtPath:filePath error:nil]; -#else - [fm changeFileAttributes:attrs atPath:filePath]; -#endif - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)logMemoryUsage { -#if TTLOGLEVEL_INFO <= TTMAXLOGLEVEL - TTDCONDITIONLOG(TTDFLAG_URLCACHE, @"======= IMAGE CACHE: %d images, %d pixels ========", - _imageCache.count, _totalPixelCount); - NSEnumerator* e = [_imageCache keyEnumerator]; - for (NSString* key ; key = [e nextObject]; ) { - UIImage* image = [_imageCache objectForKey:key]; - TTDCONDITIONLOG(TTDFLAG_URLCACHE, @" %f x %f %@", image.size.width, image.size.height, key); - } -#endif -} - - -@end diff --git a/src/Three20Network/Sources/TTURLDataResponse.m b/src/Three20Network/Sources/TTURLDataResponse.m deleted file mode 100644 index 50422d1219..0000000000 --- a/src/Three20Network/Sources/TTURLDataResponse.m +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTURLDataResponse.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLDataResponse - -@synthesize data = _data; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_data); - - [super dealloc]; -} - - -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark TTURLResponse - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSError*)request:(TTURLRequest*)request processResponse:(NSHTTPURLResponse*)response - data:(id)data { - // This response is designed for NSData objects, so if we get anything else it's probably a - // mistake. - TTDASSERT([data isKindOfClass:[NSData class]]); - TTDASSERT(nil == _data); - - if ([data isKindOfClass:[NSData class]]) { - _data = [data retain]; - } - - return nil; -} - - -@end diff --git a/src/Three20Network/Sources/TTURLImageResponse.m b/src/Three20Network/Sources/TTURLImageResponse.m deleted file mode 100644 index 43e5f8e5f5..0000000000 --- a/src/Three20Network/Sources/TTURLImageResponse.m +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTURLImageResponse.h" - -// Network -#import "Three20Network/TTErrorCodes.h" -#import "Three20Network/TTURLRequest.h" -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLImageResponse - -@synthesize image = _image; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_image); - - [super dealloc]; -} - - -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark TTURLResponse - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSError*)request:(TTURLRequest*)request processResponse:(NSHTTPURLResponse*)response - data:(id)data { - // This response is designed for NSData and UIImage objects, so if we get anything else it's - // probably a mistake. - TTDASSERT([data isKindOfClass:[UIImage class]] - || [data isKindOfClass:[NSData class]]); - TTDASSERT(nil == _image); - - if ([data isKindOfClass:[UIImage class]]) { - _image = [data retain]; - - } else if ([data isKindOfClass:[NSData class]]) { - // TODO(jverkoey Feb 10, 2010): This logic doesn't entirely make sense. Why don't we just store - // the data in the cache if there was a cache miss, and then just retain the image data we - // downloaded? This needs to be tested in production. - UIImage* image = [[TTURLCache sharedCache] imageForURL:request.urlPath fromDisk:NO]; - - if (nil == image) { - image = [UIImage imageWithData:data]; - } - - if (nil != image) { - if (!request.respondedFromCache) { -// XXXjoe Working on option to scale down really large images to a smaller size to save memory -// if (image.size.width * image.size.height > (300*300)) { -// image = [image transformWidth:300 height:(image.size.height/image.size.width)*300.0 -// rotate:NO]; -// NSData* data = UIImagePNGRepresentation(image); -// [[TTURLCache sharedCache] storeData:data forURL:request.URL]; -// } - [[TTURLCache sharedCache] storeImage:image forURL:request.urlPath]; - } - - _image = [image retain]; - - } else { - return [NSError errorWithDomain:kTTNetworkErrorDomain - code:kTTNetworkErrorCodeInvalidImage - userInfo:nil]; - } - } - - return nil; -} - - -@end - diff --git a/src/Three20Network/Sources/TTURLRequest.m b/src/Three20Network/Sources/TTURLRequest.m deleted file mode 100644 index 7061d1b5f7..0000000000 --- a/src/Three20Network/Sources/TTURLRequest.m +++ /dev/null @@ -1,375 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTURLRequest.h" - -// Network -#import "Three20Network/TTGlobalNetwork.h" -#import "Three20Network/TTURLResponse.h" -#import "Three20Network/TTURLRequestQueue.h" - -// Core -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" -#import "Three20Core/NSStringAdditions.h" - -static NSString* kStringBoundary = @"3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLRequest - -@synthesize urlPath = _urlPath; -@synthesize httpMethod = _httpMethod; -@synthesize httpBody = _httpBody; -@synthesize parameters = _parameters; -@synthesize headers = _headers; - -@synthesize contentType = _contentType; -@synthesize charsetForMultipart = _charsetForMultipart; - -@synthesize response = _response; - -@synthesize cachePolicy = _cachePolicy; -@synthesize cacheExpirationAge = _cacheExpirationAge; -@synthesize cacheKey = _cacheKey; - -@synthesize timestamp = _timestamp; - -@synthesize totalBytesLoaded = _totalBytesLoaded; -@synthesize totalBytesExpected = _totalBytesExpected; - -@synthesize totalBytesDownloaded = _totalBytesDownloaded; -@synthesize totalContentLength = _totalContentLength; - -@synthesize userInfo = _userInfo; -@synthesize isLoading = _isLoading; - -@synthesize shouldHandleCookies = _shouldHandleCookies; -@synthesize respondedFromCache = _respondedFromCache; -@synthesize filterPasswordLogging = _filterPasswordLogging; - -@synthesize delegates = _delegates; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTURLRequest*)request { - return [[[self alloc] init] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTURLRequest*)requestWithURL:(NSString*)URL delegate:(id /**/)delegate { - return [[[self alloc] initWithURL:URL delegate:delegate] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithURL:(NSString*)URL delegate:(id /**/)delegate { - if (self = [self init]) { - _urlPath = [URL retain]; - if (nil != delegate) { - [_delegates addObject:delegate]; - } - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - _delegates = TTCreateNonRetainingArray(); - _cachePolicy = TTURLRequestCachePolicyDefault; - _cacheExpirationAge = TT_DEFAULT_CACHE_EXPIRATION_AGE; - _shouldHandleCookies = YES; - _charsetForMultipart = NSUTF8StringEncoding; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_urlPath); - TT_RELEASE_SAFELY(_httpMethod); - TT_RELEASE_SAFELY(_response); - TT_RELEASE_SAFELY(_httpBody); - TT_RELEASE_SAFELY(_contentType); - TT_RELEASE_SAFELY(_parameters); - TT_RELEASE_SAFELY(_headers); - TT_RELEASE_SAFELY(_cacheKey); - TT_RELEASE_SAFELY(_userInfo); - TT_RELEASE_SAFELY(_timestamp); - TT_RELEASE_SAFELY(_files); - TT_RELEASE_SAFELY(_delegates); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"<%@ %@>", [super description], _urlPath]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)generateCacheKey { - if ([_httpMethod isEqualToString:@"POST"] - || [_httpMethod isEqualToString:@"PUT"]) { - NSMutableString* joined = [[[NSMutableString alloc] initWithString:self.urlPath] autorelease]; - NSEnumerator* e = [_parameters keyEnumerator]; - for (id key; key = [e nextObject]; ) { - [joined appendString:key]; - [joined appendString:@"="]; - NSObject* value = [_parameters valueForKey:key]; - if ([value isKindOfClass:[NSString class]]) { - [joined appendString:(NSString*)value]; - } - } - - return [joined md5Hash]; - - } else { - return [self.urlPath md5Hash]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)appendImageData:(NSData*)data - withName:(NSString*)name - toBody:(NSMutableData*)body { - NSString *beginLine = [NSString stringWithFormat:@"\r\n--%@\r\n", kStringBoundary]; - - [body appendData:[beginLine dataUsingEncoding:NSUTF8StringEncoding]]; - [body appendData:[[NSString stringWithFormat: - @"Content-Disposition: form-data; name=\"%@\"; filename=\"image.jpg\"\r\n", - name] - dataUsingEncoding:_charsetForMultipart]]; - [body appendData:[[NSString - stringWithFormat:@"Content-Length: %d\r\n", data.length] - dataUsingEncoding:_charsetForMultipart]]; - [body appendData:[[NSString - stringWithString:@"Content-Type: image/jpeg\r\n\r\n"] - dataUsingEncoding:_charsetForMultipart]]; - [body appendData:data]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData*)generatePostBody { - NSMutableData* body = [NSMutableData data]; - NSString* beginLine = [NSString stringWithFormat:@"\r\n--%@\r\n", kStringBoundary]; - - [body appendData:[[NSString stringWithFormat:@"--%@\r\n", kStringBoundary] - dataUsingEncoding:NSUTF8StringEncoding]]; - - for (id key in [_parameters keyEnumerator]) { - NSString* value = [_parameters valueForKey:key]; - // Really, this can only be an NSString. We're cheating here. - if (![value isKindOfClass:[UIImage class]] && - ![value isKindOfClass:[NSData class]]) { - [body appendData:[beginLine dataUsingEncoding:NSUTF8StringEncoding]]; - [body appendData:[[NSString - stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"\r\n\r\n", key] - dataUsingEncoding:_charsetForMultipart]]; - [body appendData:[value dataUsingEncoding:_charsetForMultipart]]; - } - } - - NSString* imageKey = nil; - for (id key in [_parameters keyEnumerator]) { - if ([[_parameters objectForKey:key] isKindOfClass:[UIImage class]]) { - UIImage* image = [_parameters objectForKey:key]; - CGFloat quality = [TTURLRequestQueue mainQueue].imageCompressionQuality; - NSData* data = UIImageJPEGRepresentation(image, quality); - - [self appendImageData:data withName:key toBody:body]; - imageKey = key; - - } else if ([[_parameters objectForKey:key] isKindOfClass:[NSData class]]) { - NSData* data = [_parameters objectForKey:key]; - [self appendImageData:data withName:key toBody:body]; - imageKey = key; - } - } - - for (NSInteger i = 0; i < _files.count; i += 3) { - NSData* data = [_files objectAtIndex:i]; - NSString* mimeType = [_files objectAtIndex:i+1]; - NSString* fileName = [_files objectAtIndex:i+2]; - - [body appendData:[beginLine dataUsingEncoding:NSUTF8StringEncoding]]; - [body appendData:[[NSString stringWithFormat: - @"Content-Disposition: form-data; name=\"%@\"; filename=\"%@\"\r\n", - fileName, fileName] - dataUsingEncoding:_charsetForMultipart]]; - [body appendData:[[NSString stringWithFormat:@"Content-Length: %d\r\n", data.length] - dataUsingEncoding:_charsetForMultipart]]; - [body appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n\r\n", mimeType] - dataUsingEncoding:_charsetForMultipart]]; - [body appendData:data]; - } - - [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", kStringBoundary] - dataUsingEncoding:NSUTF8StringEncoding]]; - - // If an image was found, remove it from the dictionary to save memory while we - // perform the upload - if (imageKey) { - [_parameters removeObjectForKey:imageKey]; - } - - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"Sending %s", [body bytes]); - return body; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableDictionary*)parameters { - if (!_parameters) { - _parameters = [[NSMutableDictionary alloc] init]; - } - return _parameters; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData*)httpBody { - if (_httpBody) { - return _httpBody; - - } else if ([[_httpMethod uppercaseString] isEqualToString:@"POST"] - || [[_httpMethod uppercaseString] isEqualToString:@"PUT"]) { - return [self generatePostBody]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)contentType { - if (_contentType) { - return _contentType; - - } else if ([_httpMethod isEqualToString:@"POST"] - || [_httpMethod isEqualToString:@"PUT"]) { - return [NSString stringWithFormat:@"multipart/form-data; boundary=%@", kStringBoundary]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)cacheKey { - if (!_cacheKey) { - _cacheKey = [[self generateCacheKey] retain]; - } - return _cacheKey; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setValue:(NSString*)value forHTTPHeaderField:(NSString*)field { - if (!_headers) { - _headers = [[NSMutableDictionary alloc] init]; - } - [_headers setObject:value forKey:field]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addFile:(NSData*)data mimeType:(NSString*)mimeType fileName:(NSString*)fileName { - if (!_files) { - _files = [[NSMutableArray alloc] init]; - } - - [_files addObject:data]; - [_files addObject:mimeType]; - [_files addObject:fileName]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)send { - if (_parameters) { - // Don't log passwords. Save now, restore after logging - NSString* password = [_parameters objectForKey:@"password"]; - if (_filterPasswordLogging && password) { - [_parameters setObject:@"[FILTERED]" forKey:@"password"]; - } - - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"SEND %@ %@", self.urlPath, self.parameters); - - if (password) { - [_parameters setObject:password forKey:@"password"]; - } - } - return [[TTURLRequestQueue mainQueue] sendRequest:self]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)sendSynchronously { - return [[TTURLRequestQueue mainQueue] sendSynchronousRequest:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { - [[TTURLRequestQueue mainQueue] cancelRequest:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSURLRequest*)createNSURLRequest { - return [[TTURLRequestQueue mainQueue] createNSURLRequest:self URL:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Deprecated - */ -- (void)setURL:(NSString*)urlPath { - NSString* aUrlPath = [urlPath copy]; - [_urlPath release]; - _urlPath = aUrlPath; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Deprecated - */ -- (NSString*)URL { - return _urlPath; -} - -@end diff --git a/src/Three20Network/Sources/TTURLRequestModel.m b/src/Three20Network/Sources/TTURLRequestModel.m deleted file mode 100644 index 432f266a1b..0000000000 --- a/src/Three20Network/Sources/TTURLRequestModel.m +++ /dev/null @@ -1,172 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTURLRequestModel.h" - -// Network -#import "Three20Network/TTURLRequest.h" -#import "Three20Network/TTURLRequestQueue.h" -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLRequestModel - -@synthesize loadedTime = _loadedTime; -@synthesize cacheKey = _cacheKey; -@synthesize hasNoMore = _hasNoMore; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[TTURLRequestQueue mainQueue] cancelRequestsWithDelegate:self]; - [_loadingRequest cancel]; - - TT_RELEASE_SAFELY(_loadingRequest); - TT_RELEASE_SAFELY(_loadedTime); - TT_RELEASE_SAFELY(_cacheKey); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reset { - TT_RELEASE_SAFELY(_cacheKey); - TT_RELEASE_SAFELY(_loadedTime); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModel - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoaded { - return !!_loadedTime; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoading { - return !!_loadingRequest; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoadingMore { - return _isLoadingMore; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isOutdated { - if (nil == _cacheKey) { - return nil != _loadedTime; - - } else { - NSDate* loadedTime = self.loadedTime; - - if (nil != loadedTime) { - return -[loadedTime timeIntervalSinceNow] > [TTURLCache sharedCache].invalidationAge; - - } else { - return NO; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { - [_loadingRequest cancel]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidate:(BOOL)erase { - if (nil != _cacheKey) { - if (erase) { - [[TTURLCache sharedCache] removeKey:_cacheKey]; - - } else { - [[TTURLCache sharedCache] invalidateKey:_cacheKey]; - } - - TT_RELEASE_SAFELY(_cacheKey); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLRequestDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidStartLoad:(TTURLRequest*)request { - [_loadingRequest release]; - _loadingRequest = [request retain]; - [self didStartLoad]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidFinishLoad:(TTURLRequest*)request { - if (!self.isLoadingMore) { - [_loadedTime release]; - _loadedTime = [request.timestamp retain]; - self.cacheKey = request.cacheKey; - } - - TT_RELEASE_SAFELY(_loadingRequest); - [self didFinishLoad]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)request:(TTURLRequest*)request didFailLoadWithError:(NSError*)error { - TT_RELEASE_SAFELY(_loadingRequest); - [self didFailLoadWithError:error]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidCancelLoad:(TTURLRequest*)request { - TT_RELEASE_SAFELY(_loadingRequest); - [self didCancelLoad]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (float)downloadProgress { - if ([self isLoading]) { - if (!_loadingRequest.totalContentLength) { - return 0; - } - return (float)_loadingRequest.totalBytesDownloaded / (float)_loadingRequest.totalContentLength; - } - return 0.0f; -} - -@end diff --git a/src/Three20Network/Sources/TTURLRequestQueue.m b/src/Three20Network/Sources/TTURLRequestQueue.m deleted file mode 100644 index 1b09a2e667..0000000000 --- a/src/Three20Network/Sources/TTURLRequestQueue.m +++ /dev/null @@ -1,694 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTURLRequestQueue.h" - -// Network -#import "Three20Network/TTGlobalNetwork.h" -#import "Three20Network/TTURLRequest.h" -#import "Three20Network/TTURLRequestDelegate.h" -#import "Three20Network/TTUserInfo.h" -#import "Three20Network/TTURLResponse.h" -#import "Three20Network/TTURLCache.h" - -// Network (Private) -#import "Three20Network/private/TTRequestLoader.h" - -// Core -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTGlobalCorePaths.h" -#import "Three20Core/TTDebugFlags.h" -#import "Three20Core/TTDebug.h" - -static const NSTimeInterval kFlushDelay = 0.3; -static const NSTimeInterval kTimeout = 300.0; -static const NSInteger kMaxConcurrentLoads = 5; -static NSUInteger kDefaultMaxContentLength = 150000; - -static TTURLRequestQueue* gMainQueue = nil; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLRequestQueue - -@synthesize maxContentLength = _maxContentLength; -@synthesize userAgent = _userAgent; -@synthesize suspended = _suspended; -@synthesize imageCompressionQuality = _imageCompressionQuality; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTURLRequestQueue*)mainQueue { - if (!gMainQueue) { - gMainQueue = [[TTURLRequestQueue alloc] init]; - } - return gMainQueue; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)setMainQueue:(TTURLRequestQueue*)queue { - if (gMainQueue != queue) { - [gMainQueue release]; - gMainQueue = [queue retain]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self == [super init]) { - _loaders = [[NSMutableDictionary alloc] init]; - _loaderQueue = [[NSMutableArray alloc] init]; - _maxContentLength = kDefaultMaxContentLength; - _imageCompressionQuality = 0.75; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [_loaderQueueTimer invalidate]; - TT_RELEASE_SAFELY(_loaders); - TT_RELEASE_SAFELY(_loaderQueue); - TT_RELEASE_SAFELY(_userAgent); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * TODO (jverkoey May 3, 2010): Clean up this redundant code. - */ -- (BOOL)dataExistsInBundle:(NSString*)URL { - NSString* path = TTPathForBundleResource([URL substringFromIndex:9]); - NSFileManager* fm = [NSFileManager defaultManager]; - return [fm fileExistsAtPath:path]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)dataExistsInDocuments:(NSString*)URL { - NSString* path = TTPathForDocumentsResource([URL substringFromIndex:12]); - NSFileManager* fm = [NSFileManager defaultManager]; - return [fm fileExistsAtPath:path]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData*)loadFromBundle:(NSString*)URL error:(NSError**)error { - NSString* path = TTPathForBundleResource([URL substringFromIndex:9]); - NSFileManager* fm = [NSFileManager defaultManager]; - if ([fm fileExistsAtPath:path]) { - return [NSData dataWithContentsOfFile:path]; - - } else if (error) { - *error = [NSError errorWithDomain:NSCocoaErrorDomain - code:NSFileReadNoSuchFileError userInfo:nil]; - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData*)loadFromDocuments:(NSString*)URL error:(NSError**)error { - NSString* path = TTPathForDocumentsResource([URL substringFromIndex:12]); - NSFileManager* fm = [NSFileManager defaultManager]; - if ([fm fileExistsAtPath:path]) { - return [NSData dataWithContentsOfFile:path]; - - } else if (error) { - *error = [NSError errorWithDomain:NSCocoaErrorDomain - code:NSFileReadNoSuchFileError userInfo:nil]; - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadFromCache: (NSString*)URL - cacheKey: (NSString*)cacheKey - expires: (NSTimeInterval)expirationAge - fromDisk: (BOOL)fromDisk - data: (id*)data - error: (NSError**)error - timestamp: (NSDate**)timestamp { - TTDASSERT(nil != data); - - if (nil == data) { - return NO; - } - - UIImage* image = [[TTURLCache sharedCache] imageForURL:URL fromDisk:fromDisk]; - - if (nil != image) { - *data = image; - return YES; - - } else if (fromDisk) { - if (TTIsBundleURL(URL)) { - *data = [self loadFromBundle:URL error:error]; - return YES; - - } else if (TTIsDocumentsURL(URL)) { - *data = [self loadFromDocuments:URL error:error]; - return YES; - - } else { - *data = [[TTURLCache sharedCache] dataForKey:cacheKey expires:expirationAge - timestamp:timestamp]; - if (*data) { - return YES; - } - } - } - - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)cacheDataExists: (NSString*)URL - cacheKey: (NSString*)cacheKey - expires: (NSTimeInterval)expirationAge - fromDisk: (BOOL)fromDisk { - BOOL hasData = [[TTURLCache sharedCache] hasImageForURL:URL fromDisk:fromDisk]; - - if (!hasData && fromDisk) { - if (TTIsBundleURL(URL)) { - hasData = [self dataExistsInBundle:URL]; - - } else if (TTIsDocumentsURL(URL)) { - hasData = [self dataExistsInDocuments:URL]; - - } else { - hasData = [[TTURLCache sharedCache] hasDataForKey:cacheKey expires:expirationAge]; - } - } - - return hasData; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadRequestFromCache:(TTURLRequest*)request { - if (!request.cacheKey) { - request.cacheKey = [[TTURLCache sharedCache] keyForURL:request.urlPath]; - } - - if (IS_MASK_SET(request.cachePolicy, TTURLRequestCachePolicyEtag)) { - // Etags always make the request. The request headers will then include the etag. - // - If there is new data, server returns 200 with data. - // - Otherwise, returns a 304, with empty request body. - return NO; - - } else if (request.cachePolicy & (TTURLRequestCachePolicyDisk|TTURLRequestCachePolicyMemory)) { - id data = nil; - NSDate* timestamp = nil; - NSError* error = nil; - - if ([self loadFromCache:request.urlPath cacheKey:request.cacheKey - expires:request.cacheExpirationAge - fromDisk:!_suspended && (request.cachePolicy & TTURLRequestCachePolicyDisk) - data:&data error:&error timestamp:×tamp]) { - request.isLoading = NO; - - if (!error) { - error = [request.response request:request processResponse:nil data:data]; - } - - if (error) { - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(request:didFailLoadWithError:)]) { - [delegate request:request didFailLoadWithError:error]; - } - } - - } else { - request.timestamp = timestamp ? timestamp : [NSDate date]; - request.respondedFromCache = YES; - - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(requestDidFinishLoad:)]) { - [delegate requestDidFinishLoad:request]; - } - } - } - - return YES; - } - } - - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)executeLoader:(TTRequestLoader*)loader { - id data = nil; - NSDate* timestamp = nil; - NSError* error = nil; - - if ((loader.cachePolicy & (TTURLRequestCachePolicyDisk|TTURLRequestCachePolicyMemory)) - && [self loadFromCache:loader.urlPath cacheKey:loader.cacheKey - expires:loader.cacheExpirationAge - fromDisk:loader.cachePolicy & TTURLRequestCachePolicyDisk - data:&data error:&error timestamp:×tamp]) { - [_loaders removeObjectForKey:loader.cacheKey]; - - if (!error) { - error = [loader processResponse:nil data:data]; - } - if (error) { - [loader dispatchError:error]; - - } else { - [loader dispatchLoaded:timestamp]; - } - - } else { - ++_totalLoading; - [loader load:[NSURL URLWithString:loader.urlPath]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadNextInQueueDelayed { - if (!_loaderQueueTimer) { - _loaderQueueTimer = [NSTimer scheduledTimerWithTimeInterval:kFlushDelay target:self - selector:@selector(loadNextInQueue) userInfo:nil repeats:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadNextInQueue { - _loaderQueueTimer = nil; - - for (int i = 0; - i < kMaxConcurrentLoads && _totalLoading < kMaxConcurrentLoads - && _loaderQueue.count; - ++i) { - TTRequestLoader* loader = [[_loaderQueue objectAtIndex:0] retain]; - [_loaderQueue removeObjectAtIndex:0]; - [self executeLoader:loader]; - [loader release]; - } - - if (_loaderQueue.count && !_suspended) { - [self loadNextInQueueDelayed]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeLoader:(TTRequestLoader*)loader { - --_totalLoading; - [_loaders removeObjectForKey:loader.cacheKey]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSuspended:(BOOL)isSuspended { - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"SUSPEND LOADING %d", isSuspended); - _suspended = isSuspended; - - if (!_suspended) { - [self loadNextInQueue]; - - } else if (_loaderQueueTimer) { - [_loaderQueueTimer invalidate]; - _loaderQueueTimer = nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)sendRequest:(TTURLRequest*)request { - if ([self loadRequestFromCache:request]) { - return YES; - } - - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(requestDidStartLoad:)]) { - [delegate requestDidStartLoad:request]; - } - } - - // If the url is empty, fail. - if (!request.urlPath.length) { - NSError* error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorBadURL userInfo:nil]; - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(request:didFailLoadWithError:)]) { - [delegate request:request didFailLoadWithError:error]; - } - } - return NO; - } - - request.isLoading = YES; - - TTRequestLoader* loader = nil; - - // If we're not POSTing or PUTting data, let's see if we can jump on an existing request. - if (![request.httpMethod isEqualToString:@"POST"] - && ![request.httpMethod isEqualToString:@"PUT"]) { - // Next, see if there is an active loader for the URL and if so join that bandwagon. - loader = [_loaders objectForKey:request.cacheKey]; - if (loader) { - [loader addRequest:request]; - return NO; - } - } - - // Finally, create a new loader and hit the network (unless we are suspended) - loader = [[TTRequestLoader alloc] initForRequest:request queue:self]; - [_loaders setObject:loader forKey:request.cacheKey]; - if (_suspended || _totalLoading == kMaxConcurrentLoads) { - [_loaderQueue addObject:loader]; - - } else { - ++_totalLoading; - [loader load:[NSURL URLWithString:request.urlPath]]; - } - [loader release]; - - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)sendSynchronousRequest:(TTURLRequest*)request { - if ([self loadRequestFromCache:request]) { - return YES; - } - - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(requestDidStartLoad:)]) { - [delegate requestDidStartLoad:request]; - } - } - - if (!request.urlPath.length) { - NSError* error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorBadURL userInfo:nil]; - for (id delegate in request.delegates) { - if ([delegate respondsToSelector:@selector(request:didFailLoadWithError:)]) { - [delegate request:request didFailLoadWithError:error]; - } - } - return NO; - } - - request.isLoading = YES; - - // Finally, create a new loader and hit the network (unless we are suspended) - TTRequestLoader* loader = [[TTRequestLoader alloc] initForRequest:request queue:self]; - - // Should be decremented eventually by loadSynchronously - ++_totalLoading; - - [loader loadSynchronously:[NSURL URLWithString:request.urlPath]]; - TT_RELEASE_SAFELY(loader); - - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancelRequest:(TTURLRequest*)request { - if (request) { - TTRequestLoader* loader = [_loaders objectForKey:request.cacheKey]; - if (loader) { - [loader retain]; - if (![loader cancel:request]) { - [_loaderQueue removeObject:loader]; - } - [loader release]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancelRequestsWithDelegate:(id)delegate { - NSMutableArray* requestsToCancel = nil; - - for (TTRequestLoader* loader in [_loaders objectEnumerator]) { - for (TTURLRequest* request in loader.requests) { - for (id requestDelegate in request.delegates) { - if (delegate == requestDelegate) { - if (!requestsToCancel) { - requestsToCancel = [NSMutableArray array]; - } - [requestsToCancel addObject:request]; - break; - } - } - - if ([request.userInfo isKindOfClass:[TTUserInfo class]]) { - TTUserInfo* userInfo = request.userInfo; - if (userInfo.weakRef && userInfo.weakRef == delegate) { - if (!requestsToCancel) { - requestsToCancel = [NSMutableArray array]; - } - [requestsToCancel addObject:request]; - } - } - } - } - - for (TTURLRequest* request in requestsToCancel) { - [self cancelRequest:request]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancelAllRequests { - for (TTRequestLoader* loader in [[[_loaders copy] autorelease] objectEnumerator]) { - [loader cancel]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSURLRequest*)createNSURLRequest:(TTURLRequest*)request URL:(NSURL*)URL { - if (!URL) { - URL = [NSURL URLWithString:request.urlPath]; - } - - NSMutableURLRequest* URLRequest = [NSMutableURLRequest requestWithURL:URL - cachePolicy:NSURLRequestReloadIgnoringLocalCacheData - timeoutInterval:kTimeout]; - - if (self.userAgent) { - [URLRequest setValue:self.userAgent forHTTPHeaderField:@"User-Agent"]; - } - - if (request) { - [URLRequest setHTTPShouldHandleCookies:request.shouldHandleCookies]; - - NSString* method = request.httpMethod; - if (method) { - [URLRequest setHTTPMethod:method]; - } - - NSString* contentType = request.contentType; - if (contentType) { - [URLRequest setValue:contentType forHTTPHeaderField:@"Content-Type"]; - } - - NSData* body = request.httpBody; - if (body) { - [URLRequest setHTTPBody:body]; - } - - NSDictionary* headers = request.headers; - for (NSString *key in [headers keyEnumerator]) { - [URLRequest setValue:[headers objectForKey:key] forHTTPHeaderField:key]; - } - - if (![[TTURLCache sharedCache] disableDiskCache] - && IS_MASK_SET(request.cachePolicy, TTURLRequestCachePolicyEtag)) { - NSString* etag = [[TTURLCache sharedCache] etagForKey:request.cacheKey]; - TTDCONDITIONLOG(TTDFLAG_ETAGS, @"Etag: %@", etag); - - if (TTIsStringWithAnyText(etag) - && [self cacheDataExists: request.urlPath - cacheKey: request.cacheKey - expires: request.cacheExpirationAge - fromDisk: !_suspended - && (request.cachePolicy & TTURLRequestCachePolicyDisk)]) { - // By setting the etag here, we let the server know what the last "version" of the file - // was that we saw. If the file has changed since this etag, we'll get data back in our - // response. Otherwise we'll get a 304. - [URLRequest setValue:etag forHTTPHeaderField:@"If-None-Match"]; - } - } - } - - return URLRequest; -} - - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLRequestQueue (TTRequestLoader) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) loader: (TTRequestLoader*)loader - didLoadResponse: (NSHTTPURLResponse*)response - data: (id)data { - [loader retain]; - [self removeLoader:loader]; - - NSError* error = [loader processResponse:response data:data]; - if (error) { - [loader dispatchError:error]; - - } else { - if (!(loader.cachePolicy & TTURLRequestCachePolicyNoCache)) { - - // Store the etag key if the etag cache policy has been requested. - if (![[TTURLCache sharedCache] disableDiskCache] - && IS_MASK_SET(loader.cachePolicy, TTURLRequestCachePolicyEtag)) { - NSDictionary* headers = [response allHeaderFields]; - - // First, try to use the casing as defined by the standard for ETag headers. - // http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html - NSString* etag = [headers objectForKey:@"ETag"]; - if (nil == etag) { - // Some servers don't use the standard casing (e.g. twitter). - etag = [headers objectForKey:@"Etag"]; - } - - // Still no etag? - if (nil == etag) { - TTDWARNING(@"Etag expected, but none found."); - TTDWARNING(@"Here are the headers: %@", headers); - - } else { - // At last, we have our etag. Let's cache it. - - // First, let's pull out the etag key. This is necessary due to some servers who append - // information to the etag, such as -gzip for a gzipped request. However, the etag - // standard states that etags are defined as a quoted string, and that is all. - NSRange firstQuote = [etag rangeOfString:@"\""]; - NSRange secondQuote = [etag rangeOfString: @"\"" - options: 0 - range: NSMakeRange(firstQuote.location + 1, - etag.length - - (firstQuote.location + 1))]; - if (0 == firstQuote.length || 0 == secondQuote.length || - firstQuote.location == secondQuote.location) { - TTDWARNING(@"Invalid etag format. Unable to find a quoted key."); - - } else { - NSRange keyRange; - keyRange.location = firstQuote.location; - keyRange.length = (secondQuote.location - firstQuote.location) + 1; - NSString* etagKey = [etag substringWithRange:keyRange]; - TTDCONDITIONLOG(TTDFLAG_ETAGS, @"Response etag: %@", etagKey); - [[TTURLCache sharedCache] storeEtag:etagKey forKey:loader.cacheKey]; - } - } - } - - [[TTURLCache sharedCache] storeData:data forKey:loader.cacheKey]; - } - [loader dispatchLoaded:[NSDate date]]; - } - [loader release]; - - [self loadNextInQueue]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) loader:(TTRequestLoader*)loader - didLoadUnmodifiedResponse:(NSHTTPURLResponse*)response { - [loader retain]; - [self removeLoader:loader]; - - NSData* data = nil; - NSError* error = nil; - NSDate* timestamp = nil; - if ([self loadFromCache:loader.urlPath cacheKey:loader.cacheKey - expires:TT_CACHE_EXPIRATION_AGE_NEVER - fromDisk:!_suspended && (loader.cachePolicy & TTURLRequestCachePolicyDisk) - data:&data error:&error timestamp:×tamp]) { - - if (nil == error) { - error = [loader processResponse:response data:data]; - } - - if (nil == error) { - for (TTURLRequest* request in loader.requests) { - request.respondedFromCache = YES; - } - [loader dispatchLoaded:[NSDate date]]; - } - } - - if (nil != error) { - [loader dispatchError:error]; - } - - [loader release]; - - [self loadNextInQueue]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) loader: (TTRequestLoader*)loader - didReceiveAuthenticationChallenge: (NSURLAuthenticationChallenge*) challenge { - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"CHALLENGE: %@", challenge); - [loader dispatchAuthenticationChallenge:challenge]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loader:(TTRequestLoader*)loader didFailLoadWithError:(NSError*)error { - TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"ERROR: %@", error); - [self removeLoader:loader]; - [loader dispatchError:error]; - [self loadNextInQueue]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loaderDidCancel:(TTRequestLoader*)loader wasLoading:(BOOL)wasLoading { - if (wasLoading) { - [self removeLoader:loader]; - [self loadNextInQueue]; - - } else { - [_loaders removeObjectForKey:loader.cacheKey]; - } -} - - -@end diff --git a/src/Three20Network/Sources/TTUserInfo.m b/src/Three20Network/Sources/TTUserInfo.m deleted file mode 100644 index 2e1882cc38..0000000000 --- a/src/Three20Network/Sources/TTUserInfo.m +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTUserInfo.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTUserInfo - -@synthesize topic = _topic; -@synthesize strongRef = _strongRef; -@synthesize weakRef = _weakRef; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)topic:(NSString*)topic strongRef:(id)strongRef weakRef:(id)weakRef { - return [[[TTUserInfo alloc] initWithTopic:topic strongRef:strongRef weakRef:weakRef] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)topic:(NSString*)topic { - return [[[TTUserInfo alloc] initWithTopic:topic strongRef:nil weakRef:nil] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)weakRef:(id)weakRef { - return [[[TTUserInfo alloc] initWithTopic:nil strongRef:nil weakRef:weakRef] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTopic:(NSString*)topic strongRef:(id)strongRef weakRef:(id)weakRef { - if (self = [super init]) { - self.topic = topic; - self.strongRef = strongRef; - self.weakRef = weakRef; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_topic); - TT_RELEASE_SAFELY(_strongRef); - [super dealloc]; -} - - -@end diff --git a/src/Three20Network/Three20Network.xcodeproj/project.pbxproj b/src/Three20Network/Three20Network.xcodeproj/project.pbxproj deleted file mode 100755 index e2666a012d..0000000000 --- a/src/Three20Network/Three20Network.xcodeproj/project.pbxproj +++ /dev/null @@ -1,745 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 664B29BF12848AA50008D569 /* TTErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 664B29BC12848AA50008D569 /* TTErrorCodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 664B29C312848AAD0008D569 /* TTErrorCodes.m in Sources */ = {isa = PBXBuildFile; fileRef = 664B29C012848AAD0008D569 /* TTErrorCodes.m */; }; - 66F955B0126662E300BEF6F0 /* NetworkURLCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 66F955AF126662E300BEF6F0 /* NetworkURLCacheTests.m */; }; - 66F955BA1266647A00BEF6F0 /* both.png in Resources */ = {isa = PBXBuildFile; fileRef = 66F955B71266647A00BEF6F0 /* both.png */; }; - 66F955BB1266647A00BEF6F0 /* both@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 66F955B81266647A00BEF6F0 /* both@2x.png */; }; - 66F955BC1266647A00BEF6F0 /* only@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 66F955B91266647A00BEF6F0 /* only@2x.png */; }; - 6EE735F8118499D300A35176 /* Three20Network.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE735F7118499D300A35176 /* Three20Network.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE735FA118499FB00A35176 /* TTGlobalNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE735F9118499FB00A35176 /* TTGlobalNetwork.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE735FC11849A0C00A35176 /* TTGlobalNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE735FB11849A0C00A35176 /* TTGlobalNetwork.m */; }; - 6EE735FF11849A1600A35176 /* TTUserInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE735FE11849A1600A35176 /* TTUserInfo.m */; }; - 6EE7360211849A1F00A35176 /* TTUserInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360111849A1F00A35176 /* TTUserInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361411849A3500A35176 /* TTModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360811849A3500A35176 /* TTModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361511849A3500A35176 /* TTModelDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360911849A3500A35176 /* TTModelDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361611849A3500A35176 /* TTRequestLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360A11849A3500A35176 /* TTRequestLoader.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6EE7361711849A3500A35176 /* TTURLCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360B11849A3500A35176 /* TTURLCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361811849A3500A35176 /* TTURLDataResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360C11849A3500A35176 /* TTURLDataResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361911849A3500A35176 /* TTURLImageResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360D11849A3500A35176 /* TTURLImageResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361A11849A3500A35176 /* TTURLRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360E11849A3500A35176 /* TTURLRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361B11849A3500A35176 /* TTURLRequestCachePolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7360F11849A3500A35176 /* TTURLRequestCachePolicy.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361C11849A3500A35176 /* TTURLRequestDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7361011849A3500A35176 /* TTURLRequestDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361D11849A3500A35176 /* TTURLRequestModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7361111849A3500A35176 /* TTURLRequestModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361E11849A3500A35176 /* TTURLRequestQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7361211849A3500A35176 /* TTURLRequestQueue.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7361F11849A3500A35176 /* TTURLResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7361311849A3500A35176 /* TTURLResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7362811849A4000A35176 /* TTModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7362011849A4000A35176 /* TTModel.m */; }; - 6EE7362911849A4000A35176 /* TTRequestLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7362111849A4000A35176 /* TTRequestLoader.m */; }; - 6EE7362A11849A4000A35176 /* TTURLCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7362211849A4000A35176 /* TTURLCache.m */; }; - 6EE7362B11849A4000A35176 /* TTURLDataResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7362311849A4000A35176 /* TTURLDataResponse.m */; }; - 6EE7362C11849A4000A35176 /* TTURLImageResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7362411849A4000A35176 /* TTURLImageResponse.m */; }; - 6EE7362D11849A4000A35176 /* TTURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7362511849A4000A35176 /* TTURLRequest.m */; }; - 6EE7362E11849A4000A35176 /* TTURLRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7362611849A4000A35176 /* TTURLRequestModel.m */; }; - 6EE7362F11849A4000A35176 /* TTURLRequestQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7362711849A4000A35176 /* TTURLRequestQueue.m */; }; - 6EE7363A11849A9800A35176 /* MockModelDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7363911849A9800A35176 /* MockModelDelegate.m */; }; - 6EE7363C11849AA100A35176 /* NetworkModelTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7363B11849AA100A35176 /* NetworkModelTests.m */; }; - 6EE7364911849B1D00A35176 /* Three20Network_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7364811849B1D00A35176 /* Three20Network_Prefix.pch */; }; - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE7366C11849C5800A35176 /* libThree20Core.a */; }; - 6EE739CD1184BAF600A35176 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libThree20Network.a */; }; - 6EF96405118EFCF0003902E7 /* TTURLRequestQueueInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EF96404118EFCF0003902E7 /* TTURLRequestQueueInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE7367011849C6300A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE736C611849FA000A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 664B29BC12848AA50008D569 /* TTErrorCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTErrorCodes.h; path = Headers/TTErrorCodes.h; sourceTree = ""; }; - 664B29C012848AAD0008D569 /* TTErrorCodes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTErrorCodes.m; path = Sources/TTErrorCodes.m; sourceTree = ""; }; - 66F955AF126662E300BEF6F0 /* NetworkURLCacheTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkURLCacheTests.m; path = UnitTests/NetworkURLCacheTests.m; sourceTree = ""; }; - 66F955B71266647A00BEF6F0 /* both.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = both.png; path = UnitTests/Resources/both.png; sourceTree = ""; }; - 66F955B81266647A00BEF6F0 /* both@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "both@2x.png"; path = "UnitTests/Resources/both@2x.png"; sourceTree = ""; }; - 66F955B91266647A00BEF6F0 /* only@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "only@2x.png"; path = "UnitTests/Resources/only@2x.png"; sourceTree = ""; }; - 6E64541F1184BDF900F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6EE735F7118499D300A35176 /* Three20Network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20Network.h; path = Headers/Three20Network.h; sourceTree = ""; }; - 6EE735F9118499FB00A35176 /* TTGlobalNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGlobalNetwork.h; path = Headers/TTGlobalNetwork.h; sourceTree = ""; }; - 6EE735FB11849A0C00A35176 /* TTGlobalNetwork.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGlobalNetwork.m; path = Sources/TTGlobalNetwork.m; sourceTree = ""; }; - 6EE735FE11849A1600A35176 /* TTUserInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTUserInfo.m; path = Sources/TTUserInfo.m; sourceTree = ""; }; - 6EE7360111849A1F00A35176 /* TTUserInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTUserInfo.h; path = Headers/TTUserInfo.h; sourceTree = ""; }; - 6EE7360811849A3500A35176 /* TTModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTModel.h; path = Headers/TTModel.h; sourceTree = ""; }; - 6EE7360911849A3500A35176 /* TTModelDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTModelDelegate.h; path = Headers/TTModelDelegate.h; sourceTree = ""; }; - 6EE7360A11849A3500A35176 /* TTRequestLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTRequestLoader.h; path = Headers/TTRequestLoader.h; sourceTree = ""; }; - 6EE7360B11849A3500A35176 /* TTURLCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLCache.h; path = Headers/TTURLCache.h; sourceTree = ""; }; - 6EE7360C11849A3500A35176 /* TTURLDataResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLDataResponse.h; path = Headers/TTURLDataResponse.h; sourceTree = ""; }; - 6EE7360D11849A3500A35176 /* TTURLImageResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLImageResponse.h; path = Headers/TTURLImageResponse.h; sourceTree = ""; }; - 6EE7360E11849A3500A35176 /* TTURLRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLRequest.h; path = Headers/TTURLRequest.h; sourceTree = ""; }; - 6EE7360F11849A3500A35176 /* TTURLRequestCachePolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLRequestCachePolicy.h; path = Headers/TTURLRequestCachePolicy.h; sourceTree = ""; }; - 6EE7361011849A3500A35176 /* TTURLRequestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLRequestDelegate.h; path = Headers/TTURLRequestDelegate.h; sourceTree = ""; }; - 6EE7361111849A3500A35176 /* TTURLRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLRequestModel.h; path = Headers/TTURLRequestModel.h; sourceTree = ""; }; - 6EE7361211849A3500A35176 /* TTURLRequestQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLRequestQueue.h; path = Headers/TTURLRequestQueue.h; sourceTree = ""; }; - 6EE7361311849A3500A35176 /* TTURLResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLResponse.h; path = Headers/TTURLResponse.h; sourceTree = ""; }; - 6EE7362011849A4000A35176 /* TTModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTModel.m; path = Sources/TTModel.m; sourceTree = ""; }; - 6EE7362111849A4000A35176 /* TTRequestLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTRequestLoader.m; path = Sources/TTRequestLoader.m; sourceTree = ""; }; - 6EE7362211849A4000A35176 /* TTURLCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLCache.m; path = Sources/TTURLCache.m; sourceTree = ""; }; - 6EE7362311849A4000A35176 /* TTURLDataResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLDataResponse.m; path = Sources/TTURLDataResponse.m; sourceTree = ""; }; - 6EE7362411849A4000A35176 /* TTURLImageResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLImageResponse.m; path = Sources/TTURLImageResponse.m; sourceTree = ""; }; - 6EE7362511849A4000A35176 /* TTURLRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLRequest.m; path = Sources/TTURLRequest.m; sourceTree = ""; }; - 6EE7362611849A4000A35176 /* TTURLRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLRequestModel.m; path = Sources/TTURLRequestModel.m; sourceTree = ""; }; - 6EE7362711849A4000A35176 /* TTURLRequestQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLRequestQueue.m; path = Sources/TTURLRequestQueue.m; sourceTree = ""; }; - 6EE7363811849A9800A35176 /* MockModelDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockModelDelegate.h; path = UnitTests/mocks/MockModelDelegate.h; sourceTree = ""; }; - 6EE7363911849A9800A35176 /* MockModelDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MockModelDelegate.m; path = UnitTests/mocks/MockModelDelegate.m; sourceTree = ""; }; - 6EE7363B11849AA100A35176 /* NetworkModelTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkModelTests.m; path = UnitTests/NetworkModelTests.m; sourceTree = ""; }; - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EE7364811849B1D00A35176 /* Three20Network_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20Network_Prefix.pch; path = Headers/Three20Network_Prefix.pch; sourceTree = ""; }; - 6EE7364B11849B3D00A35176 /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF96404118EFCF0003902E7 /* TTURLRequestQueueInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLRequestQueueInternal.h; path = Headers/TTURLRequestQueueInternal.h; sourceTree = ""; }; - BEF31F3A0F352DF5000DE5D2 /* libThree20Network.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libThree20Network.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* NetworkUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NetworkUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */, - 6EE739CD1184BAF600A35176 /* libThree20Network.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libThree20Network.a */, - EB9E6C6210B6A8F800DE563C /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6EE735F7118499D300A35176 /* Three20Network.h */, - 6EE7364811849B1D00A35176 /* Three20Network_Prefix.pch */, - 6E08B8041183B28A00DA1579 /* Source */, - 6E08B743118397FA00DA1579 /* Dependencies */, - 6EE7364D11849B4200A35176 /* Configurations */, - 6E08B274118282F700DA1579 /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 6E08B274118282F700DA1579 /* Tests */ = { - isa = PBXGroup; - children = ( - 6EE7364611849AF200A35176 /* Resources */, - 6E08B27D118282F700DA1579 /* Mocks */, - 6EE7363B11849AA100A35176 /* NetworkModelTests.m */, - 66F955AF126662E300BEF6F0 /* NetworkURLCacheTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6E08B27D118282F700DA1579 /* Mocks */ = { - isa = PBXGroup; - children = ( - 6EE7363811849A9800A35176 /* MockModelDelegate.h */, - 6EE7363911849A9800A35176 /* MockModelDelegate.m */, - ); - name = Mocks; - sourceTree = ""; - }; - 6E08B743118397FA00DA1579 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E08B8041183B28A00DA1579 /* Source */ = { - isa = PBXGroup; - children = ( - 6E08B86E1183B38400DA1579 /* Global */, - 6EE7360111849A1F00A35176 /* TTUserInfo.h */, - 6EE735FE11849A1600A35176 /* TTUserInfo.m */, - 664B29BC12848AA50008D569 /* TTErrorCodes.h */, - 664B29C012848AAD0008D569 /* TTErrorCodes.m */, - 6E08B8091183B28A00DA1579 /* Model */, - 6E08B8101183B28A00DA1579 /* Response */, - 6E08B8191183B28A00DA1579 /* Request */, - 6E08B8241183B28A00DA1579 /* Cache */, - ); - name = Source; - sourceTree = ""; - }; - 6E08B8091183B28A00DA1579 /* Model */ = { - isa = PBXGroup; - children = ( - 6EE7360811849A3500A35176 /* TTModel.h */, - 6EE7362011849A4000A35176 /* TTModel.m */, - 6EE7360911849A3500A35176 /* TTModelDelegate.h */, - 6E08B80D1183B28A00DA1579 /* Models */, - ); - name = Model; - sourceTree = ""; - }; - 6E08B80D1183B28A00DA1579 /* Models */ = { - isa = PBXGroup; - children = ( - 6EE7361111849A3500A35176 /* TTURLRequestModel.h */, - 6EE7362611849A4000A35176 /* TTURLRequestModel.m */, - ); - name = Models; - sourceTree = ""; - }; - 6E08B8101183B28A00DA1579 /* Response */ = { - isa = PBXGroup; - children = ( - 6EE7361311849A3500A35176 /* TTURLResponse.h */, - 6E08B8121183B28A00DA1579 /* Responses */, - ); - name = Response; - sourceTree = ""; - }; - 6E08B8121183B28A00DA1579 /* Responses */ = { - isa = PBXGroup; - children = ( - 6EE7360C11849A3500A35176 /* TTURLDataResponse.h */, - 6EE7360D11849A3500A35176 /* TTURLImageResponse.h */, - 6EE7362311849A4000A35176 /* TTURLDataResponse.m */, - 6EE7362411849A4000A35176 /* TTURLImageResponse.m */, - ); - name = Responses; - sourceTree = ""; - }; - 6E08B8191183B28A00DA1579 /* Request */ = { - isa = PBXGroup; - children = ( - 6EE7360E11849A3500A35176 /* TTURLRequest.h */, - 6EE7362511849A4000A35176 /* TTURLRequest.m */, - 6E08B81C1183B28A00DA1579 /* Requests */, - ); - name = Request; - sourceTree = ""; - }; - 6E08B81C1183B28A00DA1579 /* Requests */ = { - isa = PBXGroup; - children = ( - 6E08B8211183B28A00DA1579 /* Private */, - 6EE7361011849A3500A35176 /* TTURLRequestDelegate.h */, - 6EE7360F11849A3500A35176 /* TTURLRequestCachePolicy.h */, - 6EE7361211849A3500A35176 /* TTURLRequestQueue.h */, - 6EE7362711849A4000A35176 /* TTURLRequestQueue.m */, - 6EF963FD118EFCCF003902E7 /* Private */, - ); - name = Requests; - sourceTree = ""; - }; - 6E08B8211183B28A00DA1579 /* Private */ = { - isa = PBXGroup; - children = ( - 6EE7360A11849A3500A35176 /* TTRequestLoader.h */, - 6EE7362111849A4000A35176 /* TTRequestLoader.m */, - ); - name = Private; - sourceTree = ""; - }; - 6E08B8241183B28A00DA1579 /* Cache */ = { - isa = PBXGroup; - children = ( - 6EE7360B11849A3500A35176 /* TTURLCache.h */, - 6EE7362211849A4000A35176 /* TTURLCache.m */, - ); - name = Cache; - sourceTree = ""; - }; - 6E08B86E1183B38400DA1579 /* Global */ = { - isa = PBXGroup; - children = ( - 6EE735F9118499FB00A35176 /* TTGlobalNetwork.h */, - 6EE735FB11849A0C00A35176 /* TTGlobalNetwork.m */, - ); - name = Global; - sourceTree = ""; - }; - 6EE7364611849AF200A35176 /* Resources */ = { - isa = PBXGroup; - children = ( - 66F955B71266647A00BEF6F0 /* both.png */, - 66F955B81266647A00BEF6F0 /* both@2x.png */, - 66F955B91266647A00BEF6F0 /* only@2x.png */, - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6EE7364D11849B4200A35176 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6EE7364B11849B3D00A35176 /* Library.xcconfig */, - 6E64541F1184BDF900F08CB1 /* Project.xcconfig */, - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6EE7366711849C5800A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE7366C11849C5800A35176 /* libThree20Core.a */, - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EF963FD118EFCCF003902E7 /* Private */ = { - isa = PBXGroup; - children = ( - 6EF96404118EFCF0003902E7 /* TTURLRequestQueueInternal.h */, - ); - name = Private; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE735F8118499D300A35176 /* Three20Network.h in Headers */, - 6EE735FA118499FB00A35176 /* TTGlobalNetwork.h in Headers */, - 6EE7360211849A1F00A35176 /* TTUserInfo.h in Headers */, - 6EE7361411849A3500A35176 /* TTModel.h in Headers */, - 6EE7361511849A3500A35176 /* TTModelDelegate.h in Headers */, - 6EE7361611849A3500A35176 /* TTRequestLoader.h in Headers */, - 6EE7361711849A3500A35176 /* TTURLCache.h in Headers */, - 6EE7361811849A3500A35176 /* TTURLDataResponse.h in Headers */, - 6EE7361911849A3500A35176 /* TTURLImageResponse.h in Headers */, - 6EE7361A11849A3500A35176 /* TTURLRequest.h in Headers */, - 6EE7361B11849A3500A35176 /* TTURLRequestCachePolicy.h in Headers */, - 6EE7361C11849A3500A35176 /* TTURLRequestDelegate.h in Headers */, - 6EE7361D11849A3500A35176 /* TTURLRequestModel.h in Headers */, - 6EE7361E11849A3500A35176 /* TTURLRequestQueue.h in Headers */, - 6EE7361F11849A3500A35176 /* TTURLResponse.h in Headers */, - 6EE7364911849B1D00A35176 /* Three20Network_Prefix.pch in Headers */, - 6EF96405118EFCF0003902E7 /* TTURLRequestQueueInternal.h in Headers */, - 664B29BF12848AA50008D569 /* TTErrorCodes.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* Three20Network */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20Network" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E645F091187AD0E00F08CB1 /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E65A0131ADF9B00ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EE7367111849C6300A35176 /* PBXTargetDependency */, - ); - name = Three20Network; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libThree20Network.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* Three20NetworkUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20NetworkUnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6EE736C511849F9D00A35176 /* PBXTargetDependency */, - 6EE736C711849FA000A35176 /* PBXTargetDependency */, - ); - name = Three20NetworkUnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* NetworkUnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20Network" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EE7366711849C5800A35176 /* Products */; - ProjectRef = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* Three20Network */, - EB9E6C6110B6A8F800DE563C /* Three20NetworkUnitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6EE7366C11849C5800A35176 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 66F955BA1266647A00BEF6F0 /* both.png in Resources */, - 66F955BB1266647A00BEF6F0 /* both@2x.png in Resources */, - 66F955BC1266647A00BEF6F0 /* only@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E65A0131ADF9B00ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E645F091187AD0E00F08CB1 /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE735FC11849A0C00A35176 /* TTGlobalNetwork.m in Sources */, - 6EE735FF11849A1600A35176 /* TTUserInfo.m in Sources */, - 6EE7362811849A4000A35176 /* TTModel.m in Sources */, - 6EE7362911849A4000A35176 /* TTRequestLoader.m in Sources */, - 6EE7362A11849A4000A35176 /* TTURLCache.m in Sources */, - 6EE7362B11849A4000A35176 /* TTURLDataResponse.m in Sources */, - 6EE7362C11849A4000A35176 /* TTURLImageResponse.m in Sources */, - 6EE7362D11849A4000A35176 /* TTURLRequest.m in Sources */, - 6EE7362E11849A4000A35176 /* TTURLRequestModel.m in Sources */, - 6EE7362F11849A4000A35176 /* TTURLRequestQueue.m in Sources */, - 664B29C312848AAD0008D569 /* TTErrorCodes.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE7363A11849A9800A35176 /* MockModelDelegate.m in Sources */, - 6EE7363C11849AA100A35176 /* NetworkModelTests.m in Sources */, - 66F955B0126662E300BEF6F0 /* NetworkURLCacheTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6EE7367111849C6300A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6EE7367011849C6300A35176 /* PBXContainerItemProxy */; - }; - 6EE736C511849F9D00A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */; - }; - 6EE736C711849FA000A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* Three20Network */; - targetProxy = 6EE736C611849FA000A35176 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64541F1184BDF900F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64541F1184BDF900F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64541F1184BDF900F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20Network" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20Network" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20NetworkUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/Three20Network/UnitTests/NetworkModelTests.m b/src/Three20Network/UnitTests/NetworkModelTests.m deleted file mode 100644 index 503c81af9f..0000000000 --- a/src/Three20Network/UnitTests/NetworkModelTests.m +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. -// See Also: http://bit.ly/hgpqd2 - -#import - -// Mocks -#import "mocks/MockModelDelegate.h" - -// Network -#import "Three20Network/TTModel.h" -#import "Three20Network/TTURLRequest.h" -#import "Three20Network/TTURLRequestModel.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -/** - * Unit tests for the Network model found within Three20. These tests are a part of - * the comprehensive test suite for the Network functionality of the library. - */ - -@interface NetworkModelTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation NetworkModelTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModel - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTTModel_init { - TTModel* model = [[TTModel alloc] init]; - - STAssertTrue(model.isLoaded, @"A TTModel is supposed to be loaded by default."); - STAssertFalse(model.isLoading, @"A TTModel is not supposed to be loading by default."); - STAssertFalse(model.isLoadingMore, @"A TTModel is not supposed to be loading more by default."); - STAssertFalse(model.isOutdated, @"A TTModel is not supposed to be outdated by default."); - - TT_RELEASE_SAFELY(model); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTTModel_delegate { - TTModel* model = [[TTModel alloc] init]; - - MockModelDelegate* mockResults = [[MockModelDelegate alloc] init]; - - [model.delegates addObject:mockResults]; - - // Successful loading - { - [model didStartLoad]; - STAssertTrue(mockResults.isLoading, @"The delegate is supposed to be loading now."); - - // The default model implementation doesn't provide any state, it's perpetually "loaded". - STAssertFalse(model.isLoading, @"A TTModel is not supposed to be loading by default."); - - [model didFinishLoad]; - STAssertFalse(mockResults.isLoading, @"The delegate is supposed to be finished loading now."); - } - - // Cancellation - { - [model didStartLoad]; - STAssertTrue(mockResults.isLoading, @"The delegate is supposed to be loading now."); - - [model didCancelLoad]; - STAssertFalse(mockResults.isLoading, @"The delegate is supposed to have canceled loading."); - } - - // Failures - { - [model didStartLoad]; - STAssertTrue(mockResults.isLoading, @"The delegate is supposed to be loading now."); - - [model didFailLoadWithError:nil]; - STAssertTrue(mockResults.didFail, @"The delegate is supposed to have failed."); - } - - TT_RELEASE_SAFELY(mockResults); - TT_RELEASE_SAFELY(model); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLRequest - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTTURLRequestModel_defaultRequest { - TTURLRequestModel* model = [[TTURLRequestModel alloc] init]; - - NSBundle* testBundle = [NSBundle bundleWithIdentifier:@"com.facebook.three20.UnitTests"]; - STAssertTrue(nil != testBundle, @"Unable to find the bundle %@", [NSBundle allBundles]); - - NSString* xmlDataPath = [[testBundle bundlePath] - stringByAppendingPathComponent:@"testcase.xml"]; - - TTURLRequest* request = [[TTURLRequest alloc] initWithURL:xmlDataPath delegate:nil]; - - STAssertEquals(request.urlPath, xmlDataPath, @"The url path should equal the passed-in path."); - - STAssertNil(request.httpMethod, @"The default http method is nil."); - STAssertNil(request.httpBody, @"The default http body is nil."); - STAssertNil(request.contentType, @"The default content type is nil."); - STAssertEquals([request.parameters count], (NSUInteger)0, - @"There should not be any parameters by default."); - STAssertEquals([request.headers count], (NSUInteger)0, - @"There should not be any custom header properties by default."); - STAssertEquals(request.cachePolicy, TTURLRequestCachePolicyDefault, - @"The cache policy by default, should be the default."); - - TT_RELEASE_SAFELY(model); - TT_RELEASE_SAFELY(request); -} - - -@end diff --git a/src/Three20Network/UnitTests/NetworkURLCacheTests.m b/src/Three20Network/UnitTests/NetworkURLCacheTests.m deleted file mode 100644 index 428b57783e..0000000000 --- a/src/Three20Network/UnitTests/NetworkURLCacheTests.m +++ /dev/null @@ -1,110 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. -// See Also: http://bit.ly/hgpqd2 - -#import - -// Network -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTGlobalCorePaths.h" - -@interface TTURLCache() - -/** - * Reveal these private methods for testing. - */ -+ (NSString*)doubleImageURLPath:(NSString*)urlPath; - -@end - -/** - * Unit tests for the TTURLCache object. - * - * These tests are a part of the comprehensive test suite for the Network - * functionality of the library. - */ - -@interface NetworkURLCacheTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation NetworkURLCacheTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLCache - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTTURLCache_doubleImageURLPath { - STAssertNil([TTURLCache doubleImageURLPath:nil], - @"nil should be nil."); - - STAssertTrue([[TTURLCache doubleImageURLPath:@"."] - isEqualToString:@"."], - @". should resolve to ."); - - STAssertTrue([[TTURLCache doubleImageURLPath:@".gif"] - isEqualToString:@".gif"], - @".gif should resolve to .gif"); - - STAssertTrue([[TTURLCache doubleImageURLPath:@"bundle://both.png"] - isEqualToString:@"bundle://both@2x.png"], - @"both.png should resolve to both@2x.png."); - - STAssertTrue([[TTURLCache doubleImageURLPath:@"bundle://both"] - isEqualToString:@"bundle://both@2x"], - @"both should resolve to both@2x."); - - STAssertTrue([[TTURLCache doubleImageURLPath:@"bundle://images/both"] - isEqualToString:@"bundle://images/both@2x"], - @"images/both should resolve to images/both@2x."); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTTURLCache_hasImageForURL { - NSBundle* testBundle = [NSBundle bundleWithIdentifier:@"com.facebook.three20.UnitTests"]; - STAssertTrue(nil != testBundle, @"Unable to find the bundle %@", [NSBundle allBundles]); - - TTSetDefaultBundle(testBundle); - - STAssertTrue([[TTURLCache sharedCache] hasImageForURL:@"bundle://both.png" fromDisk:YES], - @"both.png should exist."); - - STAssertTrue([[TTURLCache sharedCache] hasImageForURL:@"bundle://only.png" fromDisk:YES], - @"only@2x.png should exist."); - - STAssertNotNil([[TTURLCache sharedCache] imageForURL:@"bundle://both.png" fromDisk:YES], - @"both@2x.png should exist."); - - // Release the default bundle now that we're done with it. - TTSetDefaultBundle(nil); -} - - -@end diff --git a/src/Three20Network/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/Three20Network/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/Three20Network/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/Three20Network/UnitTests/Resources/both.png b/src/Three20Network/UnitTests/Resources/both.png deleted file mode 100644 index 6ca8e06cb6..0000000000 Binary files a/src/Three20Network/UnitTests/Resources/both.png and /dev/null differ diff --git a/src/Three20Network/UnitTests/Resources/both@2x.png b/src/Three20Network/UnitTests/Resources/both@2x.png deleted file mode 100644 index a52c5f7b34..0000000000 Binary files a/src/Three20Network/UnitTests/Resources/both@2x.png and /dev/null differ diff --git a/src/Three20Network/UnitTests/Resources/only@2x.png b/src/Three20Network/UnitTests/Resources/only@2x.png deleted file mode 100644 index a52c5f7b34..0000000000 Binary files a/src/Three20Network/UnitTests/Resources/only@2x.png and /dev/null differ diff --git a/src/Three20Network/UnitTests/mocks/MockModelDelegate.h b/src/Three20Network/UnitTests/mocks/MockModelDelegate.h deleted file mode 100644 index 30f1963aaa..0000000000 --- a/src/Three20Network/UnitTests/mocks/MockModelDelegate.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Network/TTModelDelegate.h" - -@interface MockModelDelegate : NSObject { -@private - BOOL _isLoading; - BOOL _didFail; -} - -@property (nonatomic, readonly) BOOL isLoading; -@property (nonatomic, readonly) BOOL didFail; - -@end diff --git a/src/Three20Network/UnitTests/mocks/MockModelDelegate.m b/src/Three20Network/UnitTests/mocks/MockModelDelegate.m deleted file mode 100644 index 32638471cd..0000000000 --- a/src/Three20Network/UnitTests/mocks/MockModelDelegate.m +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "MockModelDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation MockModelDelegate - -@synthesize isLoading = _isLoading; -@synthesize didFail = _didFail; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidStartLoad:(id)model { - _didFail = NO; - _isLoading = YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidFinishLoad:(id)model { - _didFail = NO; - _isLoading = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didFailLoadWithError:(NSError*)error { - _didFail = YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidCancelLoad:(id)model { - _isLoading = NO; -} - - -@end - diff --git a/src/Three20Style/Configurations/Library.xcconfig b/src/Three20Style/Configurations/Library.xcconfig deleted file mode 100644 index 82423aae45..0000000000 --- a/src/Three20Style/Configurations/Library.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = Three20Style -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/src/Three20Style/Configurations/Project.xcconfig b/src/Three20Style/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/Three20Style/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/Three20Style/Configurations/UnitTests.xcconfig b/src/Three20Style/Configurations/UnitTests.xcconfig deleted file mode 100644 index 09befc6b7b..0000000000 --- a/src/Three20Style/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = StyleUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(UIKIT_FX) $(COREGRAPHICS_FX) diff --git a/src/Three20Style/Headers/TTBevelBorderStyle.h b/src/Three20Style/Headers/TTBevelBorderStyle.h deleted file mode 100644 index cac84b4b53..0000000000 --- a/src/Three20Style/Headers/TTBevelBorderStyle.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTBevelBorderStyle : TTStyle { - UIColor* _highlight; - UIColor* _shadow; - CGFloat _width; - NSInteger _lightSource; -} - -@property (nonatomic, retain) UIColor* highlight; -@property (nonatomic, retain) UIColor* shadow; -@property (nonatomic) CGFloat width; -@property (nonatomic) NSInteger lightSource; - -+ (TTBevelBorderStyle*)styleWithColor:(UIColor*)color width:(CGFloat)width next:(TTStyle*)next; - -+ (TTBevelBorderStyle*)styleWithHighlight:(UIColor*)highlight - shadow:(UIColor*)shadow - width:(CGFloat)width - lightSource:(NSInteger)lightSource - next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTBlendStyle.h b/src/Three20Style/Headers/TTBlendStyle.h deleted file mode 100644 index b6f1eb4ca3..0000000000 --- a/src/Three20Style/Headers/TTBlendStyle.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTBlendStyle : TTStyle { - CGBlendMode _blendMode; -} - -@property (nonatomic) CGBlendMode blendMode; - -+ (TTBlendStyle*)styleWithBlend:(CGBlendMode)blendMode next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTBoxStyle.h b/src/Three20Style/Headers/TTBoxStyle.h deleted file mode 100644 index ed6fa5806a..0000000000 --- a/src/Three20Style/Headers/TTBoxStyle.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" -#import "Three20Style/TTPosition.h" - -@interface TTBoxStyle : TTStyle { - UIEdgeInsets _margin; - UIEdgeInsets _padding; - CGSize _minSize; - TTPosition _position; -} - -@property (nonatomic) UIEdgeInsets margin; -@property (nonatomic) UIEdgeInsets padding; -@property (nonatomic) CGSize minSize; -@property (nonatomic) TTPosition position; - -+ (TTBoxStyle*)styleWithMargin:(UIEdgeInsets)margin next:(TTStyle*)next; -+ (TTBoxStyle*)styleWithPadding:(UIEdgeInsets)padding next:(TTStyle*)next; -+ (TTBoxStyle*)styleWithFloats:(TTPosition)position next:(TTStyle*)next; -+ (TTBoxStyle*)styleWithMargin:(UIEdgeInsets)margin padding:(UIEdgeInsets)padding - next:(TTStyle*)next; -+ (TTBoxStyle*)styleWithMargin:(UIEdgeInsets)margin padding:(UIEdgeInsets)padding - minSize:(CGSize)minSize position:(TTPosition)position next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTContentStyle.h b/src/Three20Style/Headers/TTContentStyle.h deleted file mode 100644 index 7ba6969a16..0000000000 --- a/src/Three20Style/Headers/TTContentStyle.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTContentStyle : TTStyle - -+ (TTContentStyle*)styleWithNext:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTDefaultStyleSheet+DragRefreshHeader.h b/src/Three20Style/Headers/TTDefaultStyleSheet+DragRefreshHeader.h deleted file mode 100644 index e89f64877b..0000000000 --- a/src/Three20Style/Headers/TTDefaultStyleSheet+DragRefreshHeader.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTDefaultStyleSheet.h" - -@interface TTDefaultStyleSheet (TTDragRefreshHeader) - -@property (nonatomic, readonly) UIFont* tableRefreshHeaderLastUpdatedFont; -@property (nonatomic, readonly) UIFont* tableRefreshHeaderStatusFont; -@property (nonatomic, readonly) UIColor* tableRefreshHeaderBackgroundColor; -@property (nonatomic, readonly) UIColor* tableRefreshHeaderTextColor; -@property (nonatomic, readonly) UIColor* tableRefreshHeaderTextShadowColor; -@property (nonatomic, readonly) CGSize tableRefreshHeaderTextShadowOffset; -@property (nonatomic, readonly) UIImage* tableRefreshHeaderArrowImage; - -@end diff --git a/src/Three20Style/Headers/TTDefaultStyleSheet.h b/src/Three20Style/Headers/TTDefaultStyleSheet.h deleted file mode 100644 index e570a8a679..0000000000 --- a/src/Three20Style/Headers/TTDefaultStyleSheet.h +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyleSheet.h" - -@class TTShape; - -@interface TTDefaultStyleSheet : TTStyleSheet - -// Common styles -@property (nonatomic, readonly) UIColor* textColor; -@property (nonatomic, readonly) UIColor* highlightedTextColor; -@property (nonatomic, readonly) UIFont* font; -@property (nonatomic, readonly) UIColor* backgroundColor; -@property (nonatomic, readonly) UIColor* navigationBarTintColor; -@property (nonatomic, readonly) UIColor* toolbarTintColor; -@property (nonatomic, readonly) UIColor* searchBarTintColor; - -// Tables -@property (nonatomic, readonly) UIColor* tablePlainBackgroundColor; -@property (nonatomic, readonly) UIColor* tableGroupedBackgroundColor; -@property (nonatomic, readonly) UIColor* searchTableBackgroundColor; -@property (nonatomic, readonly) UIColor* searchTableSeparatorColor; - -// Table Headers -@property (nonatomic, readonly) UIColor* tableHeaderTextColor; -@property (nonatomic, readonly) UIColor* tableHeaderShadowColor; -@property (nonatomic, readonly) CGSize tableHeaderShadowOffset; -@property (nonatomic, readonly) UIColor* tableHeaderTintColor; - -// Photo Captions -@property (nonatomic, readonly) UIColor* photoCaptionTextColor; -@property (nonatomic, readonly) UIColor* photoCaptionTextShadowColor; -@property (nonatomic, readonly) CGSize photoCaptionTextShadowOffset; - -@property (nonatomic, readonly) UIColor* timestampTextColor; -@property (nonatomic, readonly) UIColor* linkTextColor; -@property (nonatomic, readonly) UIColor* moreLinkTextColor; - -@property (nonatomic, readonly) UIColor* screenBackgroundColor; - -@property (nonatomic, readonly) UIColor* tableActivityTextColor; -@property (nonatomic, readonly) UIColor* tableErrorTextColor; -@property (nonatomic, readonly) UIColor* tableSubTextColor; -@property (nonatomic, readonly) UIColor* tableTitleTextColor; - -@property (nonatomic, readonly) UIColor* tabTintColor; -@property (nonatomic, readonly) UIColor* tabBarTintColor; - -@property (nonatomic, readonly) UIColor* messageFieldTextColor; -@property (nonatomic, readonly) UIColor* messageFieldSeparatorColor; - -@property (nonatomic, readonly) UIColor* thumbnailBackgroundColor; - -@property (nonatomic, readonly) UIColor* postButtonColor; - -@property (nonatomic, readonly) UIFont* buttonFont; -@property (nonatomic, readonly) UIFont* tableFont; -@property (nonatomic, readonly) UIFont* tableSmallFont; -@property (nonatomic, readonly) UIFont* tableTitleFont; -@property (nonatomic, readonly) UIFont* tableTimestampFont; -@property (nonatomic, readonly) UIFont* tableButtonFont; -@property (nonatomic, readonly) UIFont* tableSummaryFont; -@property (nonatomic, readonly) UIFont* tableHeaderPlainFont; -@property (nonatomic, readonly) UIFont* tableHeaderGroupedFont; -@property (nonatomic, readonly) CGFloat tableBannerViewHeight; -@property (nonatomic, readonly) UIFont* photoCaptionFont; -@property (nonatomic, readonly) UIFont* messageFont; -@property (nonatomic, readonly) UIFont* errorTitleFont; -@property (nonatomic, readonly) UIFont* errorSubtitleFont; -@property (nonatomic, readonly) UIFont* activityLabelFont; -@property (nonatomic, readonly) UIFont* activityBannerFont; - -@property (nonatomic, readonly) UITableViewCellSelectionStyle tableSelectionStyle; - -- (TTStyle*)selectionFillStyle:(TTStyle*)next; - -- (TTStyle*)toolbarButtonForState:(UIControlState)state shape:(TTShape*)shape - tintColor:(UIColor*)tintColor font:(UIFont*)font; - -- (TTStyle*)pageDotWithColor:(UIColor*)color; - -@end diff --git a/src/Three20Style/Headers/TTFlowLayout.h b/src/Three20Style/Headers/TTFlowLayout.h deleted file mode 100644 index bc088aa3d5..0000000000 --- a/src/Three20Style/Headers/TTFlowLayout.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTLayout.h" - -@interface TTFlowLayout : TTLayout { - CGFloat _padding; - CGFloat _spacing; -} - -@property (nonatomic) CGFloat padding; -@property (nonatomic) CGFloat spacing; - -@end diff --git a/src/Three20Style/Headers/TTFourBorderStyle.h b/src/Three20Style/Headers/TTFourBorderStyle.h deleted file mode 100644 index 930f9705ef..0000000000 --- a/src/Three20Style/Headers/TTFourBorderStyle.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTFourBorderStyle : TTStyle { - UIColor* _top; - UIColor* _right; - UIColor* _bottom; - UIColor* _left; - CGFloat _width; -} - -@property (nonatomic, retain) UIColor* top; -@property (nonatomic, retain) UIColor* right; -@property (nonatomic, retain) UIColor* bottom; -@property (nonatomic, retain) UIColor* left; -@property (nonatomic) CGFloat width; - -+ (TTFourBorderStyle*)styleWithTop:(UIColor*)top right:(UIColor*)right bottom:(UIColor*)bottom - left:(UIColor*)left width:(CGFloat)width next:(TTStyle*)next; -+ (TTFourBorderStyle*)styleWithTop:(UIColor*)top width:(CGFloat)width next:(TTStyle*)next; -+ (TTFourBorderStyle*)styleWithRight:(UIColor*)right width:(CGFloat)width next:(TTStyle*)next; -+ (TTFourBorderStyle*)styleWithBottom:(UIColor*)bottom width:(CGFloat)width next:(TTStyle*)next; -+ (TTFourBorderStyle*)styleWithLeft:(UIColor*)left width:(CGFloat)width next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTGlobalStyle.h b/src/Three20Style/Headers/TTGlobalStyle.h deleted file mode 100644 index 1d1f765dc0..0000000000 --- a/src/Three20Style/Headers/TTGlobalStyle.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * A constant denoting that a corner should be rounded. - * @const -1 - */ -extern const CGFloat ttkRounded; - -/** - * Deprecated macros for common constants. - */ -#define TT_ROUNDED ttkRounded - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Color helpers - -#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1] -#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f \ -alpha:(a)] - -#define HSVCOLOR(h,s,v) [UIColor colorWithHue:(h) saturation:(s) value:(v) alpha:1] -#define HSVACOLOR(h,s,v,a) [UIColor colorWithHue:(h) saturation:(s) value:(v) alpha:(a)] - -#define RGBA(r,g,b,a) (r)/255.0f, (g)/255.0f, (b)/255.0f, (a) - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Style helpers - -#define TTSTYLE(_SELECTOR) [[TTStyleSheet globalStyleSheet] styleWithSelector:@#_SELECTOR] - -#define TTSTYLESTATE(_SELECTOR, _STATE) [[TTStyleSheet globalStyleSheet] \ - styleWithSelector:@#_SELECTOR forState:_STATE] - -#define TTSTYLESHEET ((id)[TTStyleSheet globalStyleSheet]) - -#define TTSTYLEVAR(_VARNAME) [TTSTYLESHEET _VARNAME] diff --git a/src/Three20Style/Headers/TTGridLayout.h b/src/Three20Style/Headers/TTGridLayout.h deleted file mode 100644 index 7dbfdce911..0000000000 --- a/src/Three20Style/Headers/TTGridLayout.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTLayout.h" - -@interface TTGridLayout : TTLayout { - NSInteger _columnCount; - CGFloat _padding; - CGFloat _spacing; -} - -@property (nonatomic) NSInteger columnCount; -@property (nonatomic) CGFloat padding; -@property (nonatomic) CGFloat spacing; - -@end diff --git a/src/Three20Style/Headers/TTHighlightBorderStyle.h b/src/Three20Style/Headers/TTHighlightBorderStyle.h deleted file mode 100644 index b6958d9a6e..0000000000 --- a/src/Three20Style/Headers/TTHighlightBorderStyle.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTHighlightBorderStyle : TTStyle { - UIColor* _color; - UIColor* _highlightColor; - CGFloat _width; -} - -@property (nonatomic, retain) UIColor* color; -@property (nonatomic, retain) UIColor* highlightColor; -@property (nonatomic) CGFloat width; - -+ (TTHighlightBorderStyle*)styleWithColor:(UIColor*)color highlightColor:(UIColor*)highlightColor - width:(CGFloat)width next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTImageStyle.h b/src/Three20Style/Headers/TTImageStyle.h deleted file mode 100644 index 67ff2c7b09..0000000000 --- a/src/Three20Style/Headers/TTImageStyle.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTImageStyle : TTStyle { - NSString* _imageURL; - UIImage* _image; - UIImage* _defaultImage; - - CGSize _size; - - UIViewContentMode _contentMode; -} - -@property (nonatomic, copy) NSString* imageURL; -@property (nonatomic, retain) UIImage* image; -@property (nonatomic, retain) UIImage* defaultImage; -@property (nonatomic) CGSize size; - -@property (nonatomic) UIViewContentMode contentMode; - -+ (TTImageStyle*)styleWithImageURL:(NSString*)imageURL next:(TTStyle*)next; -+ (TTImageStyle*)styleWithImageURL:(NSString*)imageURL defaultImage:(UIImage*)defaultImage - next:(TTStyle*)next; -+ (TTImageStyle*)styleWithImageURL:(NSString*)imageURL defaultImage:(UIImage*)defaultImage - contentMode:(UIViewContentMode)contentMode - size:(CGSize)size next:(TTStyle*)next; -+ (TTImageStyle*)styleWithImage:(UIImage*)image next:(TTStyle*)next; -+ (TTImageStyle*)styleWithImage:(UIImage*)image defaultImage:(UIImage*)defaultImage - next:(TTStyle*)next; -+ (TTImageStyle*)styleWithImage:(UIImage*)image defaultImage:(UIImage*)defaultImage - contentMode:(UIViewContentMode)contentMode - size:(CGSize)size next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTInnerShadowStyle.h b/src/Three20Style/Headers/TTInnerShadowStyle.h deleted file mode 100644 index e26bc0e0fc..0000000000 --- a/src/Three20Style/Headers/TTInnerShadowStyle.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTShadowStyle.h" - -@interface TTInnerShadowStyle : TTShadowStyle -@end diff --git a/src/Three20Style/Headers/TTInsetStyle.h b/src/Three20Style/Headers/TTInsetStyle.h deleted file mode 100644 index ce1ff15e7f..0000000000 --- a/src/Three20Style/Headers/TTInsetStyle.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTInsetStyle : TTStyle { - UIEdgeInsets _inset; -} - -@property (nonatomic) UIEdgeInsets inset; - -+ (TTInsetStyle*)styleWithInset:(UIEdgeInsets)inset next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTLayout.h b/src/Three20Style/Headers/TTLayout.h deleted file mode 100644 index 8d6544951c..0000000000 --- a/src/Three20Style/Headers/TTLayout.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTLayout : NSObject - -- (CGSize)layoutSubviews:(NSArray*)subviews forView:(UIView*)view; - -@end diff --git a/src/Three20Style/Headers/TTLinearGradientBorderStyle.h b/src/Three20Style/Headers/TTLinearGradientBorderStyle.h deleted file mode 100644 index 7f9c3e90ac..0000000000 --- a/src/Three20Style/Headers/TTLinearGradientBorderStyle.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTLinearGradientBorderStyle : TTStyle { - UIColor* _color1; - UIColor* _color2; - CGFloat _location1; - CGFloat _location2; - CGFloat _width; -} - -@property (nonatomic, retain) UIColor* color1; -@property (nonatomic, retain) UIColor* color2; -@property (nonatomic) CGFloat location1; -@property (nonatomic) CGFloat location2; -@property (nonatomic) CGFloat width; - -+ (TTLinearGradientBorderStyle*)styleWithColor1:(UIColor*)color1 color2:(UIColor*)color2 - width:(CGFloat)width next:(TTStyle*)next; -+ (TTLinearGradientBorderStyle*)styleWithColor1:(UIColor*)color1 location1:(CGFloat)location1 - color2:(UIColor*)color2 location2:(CGFloat)location2 - width:(CGFloat)width next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTLinearGradientFillStyle.h b/src/Three20Style/Headers/TTLinearGradientFillStyle.h deleted file mode 100644 index 2e9c0de702..0000000000 --- a/src/Three20Style/Headers/TTLinearGradientFillStyle.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTLinearGradientFillStyle : TTStyle { - UIColor* _color1; - UIColor* _color2; -} - -@property (nonatomic, retain) UIColor* color1; -@property (nonatomic, retain) UIColor* color2; - -+ (TTLinearGradientFillStyle*)styleWithColor1:(UIColor*)color1 color2:(UIColor*)color2 - next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTMaskStyle.h b/src/Three20Style/Headers/TTMaskStyle.h deleted file mode 100644 index c631860045..0000000000 --- a/src/Three20Style/Headers/TTMaskStyle.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTMaskStyle : TTStyle { - UIImage* _mask; -} - -@property (nonatomic, retain) UIImage* mask; - -+ (TTMaskStyle*)styleWithMask:(UIImage*)mask next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTPartStyle.h b/src/Three20Style/Headers/TTPartStyle.h deleted file mode 100644 index ac212b7ee5..0000000000 --- a/src/Three20Style/Headers/TTPartStyle.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@class TTStyleContext; - -@interface TTPartStyle : TTStyle { - NSString* _name; - TTStyle* _style; -} - -@property (nonatomic, copy) NSString* name; -@property (nonatomic, retain) TTStyle* style; - -+ (TTPartStyle*)styleWithName:(NSString*)name style:(TTStyle*)style next:(TTStyle*)next; - -- (void)drawPart:(TTStyleContext*)context; - -@end diff --git a/src/Three20Style/Headers/TTPosition.h b/src/Three20Style/Headers/TTPosition.h deleted file mode 100644 index 36ddb7a316..0000000000 --- a/src/Three20Style/Headers/TTPosition.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -typedef enum { - TTPositionStatic, - TTPositionAbsolute, - TTPositionFloatLeft, - TTPositionFloatRight, -} TTPosition; diff --git a/src/Three20Style/Headers/TTRectangleShape.h b/src/Three20Style/Headers/TTRectangleShape.h deleted file mode 100644 index 378f21c455..0000000000 --- a/src/Three20Style/Headers/TTRectangleShape.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTShape.h" - -@interface TTRectangleShape : TTShape - -+ (TTRectangleShape*)shape; - -@end diff --git a/src/Three20Style/Headers/TTReflectiveFillStyle.h b/src/Three20Style/Headers/TTReflectiveFillStyle.h deleted file mode 100644 index bf3b19f4a6..0000000000 --- a/src/Three20Style/Headers/TTReflectiveFillStyle.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTReflectiveFillStyle : TTStyle { - UIColor* _color; - BOOL _withBottomHighlight; -} - -@property (nonatomic, retain) UIColor* color; -@property (nonatomic, assign) BOOL withBottomHighlight; - -+ (TTReflectiveFillStyle*)styleWithColor:(UIColor*)color next:(TTStyle*)next; -+ (TTReflectiveFillStyle*)styleWithColor:(UIColor*)color - withBottomHighlight:(BOOL)withBottomHighlight next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTRoundedLeftArrowShape.h b/src/Three20Style/Headers/TTRoundedLeftArrowShape.h deleted file mode 100644 index d47fb11124..0000000000 --- a/src/Three20Style/Headers/TTRoundedLeftArrowShape.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTShape.h" - -@interface TTRoundedLeftArrowShape : TTShape { - CGFloat _radius; -} - -@property (nonatomic) CGFloat radius; - -+ (TTRoundedLeftArrowShape*)shapeWithRadius:(CGFloat)radius; - -@end diff --git a/src/Three20Style/Headers/TTRoundedRectangleShape.h b/src/Three20Style/Headers/TTRoundedRectangleShape.h deleted file mode 100644 index 8cc20dbe56..0000000000 --- a/src/Three20Style/Headers/TTRoundedRectangleShape.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTShape.h" - -@interface TTRoundedRectangleShape : TTShape { - CGFloat _topLeftRadius; - CGFloat _topRightRadius; - CGFloat _bottomRightRadius; - CGFloat _bottomLeftRadius; -} - -@property (nonatomic) CGFloat topLeftRadius; -@property (nonatomic) CGFloat topRightRadius; -@property (nonatomic) CGFloat bottomRightRadius; -@property (nonatomic) CGFloat bottomLeftRadius; - -+ (TTRoundedRectangleShape*)shapeWithRadius:(CGFloat)radius; - -+ (TTRoundedRectangleShape*)shapeWithTopLeft:(CGFloat)topLeft topRight:(CGFloat)topRight - bottomRight:(CGFloat)bottomRight bottomLeft:(CGFloat)bottomLeft; - -@end diff --git a/src/Three20Style/Headers/TTRoundedRightArrowShape.h b/src/Three20Style/Headers/TTRoundedRightArrowShape.h deleted file mode 100644 index eafcabebad..0000000000 --- a/src/Three20Style/Headers/TTRoundedRightArrowShape.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTShape.h" - -@interface TTRoundedRightArrowShape : TTShape { - CGFloat _radius; -} - -@property (nonatomic) CGFloat radius; - -+ (TTRoundedRightArrowShape*)shapeWithRadius:(CGFloat)radius; - -@end diff --git a/src/Three20Style/Headers/TTShadowStyle.h b/src/Three20Style/Headers/TTShadowStyle.h deleted file mode 100644 index c505410b66..0000000000 --- a/src/Three20Style/Headers/TTShadowStyle.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTShadowStyle : TTStyle { - UIColor* _color; - CGFloat _blur; - CGSize _offset; -} - -@property (nonatomic, retain) UIColor* color; -@property (nonatomic) CGFloat blur; -@property (nonatomic) CGSize offset; - -+ (TTShadowStyle*)styleWithColor:(UIColor*)color blur:(CGFloat)blur offset:(CGSize)offset - next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTShape.h b/src/Three20Style/Headers/TTShape.h deleted file mode 100644 index b65dc7ab46..0000000000 --- a/src/Three20Style/Headers/TTShape.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTShape : NSObject - -- (void)openPath:(CGRect)rect; -- (void)closePath:(CGRect)rect; - -- (void)addTopEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource; -- (void)addRightEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource; -- (void)addBottomEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource; -- (void)addLeftEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource; - -/** - * Opens the path, adds all edges, and closes the path. - */ -- (void)addToPath:(CGRect)rect; - -- (void)addInverseToPath:(CGRect)rect; - -- (UIEdgeInsets)insetsForSize:(CGSize)size; - -@end diff --git a/src/Three20Style/Headers/TTShapeInternal.h b/src/Three20Style/Headers/TTShapeInternal.h deleted file mode 100644 index 5a80b638d8..0000000000 --- a/src/Three20Style/Headers/TTShapeInternal.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTGlobalStyle.h" // For TT_ROUNDED - -extern const CGFloat kArrowPointWidth; -extern const CGFloat kArrowRadius; - -#define RD(_RADIUS) (_RADIUS == TT_ROUNDED ? round(fh/2) : _RADIUS) diff --git a/src/Three20Style/Headers/TTShapeStyle.h b/src/Three20Style/Headers/TTShapeStyle.h deleted file mode 100644 index 844a16ace8..0000000000 --- a/src/Three20Style/Headers/TTShapeStyle.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@class TTShape; - -/** - * Causes all layers going forward to use a particular shape. - */ -@interface TTShapeStyle : TTStyle { - TTShape* _shape; -} - -@property (nonatomic, retain) TTShape* shape; - -+ (TTShapeStyle*)styleWithShape:(TTShape*)shape next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTSolidBorderStyle.h b/src/Three20Style/Headers/TTSolidBorderStyle.h deleted file mode 100644 index 5004224d0e..0000000000 --- a/src/Three20Style/Headers/TTSolidBorderStyle.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTSolidBorderStyle : TTStyle { - UIColor* _color; - CGFloat _width; -} - -@property (nonatomic, retain) UIColor* color; -@property (nonatomic) CGFloat width; - -+ (TTSolidBorderStyle*)styleWithColor:(UIColor*)color width:(CGFloat)width next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTSolidFillStyle.h b/src/Three20Style/Headers/TTSolidFillStyle.h deleted file mode 100644 index 248dac4d44..0000000000 --- a/src/Three20Style/Headers/TTSolidFillStyle.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTSolidFillStyle : TTStyle { - UIColor* _color; -} - -@property (nonatomic, retain) UIColor* color; - -+ (TTSolidFillStyle*)styleWithColor:(UIColor*)color next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/TTSpeechBubbleShape.h b/src/Three20Style/Headers/TTSpeechBubbleShape.h deleted file mode 100644 index 02aae556d1..0000000000 --- a/src/Three20Style/Headers/TTSpeechBubbleShape.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTShape.h" - -@interface TTSpeechBubbleShape : TTShape { - CGFloat _radius; - CGFloat _pointLocation; - CGFloat _pointAngle; - CGSize _pointSize; -} - -@property (nonatomic) CGFloat radius; -@property (nonatomic) CGFloat pointLocation; -@property (nonatomic) CGFloat pointAngle; -@property (nonatomic) CGSize pointSize; - -+ (TTSpeechBubbleShape*)shapeWithRadius:(CGFloat)radius pointLocation:(CGFloat)pointLocation - pointAngle:(CGFloat)pointAngle pointSize:(CGSize)pointSize; - -@end diff --git a/src/Three20Style/Headers/TTStyle.h b/src/Three20Style/Headers/TTStyle.h deleted file mode 100644 index ab216e2061..0000000000 --- a/src/Three20Style/Headers/TTStyle.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTStyleContext; - -@interface TTStyle : NSObject { - TTStyle* _next; -} - -@property (nonatomic, retain) TTStyle* next; - -- (id)initWithNext:(TTStyle*)next; - -- (TTStyle*)next:(TTStyle*)next; - -- (void)draw:(TTStyleContext*)context; - -- (UIEdgeInsets)addToInsets:(UIEdgeInsets)insets forSize:(CGSize)size; -- (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context; - -- (void)addStyle:(TTStyle*)style; - -- (id)firstStyleOfClass:(Class)cls; -- (id)styleForPart:(NSString*)name; - -@end diff --git a/src/Three20Style/Headers/TTStyleContext.h b/src/Three20Style/Headers/TTStyleContext.h deleted file mode 100644 index 60a9deca72..0000000000 --- a/src/Three20Style/Headers/TTStyleContext.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTShape; -@protocol TTStyleDelegate; - -@interface TTStyleContext : NSObject { - CGRect _frame; - CGRect _contentFrame; - - TTShape* _shape; - - UIFont* _font; - - BOOL _didDrawContent; - - id _delegate; -} - -@property (nonatomic) CGRect frame; -@property (nonatomic) CGRect contentFrame; -@property (nonatomic, retain) TTShape* shape; -@property (nonatomic, retain) UIFont* font; -@property (nonatomic) BOOL didDrawContent; - -@property (nonatomic, assign) id delegate; - -@end diff --git a/src/Three20Style/Headers/TTStyleDelegate.h b/src/Three20Style/Headers/TTStyleDelegate.h deleted file mode 100644 index 4492998e25..0000000000 --- a/src/Three20Style/Headers/TTStyleDelegate.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTStyle; -@class TTStyleContext; - -@protocol TTStyleDelegate -@optional - -- (NSString*)textForLayerWithStyle:(TTStyle*)style; - -- (UIImage*)imageForLayerWithStyle:(TTStyle*)style; - -- (void)drawLayer:(TTStyleContext*)context withStyle:(TTStyle*)style; - -@end diff --git a/src/Three20Style/Headers/TTStyleInternal.h b/src/Three20Style/Headers/TTStyleInternal.h deleted file mode 100644 index 81aa6bcaa7..0000000000 --- a/src/Three20Style/Headers/TTStyleInternal.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -extern const NSInteger kDefaultLightSource; - -@interface TTStyle (TTInternal) - -- (CGGradientRef)newGradientWithColors:(UIColor**)colors locations:(CGFloat*)locations - count:(int)count; - -- (CGGradientRef)newGradientWithColors:(UIColor**)colors count:(int)count; - -@end diff --git a/src/Three20Style/Headers/TTStyleSheet.h b/src/Three20Style/Headers/TTStyleSheet.h deleted file mode 100644 index bd3e8c33ab..0000000000 --- a/src/Three20Style/Headers/TTStyleSheet.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTStyle; - -@interface TTStyleSheet : NSObject { - NSMutableDictionary* _styles; -} - -+ (TTStyleSheet*)globalStyleSheet; -+ (void)setGlobalStyleSheet:(TTStyleSheet*)styleSheet; - -- (TTStyle*)styleWithSelector:(NSString*)selector; -- (TTStyle*)styleWithSelector:(NSString*)selector forState:(UIControlState)state; - -- (void)freeMemory; - -@end diff --git a/src/Three20Style/Headers/TTStyledBlock.h b/src/Three20Style/Headers/TTStyledBlock.h deleted file mode 100644 index fd11b39985..0000000000 --- a/src/Three20Style/Headers/TTStyledBlock.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledElement.h" - -@interface TTStyledBlock : TTStyledElement -@end diff --git a/src/Three20Style/Headers/TTStyledBoldNode.h b/src/Three20Style/Headers/TTStyledBoldNode.h deleted file mode 100644 index cf666dd765..0000000000 --- a/src/Three20Style/Headers/TTStyledBoldNode.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledInline.h" - -@interface TTStyledBoldNode : TTStyledInline -@end diff --git a/src/Three20Style/Headers/TTStyledBoxFrame.h b/src/Three20Style/Headers/TTStyledBoxFrame.h deleted file mode 100644 index dbc3f15f14..0000000000 --- a/src/Three20Style/Headers/TTStyledBoxFrame.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledFrame.h" -#import "Three20Style/TTStyleDelegate.h" - -@interface TTStyledBoxFrame : TTStyledFrame { - TTStyledBoxFrame* _parentFrame; - TTStyledFrame* _firstChildFrame; - TTStyle* _style; -} - -@property (nonatomic, assign) TTStyledBoxFrame* parentFrame; -@property (nonatomic, retain) TTStyledFrame* firstChildFrame; - -/** - * The style used to render the frame; - */ -@property (nonatomic, retain) TTStyle* style; - -@end diff --git a/src/Three20Style/Headers/TTStyledButtonNode.h b/src/Three20Style/Headers/TTStyledButtonNode.h deleted file mode 100644 index 3dc6210626..0000000000 --- a/src/Three20Style/Headers/TTStyledButtonNode.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledInlineBlock.h" - -@interface TTStyledButtonNode : TTStyledInlineBlock { - NSString* _URL; - BOOL _highlighted; -} - -@property (nonatomic) BOOL highlighted; -@property (nonatomic, copy) NSString* URL; - -- (id)initWithURL:(NSString*)URL; -- (id)initWithURL:(NSString*)URL next:(TTStyledNode*)nextSibling; - -// Designated initializer -- (id)initWithText:(NSString*)text URL:(NSString*)URL next:(TTStyledNode*)nextSibling; - -@end diff --git a/src/Three20Style/Headers/TTStyledElement.h b/src/Three20Style/Headers/TTStyledElement.h deleted file mode 100644 index ebbff31ad3..0000000000 --- a/src/Three20Style/Headers/TTStyledElement.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledNode.h" - -@interface TTStyledElement : TTStyledNode { - TTStyledNode* _firstChild; - TTStyledNode* _lastChild; - NSString* _className; -} - -@property (nonatomic, readonly) TTStyledNode* firstChild; -@property (nonatomic, readonly) TTStyledNode* lastChild; -@property (nonatomic, copy) NSString* className; - -- (id)initWithText:(NSString*)text; - -// Designated initializer -- (id)initWithText:(NSString*)text next:(TTStyledNode*)nextSibling; - -- (void)addChild:(TTStyledNode*)child; -- (void)addText:(NSString*)text; -- (void)replaceChild:(TTStyledNode*)oldChild withChild:(TTStyledNode*)newChild; - -- (TTStyledNode*)getElementByClassName:(NSString*)className; - -@end diff --git a/src/Three20Style/Headers/TTStyledFrame.h b/src/Three20Style/Headers/TTStyledFrame.h deleted file mode 100644 index e94edc39c7..0000000000 --- a/src/Three20Style/Headers/TTStyledFrame.h +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTStyledElement; -@class TTStyledFrame; -@class TTStyledBoxFrame; - -@interface TTStyledFrame : NSObject { - TTStyledElement* _element; - TTStyledFrame* _nextFrame; - CGRect _bounds; -} - -/** - * The element that contains the frame. - */ -@property (nonatomic, readonly) TTStyledElement* element; - -/** - * The next in the linked list of frames. - */ -@property (nonatomic, retain) TTStyledFrame* nextFrame; - -/** - * The bounds of the content that is displayed by this frame. - */ -@property (nonatomic) CGRect bounds; - -@property (nonatomic) CGFloat x; -@property (nonatomic) CGFloat y; -@property (nonatomic) CGFloat width; -@property (nonatomic) CGFloat height; - -- (UIFont*)font; - -- (id)initWithElement:(TTStyledElement*)element; - -/** - * Draws the frame. - */ -- (void)drawInRect:(CGRect)rect; - -- (TTStyledBoxFrame*)hitTest:(CGPoint)point; - -@end diff --git a/src/Three20Style/Headers/TTStyledImageFrame.h b/src/Three20Style/Headers/TTStyledImageFrame.h deleted file mode 100644 index 150d1a4591..0000000000 --- a/src/Three20Style/Headers/TTStyledImageFrame.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledFrame.h" -#import "Three20Style/TTStyleDelegate.h" - -@class TTStyledImageNode; - -@interface TTStyledImageFrame : TTStyledFrame { - TTStyledImageNode* _imageNode; - TTStyle* _style; -} - -/** - * The node represented by the frame. - */ -@property (nonatomic, readonly) TTStyledImageNode* imageNode; - -/** - * The style used to render the frame; - */ -@property (nonatomic, retain) TTStyle* style; - -- (id)initWithElement:(TTStyledElement*)element node:(TTStyledImageNode*)node; - -@end diff --git a/src/Three20Style/Headers/TTStyledImageNode.h b/src/Three20Style/Headers/TTStyledImageNode.h deleted file mode 100644 index cce101e174..0000000000 --- a/src/Three20Style/Headers/TTStyledImageNode.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledElement.h" - -@interface TTStyledImageNode : TTStyledElement { - NSString* _URL; - UIImage* _image; - UIImage* _defaultImage; - CGFloat _width; - CGFloat _height; -} - -@property (nonatomic, copy) NSString* URL; -@property (nonatomic, retain) UIImage* image; -@property (nonatomic, retain) UIImage* defaultImage; -@property (nonatomic) CGFloat width; -@property (nonatomic) CGFloat height; - -- (id)initWithURL:(NSString*)URL; - -@end diff --git a/src/Three20Style/Headers/TTStyledInline.h b/src/Three20Style/Headers/TTStyledInline.h deleted file mode 100644 index 12638a6c82..0000000000 --- a/src/Three20Style/Headers/TTStyledInline.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledElement.h" - -@interface TTStyledInline : TTStyledElement -@end diff --git a/src/Three20Style/Headers/TTStyledInlineBlock.h b/src/Three20Style/Headers/TTStyledInlineBlock.h deleted file mode 100644 index ff98fc1984..0000000000 --- a/src/Three20Style/Headers/TTStyledInlineBlock.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledElement.h" - -@interface TTStyledInlineBlock : TTStyledElement -@end diff --git a/src/Three20Style/Headers/TTStyledInlineFrame.h b/src/Three20Style/Headers/TTStyledInlineFrame.h deleted file mode 100644 index a0de0baf6c..0000000000 --- a/src/Three20Style/Headers/TTStyledInlineFrame.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledBoxFrame.h" - -@interface TTStyledInlineFrame : TTStyledBoxFrame { - TTStyledInlineFrame* _inlinePreviousFrame; - TTStyledInlineFrame* _inlineNextFrame; -} - -@property (nonatomic, readonly) TTStyledInlineFrame* inlineParentFrame; -@property (nonatomic, assign) TTStyledInlineFrame* inlinePreviousFrame; -@property (nonatomic, assign) TTStyledInlineFrame* inlineNextFrame; - -@end diff --git a/src/Three20Style/Headers/TTStyledItalicNode.h b/src/Three20Style/Headers/TTStyledItalicNode.h deleted file mode 100644 index b853333469..0000000000 --- a/src/Three20Style/Headers/TTStyledItalicNode.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledInline.h" - -@interface TTStyledItalicNode : TTStyledInline -@end diff --git a/src/Three20Style/Headers/TTStyledLayout.h b/src/Three20Style/Headers/TTStyledLayout.h deleted file mode 100644 index 37bb17b2c8..0000000000 --- a/src/Three20Style/Headers/TTStyledLayout.h +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTStyle; -@class TTStyledNode; -@class TTStyledElement; -@class TTStyledFrame; -@class TTStyledBoxFrame; -@class TTStyledInlineFrame; - -@interface TTStyledLayout : NSObject { - CGFloat _x; - CGFloat _width; - CGFloat _height; - CGFloat _lineWidth; - CGFloat _lineHeight; - CGFloat _minX; - CGFloat _floatLeftWidth; - CGFloat _floatRightWidth; - CGFloat _floatHeight; - - TTStyledFrame* _rootFrame; - TTStyledFrame* _lineFirstFrame; - TTStyledInlineFrame* _inlineFrame; - TTStyledBoxFrame* _topFrame; - TTStyledFrame* _lastFrame; - - UIFont* _font; - UIFont* _boldFont; - UIFont* _italicFont; - - TTStyle* _linkStyle; - TTStyledNode* _rootNode; - TTStyledNode* _lastNode; - - NSMutableArray* _invalidImages; -} - -@property (nonatomic) CGFloat width; -@property (nonatomic) CGFloat height; -@property (nonatomic, retain) UIFont* font; -@property (nonatomic, readonly) TTStyledFrame* rootFrame; -@property (nonatomic, retain) NSMutableArray* invalidImages; - -- (id)initWithRootNode:(TTStyledNode*)rootNode; -- (id)initWithX:(CGFloat)x width:(CGFloat)width height:(CGFloat)height; - -- (void)layout:(TTStyledNode*)node; -- (void)layout:(TTStyledNode*)node container:(TTStyledElement*)element; - -@end diff --git a/src/Three20Style/Headers/TTStyledLineBreakNode.h b/src/Three20Style/Headers/TTStyledLineBreakNode.h deleted file mode 100644 index 3f8ab7da7b..0000000000 --- a/src/Three20Style/Headers/TTStyledLineBreakNode.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledBlock.h" - -@interface TTStyledLineBreakNode : TTStyledBlock -@end diff --git a/src/Three20Style/Headers/TTStyledLinkNode.h b/src/Three20Style/Headers/TTStyledLinkNode.h deleted file mode 100644 index 63842cbedc..0000000000 --- a/src/Three20Style/Headers/TTStyledLinkNode.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledInline.h" - -@interface TTStyledLinkNode : TTStyledInline { - NSString* _URL; - BOOL _highlighted; -} - -@property (nonatomic) BOOL highlighted; -@property (nonatomic, copy) NSString* URL; - -- (id)initWithURL:(NSString*)URL; -- (id)initWithURL:(NSString*)URL next:(TTStyledNode*)nextSibling; - -// Designated initializer -- (id)initWithText:(NSString*)text URL:(NSString*)URL next:(TTStyledNode*)nextSibling; - -@end diff --git a/src/Three20Style/Headers/TTStyledNode.h b/src/Three20Style/Headers/TTStyledNode.h deleted file mode 100644 index ecc8cab3ba..0000000000 --- a/src/Three20Style/Headers/TTStyledNode.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTStyledNode : NSObject { - TTStyledNode* _nextSibling; - TTStyledNode* _parentNode; -} - -@property (nonatomic, retain) TTStyledNode* nextSibling; -@property (nonatomic, assign) TTStyledNode* parentNode; -@property (nonatomic, readonly) NSString* outerText; -@property (nonatomic, readonly) NSString* outerHTML; - -// Designated initializer -- (id)initWithNextSibling:(TTStyledNode*)nextSibling; - -- (id)ancestorOrSelfWithClass:(Class)cls; - -- (void) performDefaultAction; - -@end diff --git a/src/Three20Style/Headers/TTStyledNodeInternal.h b/src/Three20Style/Headers/TTStyledNodeInternal.h deleted file mode 100644 index fcabe174bc..0000000000 --- a/src/Three20Style/Headers/TTStyledNodeInternal.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledNode.h" - -@interface TTStyledNode (TTInternal) - -- (TTStyledNode*)findLastSibling:(TTStyledNode*)sibling; - -@end diff --git a/src/Three20Style/Headers/TTStyledText.h b/src/Three20Style/Headers/TTStyledText.h deleted file mode 100644 index 9921ebdc18..0000000000 --- a/src/Three20Style/Headers/TTStyledText.h +++ /dev/null @@ -1,140 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -// Network -#import "Three20Network/TTURLRequestDelegate.h" - -@protocol TTStyledTextDelegate; -@class TTStyledNode; -@class TTStyledFrame; -@class TTStyledBoxFrame; - -@interface TTStyledText : NSObject { - TTStyledNode* _rootNode; - TTStyledFrame* _rootFrame; - UIFont* _font; - CGFloat _width; - CGFloat _height; - NSMutableArray* _invalidImages; - NSMutableArray* _imageRequests; - - id _delegate; -} - -@property (nonatomic, assign) id delegate; - -/** - * The first in the sequence of nodes that contain the styled text. - */ -@property (nonatomic, retain) TTStyledNode* rootNode; - -/** - * The first in the sequence of frames of text calculated by the layout. - */ -@property (nonatomic, readonly) TTStyledFrame* rootFrame; - -/** - * The font that will be used to measure and draw all text. - */ -@property (nonatomic, retain) UIFont* font; - -/** - * The width that the text should be constrained to fit within. - */ -@property (nonatomic) CGFloat width; - -/** - * The height of the text. - * - * The height is automatically calculated based on the width and the size of word-wrapped text. - */ -@property (nonatomic, readonly) CGFloat height; - -/** - * Indicates if the text needs layout to recalculate its size. - */ -@property (nonatomic, readonly) BOOL needsLayout; - -/** - * Images that require loading - */ -@property (nonatomic, readonly) NSMutableArray* invalidImages; - -/** - * Constructs styled text with XHTML tags turned into style nodes. - * - * Only the following XHTML tags are supported: b, i, img, a. The source must - * be a well-formed XHTML fragment. You do not need to enclose the source in an tag -- - * it can be any string with XHTML tags throughout. - */ -+ (TTStyledText*)textFromXHTML:(NSString*)source; -+ (TTStyledText*)textFromXHTML:(NSString*)source lineBreaks:(BOOL)lineBreaks URLs:(BOOL)URLs; - -/** - * Constructs styled text with all URLs transformed into links. - * - * Only URLs are parsed, not HTML markup. URLs are turned into links. - */ -+ (TTStyledText*)textWithURLs:(NSString*)source; -+ (TTStyledText*)textWithURLs:(NSString*)source lineBreaks:(BOOL)lineBreaks; - -- (id)initWithNode:(TTStyledNode*)rootNode; - -- (void)layoutFrames; - -- (void)layoutIfNeeded; - -/** - * Called to indicate that the layout needs to be re-calculated. - */ -- (void)setNeedsLayout; - -/** - * Draws the text at a point. - */ -- (void)drawAtPoint:(CGPoint)point; - -/** - * Draws the text at a point with optional highlighting. - * - * If highlighted is YES, text colors will be ignored and all text will be drawn in the same color. - */ -- (void)drawAtPoint:(CGPoint)point highlighted:(BOOL)highlighted; - -/** - * Determines which frame is intersected by a point. - */ -- (TTStyledBoxFrame*)hitTest:(CGPoint)point; - -/** - * Finds the frame that represents the node. - * - * If multiple frames represent a node, such as an inline frame with line breaks, the - * first frame in the sequence will be returned. - */ -- (TTStyledFrame*)getFrameForNode:(TTStyledNode*)node; - -- (void)addChild:(TTStyledNode*)child; - -- (void)addText:(NSString*)text; - -- (void)insertChild:(TTStyledNode*)child atIndex:(NSInteger)index; - -- (TTStyledNode*)getElementByClassName:(NSString*)className; - -@end diff --git a/src/Three20Style/Headers/TTStyledTextDelegate.h b/src/Three20Style/Headers/TTStyledTextDelegate.h deleted file mode 100644 index 115793b5fe..0000000000 --- a/src/Three20Style/Headers/TTStyledTextDelegate.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTStyledText; - -@protocol TTStyledTextDelegate -@optional - -- (void)styledTextNeedsDisplay:(TTStyledText*)text; - -@end diff --git a/src/Three20Style/Headers/TTStyledTextFrame.h b/src/Three20Style/Headers/TTStyledTextFrame.h deleted file mode 100644 index 72d5024165..0000000000 --- a/src/Three20Style/Headers/TTStyledTextFrame.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledFrame.h" - -@class TTStyledTextNode; - -@interface TTStyledTextFrame : TTStyledFrame { - TTStyledTextNode* _node; - NSString* _text; - UIFont* _font; -} - -/** - * The node represented by the frame. - */ -@property (nonatomic, readonly) TTStyledTextNode* node; - -/** - * The text that is displayed by this frame. - */ -@property (nonatomic, readonly) NSString* text; - -/** - * The font that is used to measure and display the text of this frame. - */ -@property (nonatomic, retain) UIFont* font; - -- (id)initWithText:(NSString*)text element:(TTStyledElement*)element node:(TTStyledTextNode*)node; - -@end diff --git a/src/Three20Style/Headers/TTStyledTextNode.h b/src/Three20Style/Headers/TTStyledTextNode.h deleted file mode 100644 index 8605294bef..0000000000 --- a/src/Three20Style/Headers/TTStyledTextNode.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledNode.h" - -@interface TTStyledTextNode : TTStyledNode { - NSString* _text; -} - -@property (nonatomic, copy) NSString* text; - -- (id)initWithText:(NSString*)text; - -// Designated initializer -- (id)initWithText:(NSString*)text next:(TTStyledNode*)nextSibling; - -@end diff --git a/src/Three20Style/Headers/TTStyledTextParser.h b/src/Three20Style/Headers/TTStyledTextParser.h deleted file mode 100644 index 488f1a559c..0000000000 --- a/src/Three20Style/Headers/TTStyledTextParser.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTStyledNode; -@class TTStyledElement; - -#if __IPHONE_4_0 && __IPHONE_4_0 <= __IPHONE_OS_VERSION_MAX_ALLOWED -@interface TTStyledTextParser : NSObject { -#else -@interface TTStyledTextParser : NSObject { -#endif - TTStyledNode* _rootNode; - TTStyledElement* _topElement; - TTStyledNode* _lastNode; - - NSError* _parserError; - - NSMutableString* _chars; - NSMutableArray* _stack; - - BOOL _parseLineBreaks; - BOOL _parseURLs; -} - -@property (nonatomic, retain) TTStyledNode* rootNode; -@property (nonatomic) BOOL parseLineBreaks; -@property (nonatomic) BOOL parseURLs; - -- (void)parseXHTML:(NSString*)html; -- (void)parseText:(NSString*)string; - -@end diff --git a/src/Three20Style/Headers/TTTextStyle.h b/src/Three20Style/Headers/TTTextStyle.h deleted file mode 100644 index 65b2f92ddd..0000000000 --- a/src/Three20Style/Headers/TTTextStyle.h +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyle.h" - -@interface TTTextStyle : TTStyle { - UIFont* _font; - UIColor* _color; - - UIColor* _shadowColor; - CGSize _shadowOffset; - - CGFloat _minimumFontSize; - NSInteger _numberOfLines; - - UITextAlignment _textAlignment; - UIControlContentVerticalAlignment _verticalAlignment; - - UILineBreakMode _lineBreakMode; -} - -@property (nonatomic, retain) UIFont* font; -@property (nonatomic, retain) UIColor* color; - -@property (nonatomic, retain) UIColor* shadowColor; -@property (nonatomic) CGSize shadowOffset; - -@property (nonatomic) CGFloat minimumFontSize; -@property (nonatomic) NSInteger numberOfLines; - -@property (nonatomic) UITextAlignment textAlignment; -@property (nonatomic) UIControlContentVerticalAlignment verticalAlignment; - -@property (nonatomic) UILineBreakMode lineBreakMode; - -+ (TTTextStyle*)styleWithFont:(UIFont*)font next:(TTStyle*)next; -+ (TTTextStyle*)styleWithColor:(UIColor*)color next:(TTStyle*)next; -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color next:(TTStyle*)next; -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color - textAlignment:(UITextAlignment)textAlignment next:(TTStyle*)next; -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color - shadowColor:(UIColor*)shadowColor shadowOffset:(CGSize)shadowOffset - next:(TTStyle*)next; -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color - minimumFontSize:(CGFloat)minimumFontSize - shadowColor:(UIColor*)shadowColor shadowOffset:(CGSize)shadowOffset - next:(TTStyle*)next; -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color - minimumFontSize:(CGFloat)minimumFontSize - shadowColor:(UIColor*)shadowColor shadowOffset:(CGSize)shadowOffset - textAlignment:(UITextAlignment)textAlignment - verticalAlignment:(UIControlContentVerticalAlignment)verticalAlignment - lineBreakMode:(UILineBreakMode)lineBreakMode numberOfLines:(NSInteger)numberOfLines - next:(TTStyle*)next; - -@end diff --git a/src/Three20Style/Headers/Three20Style+Additions.h b/src/Three20Style/Headers/Three20Style+Additions.h deleted file mode 100644 index 2c7cc08aed..0000000000 --- a/src/Three20Style/Headers/Three20Style+Additions.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/Three20Style.h" - -// Additions -#import "Three20Style/UIColorAdditions.h" -#import "Three20Style/UIFontAdditions.h" -#import "Three20Style/UIImageAdditions.h" diff --git a/src/Three20Style/Headers/Three20Style.h b/src/Three20Style/Headers/Three20Style.h deleted file mode 100644 index ec8e87a640..0000000000 --- a/src/Three20Style/Headers/Three20Style.h +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Core -#import "Three20Core/Three20Core.h" - -// Network -#import "Three20Network/Three20Network.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTPosition.h" - -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/TTDefaultStyleSheet+DragRefreshHeader.h" -#import "Three20Style/TTLayout.h" -#import "Three20Style/TTFlowLayout.h" -#import "Three20Style/TTGridLayout.h" - -// Shapes -#import "Three20Style/TTShape.h" -#import "Three20Style/TTRectangleShape.h" -#import "Three20Style/TTRoundedRectangleShape.h" -#import "Three20Style/TTRoundedRightArrowShape.h" -#import "Three20Style/TTRoundedLeftArrowShape.h" -#import "Three20Style/TTSpeechBubbleShape.h" - -// Styles -#import "Three20Style/TTStyle.h" -#import "Three20Style/TTStyleDelegate.h" -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTContentStyle.h" -#import "Three20Style/TTPartStyle.h" -#import "Three20Style/TTShapeStyle.h" -#import "Three20Style/TTInsetStyle.h" -#import "Three20Style/TTBoxStyle.h" -#import "Three20Style/TTTextStyle.h" -#import "Three20Style/TTImageStyle.h" -#import "Three20Style/TTMaskStyle.h" -#import "Three20Style/TTBlendStyle.h" -#import "Three20Style/TTSolidFillStyle.h" -#import "Three20Style/TTLinearGradientFillStyle.h" -#import "Three20Style/TTReflectiveFillStyle.h" -#import "Three20Style/TTShadowStyle.h" -#import "Three20Style/TTInnerShadowStyle.h" -#import "Three20Style/TTSolidBorderStyle.h" -#import "Three20Style/TTHighlightBorderStyle.h" -#import "Three20Style/TTFourBorderStyle.h" -#import "Three20Style/TTBevelBorderStyle.h" -#import "Three20Style/TTLinearGradientBorderStyle.h" - -#import "Three20Style/TTStyledText.h" -#import "Three20Style/TTStyledTextDelegate.h" - -// Styled nodes -#import "Three20Style/TTStyledNode.h" -#import "Three20Style/TTStyledTextNode.h" -#import "Three20Style/TTStyledElement.h" -#import "Three20Style/TTStyledBlock.h" -#import "Three20Style/TTStyledInline.h" -#import "Three20Style/TTStyledInlineBlock.h" -#import "Three20Style/TTStyledBoldNode.h" -#import "Three20Style/TTStyledItalicNode.h" -#import "Three20Style/TTStyledLinkNode.h" -#import "Three20Style/TTStyledButtonNode.h" -#import "Three20Style/TTStyledImageNode.h" -#import "Three20Style/TTStyledLineBreakNode.h" - -// Styled frames -#import "Three20Style/TTStyledFrame.h" -#import "Three20Style/TTStyledBoxFrame.h" -#import "Three20Style/TTStyledInlineFrame.h" -#import "Three20Style/TTStyledTextFrame.h" -#import "Three20Style/TTStyledImageFrame.h" - -#import "Three20Style/TTStyledTextParser.h" diff --git a/src/Three20Style/Headers/Three20Style_Prefix.pch b/src/Three20Style/Headers/Three20Style_Prefix.pch deleted file mode 100644 index 28f5d8f8f2..0000000000 --- a/src/Three20Style/Headers/Three20Style_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Three20Core' target in the 'Three20Core' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/src/Three20Style/Headers/UIColorAdditions.h b/src/Three20Style/Headers/UIColorAdditions.h deleted file mode 100644 index d60ce12cf9..0000000000 --- a/src/Three20Style/Headers/UIColorAdditions.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIColor (TTCategory) - -/** - * Accepted ranges: - * hue: 0.0 - 360.0 - * saturation: 0.0 - 1.0 - * value: 0.0 - 1.0 - * alpha: 0.0 - 1.0 - */ -+ (UIColor*)colorWithHue:(CGFloat)h saturation:(CGFloat)s value:(CGFloat)v alpha:(CGFloat)a; - -/** - * Accepted ranges: - * hue: 0.0 - 1.0 - * saturation: 0.0 - 1.0 - * value: 0.0 - 1.0 - */ -- (UIColor*)multiplyHue:(CGFloat)hd saturation:(CGFloat)sd value:(CGFloat)vd; - -- (UIColor*)addHue:(CGFloat)hd saturation:(CGFloat)sd value:(CGFloat)vd; - -/** - * Returns a new UIColor with the given alpha. - */ -- (UIColor*)copyWithAlpha:(CGFloat)newAlpha; - -/** - * Uses multiplyHue:saturation:value:alpha: to create a lighter version of the color. - */ -- (UIColor*)highlight; - -/** - * Uses multiplyHue:saturation:value:alpha: to create a darker version of the color. - */ -- (UIColor*)shadow; - -- (CGFloat)hue; - -- (CGFloat)saturation; - -- (CGFloat)value; - -@end diff --git a/src/Three20Style/Headers/UIFontAdditions.h b/src/Three20Style/Headers/UIFontAdditions.h deleted file mode 100644 index 0d87fbb82d..0000000000 --- a/src/Three20Style/Headers/UIFontAdditions.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIFont (TTCategory) - -/** - * Gets the height of a line of text with this font. - * - * Why this isn't part of UIFont is beyond me. This is the height you would expect to get - * by calling sizeWithFont. - * - * App Store-safe method declaration. - * Hurrah for broken static code analysis. - */ -- (CGFloat)ttLineHeight; - -@end diff --git a/src/Three20Style/Headers/UIImageAdditions.h b/src/Three20Style/Headers/UIImageAdditions.h deleted file mode 100644 index 7dcbf8eed9..0000000000 --- a/src/Three20Style/Headers/UIImageAdditions.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIImage (TTCategory) - -/* - * Resizes an image. Optionally rotates the image based on imageOrientation. - */ -- (UIImage*)transformWidth:(CGFloat)width height:(CGFloat)height rotate:(BOOL)rotate; - -/** - * Returns a CGRect positioned within rect given the contentMode. - */ -- (CGRect)convertRect:(CGRect)rect withContentMode:(UIViewContentMode)contentMode; - -/** - * Draws the image using content mode rules. - */ -- (void)drawInRect:(CGRect)rect contentMode:(UIViewContentMode)contentMode; - -/** - * Draws the image as a rounded rectangle. - */ -- (void)drawInRect:(CGRect)rect radius:(CGFloat)radius; -- (void)drawInRect:(CGRect)rect radius:(CGFloat)radius contentMode:(UIViewContentMode)contentMode; - -@end diff --git a/src/Three20Style/Sources/TTBevelBorderStyle.m b/src/Three20Style/Sources/TTBevelBorderStyle.m deleted file mode 100644 index de152dfbb7..0000000000 --- a/src/Three20Style/Sources/TTBevelBorderStyle.m +++ /dev/null @@ -1,168 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTBevelBorderStyle.h" - -// Style -#import "Three20Style/TTShape.h" -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/UIColorAdditions.h" - -// Style (private) -#import "Three20Style/private/TTStyleInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTBevelBorderStyle - -@synthesize highlight = _highlight; -@synthesize shadow = _shadow; -@synthesize width = _width; -@synthesize lightSource = _lightSource; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _width = 1; - _lightSource = kDefaultLightSource; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_highlight); - TT_RELEASE_SAFELY(_shadow); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBevelBorderStyle*)styleWithColor:(UIColor*)color width:(CGFloat)width next:(TTStyle*)next { - return [self styleWithHighlight:[color highlight] shadow:[color shadow] width:width - lightSource:kDefaultLightSource next:next]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBevelBorderStyle*)styleWithHighlight:(UIColor*)highlight - shadow:(UIColor*)shadowColor - width:(CGFloat)width - lightSource:(NSInteger)lightSource - next:(TTStyle*)next { - TTBevelBorderStyle* style = [[[TTBevelBorderStyle alloc] initWithNext:next] autorelease]; - style.highlight = highlight; - style.shadow = shadowColor; - style.width = width; - style.lightSource = lightSource; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGRect strokeRect = CGRectInset(context.frame, _width/2, _width/2); - [context.shape openPath:strokeRect]; - - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSetLineWidth(ctx, _width); - - UIColor* topColor = _lightSource >= 0 && _lightSource <= 180 ? _highlight : _shadow; - UIColor* leftColor = _lightSource >= 90 && _lightSource <= 270 - ? _highlight : _shadow; - UIColor* bottomColor = _lightSource >= 180 && _lightSource <= 360 || _lightSource == 0 - ? _highlight : _shadow; - UIColor* rightColor = (_lightSource >= 270 && _lightSource <= 360) - || (_lightSource >= 0 && _lightSource <= 90) - ? _highlight : _shadow; - - CGRect rect = context.frame; - - [context.shape addTopEdgeToPath:strokeRect lightSource:_lightSource]; - if (topColor) { - [topColor setStroke]; - - rect.origin.y += _width; - rect.size.height -= _width; - - } else { - [[UIColor clearColor] setStroke]; - } - CGContextStrokePath(ctx); - - [context.shape addRightEdgeToPath:strokeRect lightSource:_lightSource]; - if (rightColor) { - [rightColor setStroke]; - - rect.size.width -= _width; - - } else { - [[UIColor clearColor] setStroke]; - } - CGContextStrokePath(ctx); - - [context.shape addBottomEdgeToPath:strokeRect lightSource:_lightSource]; - if (bottomColor) { - [bottomColor setStroke]; - - rect.size.height -= _width; - - } else { - [[UIColor clearColor] setStroke]; - } - CGContextStrokePath(ctx); - - [context.shape addLeftEdgeToPath:strokeRect lightSource:_lightSource]; - if (leftColor) { - [leftColor setStroke]; - - rect.origin.x += _width; - rect.size.width -= _width; - - } else { - [[UIColor clearColor] setStroke]; - } - CGContextStrokePath(ctx); - - CGContextRestoreGState(ctx); - - context.frame = rect; - return [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTBlendStyle.m b/src/Three20Style/Sources/TTBlendStyle.m deleted file mode 100644 index b45a29a8b6..0000000000 --- a/src/Three20Style/Sources/TTBlendStyle.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTBlendStyle.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTBlendStyle - -@synthesize blendMode = _blendMode; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _blendMode = kCGBlendModeNormal; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBlendStyle*)styleWithBlend:(CGBlendMode)blendMode next:(TTStyle*)next { - TTBlendStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.blendMode = blendMode; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - if (_blendMode) { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - CGContextSetBlendMode(ctx, _blendMode); - - [self.next draw:context]; - CGContextRestoreGState(ctx); - - } else { - return [self.next draw:context]; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTBoxStyle.m b/src/Three20Style/Sources/TTBoxStyle.m deleted file mode 100644 index 2d75cb9d17..0000000000 --- a/src/Three20Style/Sources/TTBoxStyle.m +++ /dev/null @@ -1,129 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTBoxStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" - -// Core -#import "Three20Core/TTGlobalCoreRects.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTBoxStyle - -@synthesize margin = _margin; -@synthesize padding = _padding; -@synthesize minSize = _minSize; -@synthesize position = _position; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _margin = UIEdgeInsetsZero; - _padding = UIEdgeInsetsZero; - _minSize = CGSizeZero; - _position = TTPositionStatic; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBoxStyle*)styleWithMargin:(UIEdgeInsets)margin next:(TTStyle*)next { - TTBoxStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.margin = margin; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBoxStyle*)styleWithPadding:(UIEdgeInsets)padding next:(TTStyle*)next { - TTBoxStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.padding = padding; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBoxStyle*)styleWithFloats:(TTPosition)position next:(TTStyle*)next { - TTBoxStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.position = position; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBoxStyle*)styleWithMargin:(UIEdgeInsets)margin padding:(UIEdgeInsets)padding - next:(TTStyle*)next { - TTBoxStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.margin = margin; - style.padding = padding; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBoxStyle*)styleWithMargin:(UIEdgeInsets)margin padding:(UIEdgeInsets)padding - minSize:(CGSize)minSize position:(TTPosition)position next:(TTStyle*)next { - TTBoxStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.margin = margin; - style.padding = padding; - style.minSize = minSize; - style.position = position; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - context.contentFrame = TTRectInset(context.contentFrame, _padding); - [self.next draw:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context { - size.width += _padding.left + _padding.right; - size.height += _padding.top + _padding.bottom; - - if (_next) { - return [self.next addToSize:size context:context]; - - } else { - return size; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTContentStyle.m b/src/Three20Style/Sources/TTContentStyle.m deleted file mode 100644 index 040ef4ac32..0000000000 --- a/src/Three20Style/Sources/TTContentStyle.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTContentStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTStyleDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTContentStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTContentStyle*)styleWithNext:(TTStyle*)next { - return [[[self alloc] initWithNext:next] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - if ([context.delegate respondsToSelector:@selector(drawLayer:withStyle:)]) { - [context.delegate drawLayer:context withStyle:self]; - context.didDrawContent = YES; - } - - [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTDefaultStyleSheet.m b/src/Three20Style/Sources/TTDefaultStyleSheet.m deleted file mode 100644 index 052d11cf9c..0000000000 --- a/src/Three20Style/Sources/TTDefaultStyleSheet.m +++ /dev/null @@ -1,1191 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTDefaultStyleSheet.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyle.h" -#import "Three20Style/UIColorAdditions.h" -#import "Three20Style/TTDefaultStyleSheet+DragRefreshHeader.h" - -// - Styles -#import "Three20Style/TTInsetStyle.h" -#import "Three20Style/TTShapeStyle.h" -#import "Three20Style/TTSolidFillStyle.h" -#import "Three20Style/TTTextStyle.h" -#import "Three20Style/TTImageStyle.h" -#import "Three20Style/TTSolidBorderStyle.h" -#import "Three20Style/TTShadowStyle.h" -#import "Three20Style/TTInnerShadowStyle.h" -#import "Three20Style/TTBevelBorderStyle.h" -#import "Three20Style/TTLinearGradientFillStyle.h" -#import "Three20Style/TTFourBorderStyle.h" -#import "Three20Style/TTLinearGradientBorderStyle.h" -#import "Three20Style/TTReflectiveFillStyle.h" -#import "Three20Style/TTBoxStyle.h" -#import "Three20Style/TTPartStyle.h" -#import "Three20Style/TTContentStyle.h" -#import "Three20Style/TTBlendStyle.h" - -// - Shapes -#import "Three20Style/TTRectangleShape.h" -#import "Three20Style/TTRoundedRectangleShape.h" -#import "Three20Style/TTRoundedLeftArrowShape.h" -#import "Three20Style/TTRoundedRightArrowShape.h" - -// Network -#import "Three20Network/TTGlobalNetwork.h" -#import "Three20Network/TTURLCache.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTDefaultStyleSheet - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)linkText:(UIControlState)state { - if (state == UIControlStateHighlighted) { - return - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-3, -4, -3, -4) next: - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:4.5] next: - [TTSolidFillStyle styleWithColor:[UIColor colorWithWhite:0.75 alpha:1] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(3, 4, 3, 4) next: - [TTTextStyle styleWithColor:self.linkTextColor next:nil]]]]]; - - } else { - return - [TTTextStyle styleWithColor:self.linkTextColor next:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)linkHighlighted { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:4.5] next: - [TTSolidFillStyle styleWithColor:[UIColor colorWithWhite:0 alpha:0.25] next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)thumbView:(UIControlState)state { - if (state & UIControlStateHighlighted) { - return - [TTImageStyle styleWithImageURL:nil defaultImage:nil - contentMode:UIViewContentModeScaleAspectFill size:CGSizeZero next: - [TTSolidBorderStyle styleWithColor:RGBACOLOR(0,0,0,0.2) width:1 next: - [TTSolidFillStyle styleWithColor:RGBACOLOR(0,0,0,0.5) next:nil]]]; - - } else { - return - [TTImageStyle styleWithImageURL:nil defaultImage:nil - contentMode:UIViewContentModeScaleAspectFill size:CGSizeZero next: - [TTSolidBorderStyle styleWithColor:RGBACOLOR(0,0,0,0.2) width:1 next:nil]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)toolbarButton:(UIControlState)state { - return [self toolbarButtonForState:state - shape:[TTRoundedRectangleShape shapeWithRadius:4.5] - tintColor:TTSTYLEVAR(toolbarTintColor) - font:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)toolbarBackButton:(UIControlState)state { - return - [self toolbarButtonForState:state - shape:[TTRoundedLeftArrowShape shapeWithRadius:4.5] - tintColor:TTSTYLEVAR(toolbarTintColor) - font:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)toolbarForwardButton:(UIControlState)state { - return - [self toolbarButtonForState:state - shape:[TTRoundedRightArrowShape shapeWithRadius:4.5] - tintColor:TTSTYLEVAR(toolbarTintColor) - font:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)toolbarRoundButton:(UIControlState)state { - return - [self toolbarButtonForState:state - shape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] - tintColor:TTSTYLEVAR(toolbarTintColor) - font:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)blackToolbarButton:(UIControlState)state { - return - [self toolbarButtonForState:state - shape:[TTRoundedRectangleShape shapeWithRadius:4.5] - tintColor:RGBCOLOR(10, 10, 10) - font:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)grayToolbarButton:(UIControlState)state { - return - [self toolbarButtonForState:state - shape:[TTRoundedRectangleShape shapeWithRadius:4.5] - tintColor:RGBCOLOR(40, 40, 40) - font:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)blackToolbarForwardButton:(UIControlState)state { - return - [self toolbarButtonForState:state - shape:[TTRoundedRightArrowShape shapeWithRadius:4.5] - tintColor:RGBCOLOR(10, 10, 10) - font:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)blackToolbarRoundButton:(UIControlState)state { - return - [self toolbarButtonForState:state - shape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] - tintColor:RGBCOLOR(10, 10, 10) - font:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)searchTextField { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(1, 0, 1, 0) next: - [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0.4) blur:0 offset:CGSizeMake(0, 1) next: - [TTSolidFillStyle styleWithColor:TTSTYLEVAR(backgroundColor) next: - [TTInnerShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.4) blur:3 offset:CGSizeMake(0, 2) next: - [TTBevelBorderStyle styleWithHighlight:RGBACOLOR(0,0,0,0.25) shadow:RGBACOLOR(0,0,0,0.4) - width:1 lightSource:270 next:nil]]]]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)searchBar { - UIColor* color = TTSTYLEVAR(searchBarTintColor); - UIColor* highlight = [color multiplyHue:0 saturation:0 value:1.2]; - UIColor* shadowColor = [color multiplyHue:0 saturation:0 value:0.82]; - return - [TTLinearGradientFillStyle styleWithColor1:highlight color2:color next: - [TTFourBorderStyle styleWithTop:nil right:nil bottom:shadowColor left:nil width:1 next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)searchBarBottom { - UIColor* color = TTSTYLEVAR(searchBarTintColor); - UIColor* highlight = [color multiplyHue:0 saturation:0 value:1.2]; - UIColor* shadowColor = [color multiplyHue:0 saturation:0 value:0.82]; - return - [TTLinearGradientFillStyle styleWithColor1:highlight color2:color next: - [TTFourBorderStyle styleWithTop:shadowColor right:nil bottom:nil left:nil width:1 next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)blackSearchBar { - UIColor* highlight = [UIColor colorWithWhite:1 alpha:0.05]; - UIColor* mid = [UIColor colorWithWhite:0.4 alpha:0.6]; - UIColor* shadowColor = [UIColor colorWithWhite:0 alpha:0.8]; - return - [TTLinearGradientFillStyle styleWithColor1:mid color2:shadowColor next: - [TTFourBorderStyle styleWithTop:nil right:nil bottom:shadowColor left:nil width:1 next: - [TTFourBorderStyle styleWithTop:nil right:nil bottom:highlight left:nil width:1 next:nil]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tableHeader { - UIColor* color = TTSTYLEVAR(tableHeaderTintColor); - UIColor* highlight = [color multiplyHue:0 saturation:0 value:1.1]; - return - [TTLinearGradientFillStyle styleWithColor1:highlight color2:color next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-1, 0, 0, 0) next: - [TTFourBorderStyle styleWithTop:nil right:nil bottom:RGBACOLOR(0,0,0,0.15) - left:nil width:1 next:nil]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)pickerCell:(UIControlState)state { - if (state & UIControlStateSelected) { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(1, 1, 1, 1) next: - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(79, 144, 255) - color2:RGBCOLOR(49, 90, 255) next: - [TTFourBorderStyle styleWithTop:RGBCOLOR(53, 94, 255) - right:RGBCOLOR(53, 94, 255) bottom:RGBCOLOR(53, 94, 255) - left:RGBCOLOR(53, 94, 255) width:1 next:nil]]]]; - - } else { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(1, 1, 1, 1) next: - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(221, 231, 248) - color2:RGBACOLOR(188, 206, 241, 1) next: - [TTLinearGradientBorderStyle styleWithColor1:RGBCOLOR(161, 187, 283) - color2:RGBCOLOR(118, 130, 214) width:1 next:nil]]]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)searchTableShadow { - return - [TTLinearGradientFillStyle styleWithColor1:RGBACOLOR(0, 0, 0, 0.18) - color2:[UIColor clearColor] next: - [TTFourBorderStyle styleWithTop:RGBCOLOR(130, 130, 130) right:nil bottom:nil left:nil - width: 1 next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)blackBezel { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:10] next: - [TTSolidFillStyle styleWithColor:RGBACOLOR(0, 0, 0, 0.7) next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)whiteBezel { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:10] next: - [TTSolidFillStyle styleWithColor:RGBCOLOR(255, 255, 255) next: - [TTSolidBorderStyle styleWithColor:RGBCOLOR(178, 178, 178) width:1 next:nil]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)blackBanner { - return - [TTSolidFillStyle styleWithColor:RGBACOLOR(0, 0, 0, 0.5) next: - [TTFourBorderStyle styleWithTop:RGBCOLOR(0, 0, 0) right:nil bottom:nil left: nil width:1 next: - [TTFourBorderStyle styleWithTop:[UIColor colorWithWhite:1 alpha:0.2] right:nil bottom:nil - left: nil width:1 next:nil]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)badgeWithFontSize:(CGFloat)fontSize { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(1, 1, 1, 1) next: - [TTShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.8) blur:3 offset:CGSizeMake(0, 4) next: - [TTReflectiveFillStyle styleWithColor:RGBCOLOR(221, 17, 27) next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-1, -1, -1, -1) next: - [TTSolidBorderStyle styleWithColor:[UIColor whiteColor] width:2 next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(1, 7, 2, 7) next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:fontSize] - color:[UIColor whiteColor] next:nil]]]]]]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)miniBadge { - return [self badgeWithFontSize:12]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)badge { - return [self badgeWithFontSize:15]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)largeBadge { - return [self badgeWithFontSize:17]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabBar { - UIColor* border = [TTSTYLEVAR(tabBarTintColor) multiplyHue:0 saturation:0 value:0.7]; - return - [TTSolidFillStyle styleWithColor:TTSTYLEVAR(tabBarTintColor) next: - [TTFourBorderStyle styleWithTop:nil right:nil bottom:border left:nil width:1 next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabStrip { - UIColor* border = [TTSTYLEVAR(tabTintColor) multiplyHue:0 saturation:0 value:0.4]; - return - [TTReflectiveFillStyle styleWithColor:TTSTYLEVAR(tabTintColor) next: - [TTFourBorderStyle styleWithTop:nil right:nil bottom:border left:nil width:1 next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGrid { - UIColor* color = TTSTYLEVAR(tabTintColor); - UIColor* lighter = [color multiplyHue:1 saturation:0.9 value:1.1]; - - UIColor* highlight = RGBACOLOR(255, 255, 255, 0.7); - UIColor* shadowColor = [color multiplyHue:1 saturation:1.1 value:0.86]; - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0,-1,-1,-2) next: - [TTShadowStyle styleWithColor:highlight blur:1 offset:CGSizeMake(0, 1) next: - [TTLinearGradientFillStyle styleWithColor1:lighter color2:color next: - [TTSolidBorderStyle styleWithColor:shadowColor width:1 next:nil]]]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTabImage:(UIControlState)state { - return - [TTImageStyle styleWithImageURL:nil defaultImage:nil contentMode:UIViewContentModeLeft - size:CGSizeZero next:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTab:(UIControlState)state corner:(short)corner { - TTShape* shape = nil; - if (corner == 1) { - shape = [TTRoundedRectangleShape shapeWithTopLeft:8 topRight:0 bottomRight:0 bottomLeft:0]; - - } else if (corner == 2) { - shape = [TTRoundedRectangleShape shapeWithTopLeft:0 topRight:8 bottomRight:0 bottomLeft:0]; - - } else if (corner == 3) { - shape = [TTRoundedRectangleShape shapeWithTopLeft:0 topRight:0 bottomRight:8 bottomLeft:0]; - - } else if (corner == 4) { - shape = [TTRoundedRectangleShape shapeWithTopLeft:0 topRight:0 bottomRight:0 bottomLeft:8]; - - } else if (corner == 5) { - shape = [TTRoundedRectangleShape shapeWithTopLeft:8 topRight:0 bottomRight:0 bottomLeft:8]; - - } else if (corner == 6) { - shape = [TTRoundedRectangleShape shapeWithTopLeft:0 topRight:8 bottomRight:8 bottomLeft:0]; - - } else { - shape = [TTRectangleShape shape]; - } - - UIColor* highlight = RGBACOLOR(255, 255, 255, 0.7); - UIColor* shadowColor = [TTSTYLEVAR(tabTintColor) multiplyHue:1 saturation:1.1 value:0.88]; - - if (state == UIControlStateSelected) { - return - [TTShapeStyle styleWithShape:shape next: - [TTSolidFillStyle styleWithColor:RGBCOLOR(150, 168, 191) next: - [TTInnerShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.6) blur:3 offset:CGSizeMake(0, 0) next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(11, 10, 9, 10) next: - [TTPartStyle styleWithName:@"image" style:[self tabGridTabImage:state] next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:11] color:RGBCOLOR(255, 255, 255) - minimumFontSize:8 shadowColor:RGBACOLOR(0,0,0,0.1) shadowOffset:CGSizeMake(-1,-1) - next:nil]]]]]]; - - } else { - return - [TTShapeStyle styleWithShape:shape next: - [TTBevelBorderStyle styleWithHighlight:highlight - shadow:shadowColor - width:1 - lightSource:125 next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(11, 10, 9, 10) next: - [TTPartStyle styleWithName:@"image" style:[self tabGridTabImage:state] next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:11] color:self.linkTextColor - minimumFontSize:8 shadowColor:[UIColor colorWithWhite:255 alpha:0.9] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTabTopLeft:(UIControlState)state { - return [self tabGridTab:state corner:1]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTabTopRight:(UIControlState)state { - return [self tabGridTab:state corner:2]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTabBottomRight:(UIControlState)state { - return [self tabGridTab:state corner:3]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTabBottomLeft:(UIControlState)state { - return [self tabGridTab:state corner:4]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTabLeft:(UIControlState)state { - return [self tabGridTab:state corner:5]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTabRight:(UIControlState)state { - return [self tabGridTab:state corner:6]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabGridTabCenter:(UIControlState)state { - return [self tabGridTab:state corner:0]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tab:(UIControlState)state { - if (state == UIControlStateSelected) { - UIColor* border = [TTSTYLEVAR(tabBarTintColor) multiplyHue:0 saturation:0 value:0.7]; - - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithTopLeft:4.5 topRight:4.5 - bottomRight:0 bottomLeft:0] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(5, 1, 0, 1) next: - [TTReflectiveFillStyle styleWithColor:TTSTYLEVAR(tabTintColor) next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-1, -1, 0, -1) next: - [TTFourBorderStyle styleWithTop:border right:border bottom:nil left:border width:1 next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(6, 12, 2, 12) next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:14] color:TTSTYLEVAR(textColor) - minimumFontSize:8 shadowColor:[UIColor colorWithWhite:1 alpha:0.8] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]]]; - - } else { - return - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(5, 1, 1, 1) next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(6, 12, 2, 12) next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:14] color:[UIColor whiteColor] - minimumFontSize:8 shadowColor:[UIColor colorWithWhite:0 alpha:0.6] - shadowOffset:CGSizeMake(0, -1) next:nil]]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabRound:(UIControlState)state { - if (state == UIControlStateSelected) { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(9, 1, 8, 1) next: - [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0.8) blur:0 offset:CGSizeMake(0, 1) next: - [TTReflectiveFillStyle styleWithColor:TTSTYLEVAR(tabBarTintColor) next: - [TTInnerShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.3) blur:1 offset:CGSizeMake(1, 1) next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-1, -1, -1, -1) next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(0, 10, 0, 10) next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:13] color:[UIColor whiteColor] - minimumFontSize:8 shadowColor:[UIColor colorWithWhite:0 alpha:0.5] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]]]]; - - } else { - return - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(0, 10, 0, 10) next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:13] color:self.linkTextColor - minimumFontSize:8 shadowColor:[UIColor colorWithWhite:1 alpha:0.9] - shadowOffset:CGSizeMake(0, -1) next:nil]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabOverflowLeft { - UIImage* image = TTIMAGE(@"bundle://Three20.bundle/images/overflowLeft.png"); - TTImageStyle *style = [TTImageStyle styleWithImage:image next:nil]; - style.contentMode = UIViewContentModeCenter; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)tabOverflowRight { - UIImage* image = TTIMAGE(@"bundle://Three20.bundle/images/overflowRight.png"); - TTImageStyle *style = [TTImageStyle styleWithImage:image next:nil]; - style.contentMode = UIViewContentModeCenter; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)rounded { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next: - [TTContentStyle styleWithNext:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)postTextEditor { - return - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(6, 5, 6, 5) next: - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:15] next: - [TTSolidFillStyle styleWithColor:[UIColor whiteColor] next:nil]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)photoCaption { - return - [TTSolidFillStyle styleWithColor:[UIColor colorWithWhite:0 alpha:0.5] next: - [TTFourBorderStyle styleWithTop:RGBACOLOR(0, 0, 0, 0.5) width:1 next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(8, 8, 8, 8) next: - [TTTextStyle styleWithFont: TTSTYLEVAR(photoCaptionFont) - color: TTSTYLEVAR(photoCaptionTextColor) - minimumFontSize: 0 - shadowColor: TTSTYLEVAR(photoCaptionTextShadowColor) - shadowOffset: TTSTYLEVAR(photoCaptionTextShadowOffset) - textAlignment: UITextAlignmentCenter - verticalAlignment: UIControlContentVerticalAlignmentCenter - lineBreakMode: UILineBreakModeTailTruncation - numberOfLines: 6 - next: nil]]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)photoStatusLabel { - return - [TTSolidFillStyle styleWithColor:[UIColor colorWithWhite:0 alpha:0.5] next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(20, 8, 20, 8) next: - [TTTextStyle styleWithFont:TTSTYLEVAR(tableFont) color:RGBCOLOR(200, 200, 200) - minimumFontSize:0 shadowColor:[UIColor colorWithWhite:0 alpha:0.9] - shadowOffset:CGSizeMake(0, -1) next:nil]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)pageDot:(UIControlState)state { - if (state == UIControlStateSelected) { - return [self pageDotWithColor:[UIColor whiteColor]]; - - } else { - return [self pageDotWithColor:RGBCOLOR(77, 77, 77)]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)launcherButton:(UIControlState)state { - return - [TTPartStyle styleWithName:@"image" style:TTSTYLESTATE(launcherButtonImage:, state) next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:11] color:RGBCOLOR(180, 180, 180) - minimumFontSize:11 shadowColor:nil - shadowOffset:CGSizeZero next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)launcherButtonImage:(UIControlState)state { - TTStyle* style = - [TTBoxStyle styleWithMargin:UIEdgeInsetsMake(-7, 0, 11, 0) next: - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:8] next: - [TTImageStyle styleWithImageURL:nil defaultImage:nil contentMode:UIViewContentModeCenter - size:CGSizeZero next:nil]]]; - - if (state == UIControlStateHighlighted || state == UIControlStateSelected) { - [style addStyle: - [TTBlendStyle styleWithBlend:kCGBlendModeSourceAtop next: - [TTSolidFillStyle styleWithColor:RGBACOLOR(0,0,0,0.5) next:nil]]]; - } - - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)launcherCloseButtonImage:(UIControlState)state { - return - [TTBoxStyle styleWithMargin:UIEdgeInsetsMake(-2, 0, 0, 0) next: - [TTImageStyle styleWithImageURL:nil defaultImage:nil contentMode:UIViewContentModeCenter - size:CGSizeMake(10,10) next:nil]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)launcherCloseButton:(UIControlState)state { - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:TT_ROUNDED] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(1, 1, 1, 1) next: - [TTShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.5) blur:2 offset:CGSizeMake(0, 3) next: - [TTSolidFillStyle styleWithColor:[UIColor blackColor] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(-1, -1, -1, -1) next: - [TTSolidBorderStyle styleWithColor:[UIColor whiteColor] width:2 next: - [TTPartStyle styleWithName:@"image" style:TTSTYLE(launcherCloseButtonImage:) next: - nil]]]]]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)launcherPageDot:(UIControlState)state { - return [self pageDot:state]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)textBar { - return - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(237, 239, 241) - color2:RGBCOLOR(206, 208, 212) next: - [TTFourBorderStyle styleWithTop:RGBCOLOR(187, 189, 190) - right:nil bottom:nil left:nil width:1 next: - [TTFourBorderStyle styleWithTop:RGBCOLOR(255, 255, 255) - right:nil bottom:nil left:nil width:1 - next:nil]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)textBarFooter { - return - [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(206, 208, 212) - color2:RGBCOLOR(184, 186, 190) next: - [TTFourBorderStyle styleWithTop:RGBCOLOR(161, 161, 161) - right:nil bottom:nil left:nil width:1 next: - [TTFourBorderStyle styleWithTop:RGBCOLOR(230, 232, 235) - right:nil bottom:nil left:nil width:1 - next:nil]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)textBarTextField { - return - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(6, 0, 3, 6) next: - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:12.5] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(1, 0, 1, 0) next: - [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0.4) blur:0 offset:CGSizeMake(0, 1) next: - [TTSolidFillStyle styleWithColor:TTSTYLEVAR(backgroundColor) next: - [TTInnerShadowStyle styleWithColor:RGBACOLOR(0,0,0,0.4) blur:3 offset:CGSizeMake(0, 2) next: - [TTBevelBorderStyle styleWithHighlight:RGBACOLOR(0,0,0,0.25) shadow:RGBACOLOR(0,0,0,0.4) - width:1 lightSource:270 next:nil]]]]]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)textBarPostButton:(UIControlState)state { - UIColor* fillColor = state == UIControlStateHighlighted - ? RGBCOLOR(19, 61, 126) - : RGBCOLOR(31, 100, 206); - UIColor* textColor = state == UIControlStateDisabled - ? RGBACOLOR(255, 255, 255, 0.5) - : RGBCOLOR(255, 255, 255); - return - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:13] next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(2, 0, 1, 0) next: - [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0.5) blur:0 offset:CGSizeMake(0, 1) next: - [TTReflectiveFillStyle styleWithColor:fillColor next: - [TTLinearGradientBorderStyle styleWithColor1:fillColor - color2:RGBCOLOR(14, 83, 187) width:1 next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0, -1, 0, -1) next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(8, 9, 8, 9) next: - [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:15] - color:textColor shadowColor:[UIColor colorWithWhite:0 alpha:0.3] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]]]]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// public colors - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Common styles - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)textColor { - return [UIColor blackColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)highlightedTextColor { - return [UIColor whiteColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return [UIFont systemFontOfSize:14]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)backgroundColor { - return [UIColor whiteColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)navigationBarTintColor { - return RGBCOLOR(119, 140, 168); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)toolbarTintColor { - return RGBCOLOR(109, 132, 162); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)searchBarTintColor { - return RGBCOLOR(200, 200, 200); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Tables - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tablePlainBackgroundColor { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableGroupedBackgroundColor { - return [UIColor groupTableViewBackgroundColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)searchTableBackgroundColor { - return RGBCOLOR(235, 235, 235); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)searchTableSeparatorColor { - return [UIColor colorWithWhite:0.85 alpha:1]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Table Items - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)linkTextColor { - return RGBCOLOR(87, 107, 149); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)timestampTextColor { - return RGBCOLOR(36, 112, 216); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)moreLinkTextColor { - return RGBCOLOR(36, 112, 216); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Table Headers - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableHeaderTextColor { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableHeaderShadowColor { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)tableHeaderShadowOffset { - return CGSizeMake(0, 1); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableHeaderTintColor { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Photo Captions - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)photoCaptionTextColor { - return [UIColor whiteColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)photoCaptionTextShadowColor { - return [UIColor colorWithWhite:0 alpha:0.9]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)photoCaptionTextShadowOffset { - return CGSizeMake(0, 1); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Unsorted - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)screenBackgroundColor { - return [UIColor colorWithWhite:0 alpha:0.8]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableActivityTextColor { - return RGBCOLOR(99, 109, 125); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableErrorTextColor { - return RGBCOLOR(96, 103, 111); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableSubTextColor { - return RGBCOLOR(79, 89, 105); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableTitleTextColor { - return RGBCOLOR(99, 109, 125); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tabBarTintColor { - return RGBCOLOR(119, 140, 168); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tabTintColor { - return RGBCOLOR(228, 230, 235); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)messageFieldTextColor { - return [UIColor colorWithWhite:0.5 alpha:1]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)messageFieldSeparatorColor { - return [UIColor colorWithWhite:0.7 alpha:1]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)thumbnailBackgroundColor { - return [UIColor colorWithWhite:0.95 alpha:1]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)postButtonColor { - return RGBCOLOR(117, 144, 181); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// public fonts - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)buttonFont { - return [UIFont boldSystemFontOfSize:12]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableFont { - return [UIFont boldSystemFontOfSize:17]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableSmallFont { - return [UIFont boldSystemFontOfSize:15]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableTitleFont { - return [UIFont boldSystemFontOfSize:13]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableTimestampFont { - return [UIFont systemFontOfSize:13]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableButtonFont { - return [UIFont boldSystemFontOfSize:13]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableSummaryFont { - return [UIFont systemFontOfSize:17]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableHeaderPlainFont { - return [UIFont boldSystemFontOfSize:16]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableHeaderGroupedFont { - return [UIFont boldSystemFontOfSize:18]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat) tableBannerViewHeight { - return 22; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)photoCaptionFont { - return [UIFont boldSystemFontOfSize:12]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)messageFont { - return [UIFont systemFontOfSize:15]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)errorTitleFont { - return [UIFont boldSystemFontOfSize:18]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)errorSubtitleFont { - return [UIFont boldSystemFontOfSize:12]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)activityLabelFont { - return [UIFont systemFontOfSize:17]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)activityBannerFont { - return [UIFont boldSystemFontOfSize:11]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITableViewCellSelectionStyle)tableSelectionStyle { - return UITableViewCellSelectionStyleBlue; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)toolbarButtonColorWithTintColor:(UIColor*)color forState:(UIControlState)state { - if (state & UIControlStateHighlighted || state & UIControlStateSelected) { - if (color.value < 0.2) { - return [color addHue:0 saturation:0 value:0.2]; - - } else if (color.saturation > 0.3) { - return [color multiplyHue:1 saturation:1 value:0.4]; - - } else { - return [color multiplyHue:1 saturation:2.3 value:0.64]; - } - - } else { - if (color.saturation < 0.5) { - return [color multiplyHue:1 saturation:1.6 value:0.97]; - - } else { - return [color multiplyHue:1 saturation:1.25 value:0.75]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)toolbarButtonTextColorForState:(UIControlState)state { - if (state & UIControlStateDisabled) { - return [UIColor colorWithWhite:1 alpha:0.4]; - - } else { - return [UIColor whiteColor]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)selectionFillStyle:(TTStyle*)next { - return [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(5,140,245) - color2:RGBCOLOR(1,93,230) next:next]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)toolbarButtonForState:(UIControlState)state shape:(TTShape*)shape - tintColor:(UIColor*)tintColor font:(UIFont*)font { - UIColor* stateTintColor = [self toolbarButtonColorWithTintColor:tintColor forState:state]; - UIColor* stateTextColor = [self toolbarButtonTextColorForState:state]; - - return - [TTShapeStyle styleWithShape:shape next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(2, 0, 1, 0) next: - [TTShadowStyle styleWithColor:RGBACOLOR(255,255,255,0.18) blur:0 offset:CGSizeMake(0, 1) next: - [TTReflectiveFillStyle styleWithColor:stateTintColor next: - [TTBevelBorderStyle styleWithHighlight:[stateTintColor multiplyHue:1 saturation:0.9 value:0.7] - shadow:[stateTintColor multiplyHue:1 saturation:0.5 value:0.6] - width:1 lightSource:270 next: - [TTInsetStyle styleWithInset:UIEdgeInsetsMake(0, -1, 0, -1) next: - [TTBevelBorderStyle styleWithHighlight:nil shadow:RGBACOLOR(0,0,0,0.15) - width:1 lightSource:270 next: - [TTBoxStyle styleWithPadding:UIEdgeInsetsMake(8, 8, 8, 8) next: - [TTImageStyle styleWithImageURL:nil defaultImage:nil - contentMode:UIViewContentModeScaleToFill size:CGSizeZero next: - [TTTextStyle styleWithFont:font - color:stateTextColor shadowColor:[UIColor colorWithWhite:0 alpha:0.4] - shadowOffset:CGSizeMake(0, -1) next:nil]]]]]]]]]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)pageDotWithColor:(UIColor*)color { - return - [TTBoxStyle styleWithMargin:UIEdgeInsetsMake(0,0,0,10) padding:UIEdgeInsetsMake(6,6,0,0) next: - [TTShapeStyle styleWithShape:[TTRoundedRectangleShape shapeWithRadius:2.5] next: - [TTSolidFillStyle styleWithColor:color next:nil]]]; -} - - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTDefaultStyleSheet (TTDragRefreshHeader) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableRefreshHeaderLastUpdatedFont { - return [UIFont systemFontOfSize:12.0f]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableRefreshHeaderStatusFont { - return [UIFont boldSystemFontOfSize:14.0f]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableRefreshHeaderBackgroundColor { - return RGBCOLOR(226, 231, 237); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableRefreshHeaderTextColor { - return RGBCOLOR(109, 128, 153); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableRefreshHeaderTextShadowColor { - return [[UIColor whiteColor] colorWithAlphaComponent:0.9]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)tableRefreshHeaderTextShadowOffset { - return CGSizeMake(0.0f, 1.0f); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)tableRefreshHeaderArrowImage { - return TTIMAGE(@"bundle://Three20.bundle/images/blueArrow.png"); -} - - -@end diff --git a/src/Three20Style/Sources/TTFlowLayout.m b/src/Three20Style/Sources/TTFlowLayout.m deleted file mode 100644 index e7af371dbe..0000000000 --- a/src/Three20Style/Sources/TTFlowLayout.m +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTFlowLayout.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTFlowLayout - -@synthesize padding = _padding; -@synthesize spacing = _spacing; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)layoutSubviews:(NSArray*)subviews forView:(UIView*)view { - CGFloat x = _padding, y = _padding; - CGFloat maxX = 0, rowHeight = 0; - CGFloat maxWidth = view.frame.size.width - _padding*2; - for (UIView* subview in subviews) { - if (x > _padding && x + subview.frame.size.width > maxWidth) { - x = _padding; - y += rowHeight + _spacing; - rowHeight = 0; - } - subview.frame = CGRectMake(x, y, subview.frame.size.width, subview.frame.size.height); - x += subview.frame.size.width + _spacing; - if (x > maxX) { - maxX = x; - } - if (subview.frame.size.height > rowHeight) { - rowHeight = subview.frame.size.height; - } - } - - return CGSizeMake(maxX+_padding, y+rowHeight+_padding); -} - - -@end diff --git a/src/Three20Style/Sources/TTFourBorderStyle.m b/src/Three20Style/Sources/TTFourBorderStyle.m deleted file mode 100644 index 7ced93b285..0000000000 --- a/src/Three20Style/Sources/TTFourBorderStyle.m +++ /dev/null @@ -1,179 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTFourBorderStyle.h" - -// Style -#import "Three20Style/TTShape.h" -#import "Three20Style/TTStyleContext.h" - -// Style (private) -#import "Three20Style/private/TTStyleInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTFourBorderStyle - -@synthesize top = _top; -@synthesize right = _right; -@synthesize bottom = _bottom; -@synthesize left = _left; -@synthesize width = _width; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _width = 1; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_top); - TT_RELEASE_SAFELY(_right); - TT_RELEASE_SAFELY(_bottom); - TT_RELEASE_SAFELY(_left); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTFourBorderStyle*)styleWithTop:(UIColor*)top right:(UIColor*)right bottom:(UIColor*)bottom - left:(UIColor*)left width:(CGFloat)width next:(TTStyle*)next { - TTFourBorderStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.top = top; - style.right = right; - style.bottom = bottom; - style.left = left; - style.width = width; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTFourBorderStyle*)styleWithTop:(UIColor*)top width:(CGFloat)width next:(TTStyle*)next { - TTFourBorderStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.top = top; - style.width = width; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTFourBorderStyle*)styleWithRight:(UIColor*)right width:(CGFloat)width next:(TTStyle*)next { - TTFourBorderStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.right = right; - style.width = width; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTFourBorderStyle*)styleWithBottom:(UIColor*)bottom width:(CGFloat)width next:(TTStyle*)next { - TTFourBorderStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.bottom = bottom; - style.width = width; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTFourBorderStyle*)styleWithLeft:(UIColor*)left width:(CGFloat)width next:(TTStyle*)next { - TTFourBorderStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.left = left; - style.width = width; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGRect rect = context.frame; - CGRect strokeRect = CGRectInset(rect, _width/2, _width/2); - [context.shape openPath:strokeRect]; - - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSetLineWidth(ctx, _width); - - [context.shape addTopEdgeToPath:strokeRect lightSource:kDefaultLightSource]; - if (_top) { - [_top setStroke]; - - } else { - [[UIColor clearColor] setStroke]; - } - CGContextStrokePath(ctx); - - [context.shape addRightEdgeToPath:strokeRect lightSource:kDefaultLightSource]; - if (_right) { - [_right setStroke]; - - } else { - [[UIColor clearColor] setStroke]; - } - CGContextStrokePath(ctx); - - [context.shape addBottomEdgeToPath:strokeRect lightSource:kDefaultLightSource]; - if (_bottom) { - [_bottom setStroke]; - - } else { - [[UIColor clearColor] setStroke]; - } - CGContextStrokePath(ctx); - - [context.shape addLeftEdgeToPath:strokeRect lightSource:kDefaultLightSource]; - if (_left) { - [_left setStroke]; - - } else { - [[UIColor clearColor] setStroke]; - } - CGContextStrokePath(ctx); - - CGContextRestoreGState(ctx); - - context.frame = CGRectMake(rect.origin.x + (_left ? _width : 0), - rect.origin.y + (_top ? _width : 0), - rect.size.width - ((_left ? _width : 0) + (_right ? _width : 0)), - rect.size.height - ((_top ? _width : 0) + (_bottom ? _width : 0))); - return [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTGlobalStyle.m b/src/Three20Style/Sources/TTGlobalStyle.m deleted file mode 100644 index cb081cfa01..0000000000 --- a/src/Three20Style/Sources/TTGlobalStyle.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTGlobalStyle.h" - -const CGFloat ttkRounded = -1; diff --git a/src/Three20Style/Sources/TTGridLayout.m b/src/Three20Style/Sources/TTGridLayout.m deleted file mode 100644 index 724c0cd847..0000000000 --- a/src/Three20Style/Sources/TTGridLayout.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTGridLayout.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTGridLayout - -@synthesize columnCount = _columnCount; -@synthesize padding = _padding; -@synthesize spacing = _spacing; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - _columnCount = 1; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)layoutSubviews:(NSArray*)subviews forView:(UIView*)view { - CGFloat innerWidth = (view.frame.size.width - _padding*2); - CGFloat width = ceil(innerWidth / _columnCount); - CGFloat rowHeight = 0; - - CGFloat x = _padding, y = _padding; - CGFloat maxX = 0, lastHeight = 0; - NSInteger column = 0; - for (UIView* subview in subviews) { - if (column % _columnCount == 0) { - x = _padding; - y += rowHeight + _spacing; - } - CGSize size = [subview sizeThatFits:CGSizeMake(width, 0)]; - rowHeight = size.height; - subview.frame = CGRectMake(x, y, width, size.height); - x += subview.frame.size.width + _spacing; - if (x > maxX) { - maxX = x; - } - lastHeight = subview.frame.size.height; - ++column; - } - - return CGSizeMake(maxX+_padding, y+lastHeight+_padding); -} - - -@end diff --git a/src/Three20Style/Sources/TTHighlightBorderStyle.m b/src/Three20Style/Sources/TTHighlightBorderStyle.m deleted file mode 100644 index 05099b2ce7..0000000000 --- a/src/Three20Style/Sources/TTHighlightBorderStyle.m +++ /dev/null @@ -1,110 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTHighlightBorderStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTShape.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTHighlightBorderStyle - -@synthesize color = _color; -@synthesize highlightColor = _highlightColor; -@synthesize width = _width; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _width = 1; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_color); - TT_RELEASE_SAFELY(_highlightColor); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTHighlightBorderStyle*)styleWithColor:(UIColor*)color highlightColor:(UIColor*)highlightColor - width:(CGFloat)width next:(TTStyle*)next { - TTHighlightBorderStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.color = color; - style.highlightColor = highlightColor; - style.width = width; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - - { - CGRect strokeRect = CGRectInset(context.frame, _width/2, _width/2); - strokeRect.size.height-=2; - strokeRect.origin.y++; - [context.shape addToPath:strokeRect]; - - [_highlightColor setStroke]; - CGContextSetLineWidth(ctx, _width); - CGContextStrokePath(ctx); - } - - { - CGRect strokeRect = CGRectInset(context.frame, _width/2, _width/2); - strokeRect.size.height-=2; - [context.shape addToPath:strokeRect]; - - [_color setStroke]; - CGContextSetLineWidth(ctx, _width); - CGContextStrokePath(ctx); - } - - context.frame = CGRectInset(context.frame, _width, _width * 2); - return [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTImageStyle.m b/src/Three20Style/Sources/TTImageStyle.m deleted file mode 100644 index d4e7c5c129..0000000000 --- a/src/Three20Style/Sources/TTImageStyle.m +++ /dev/null @@ -1,218 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTImageStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTStyleDelegate.h" -#import "Three20Style/TTShape.h" -#import "Three20Style/UIImageAdditions.h" - -// Network -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTImageStyle - -@synthesize imageURL = _imageURL; -@synthesize image = _image; -@synthesize defaultImage = _defaultImage; -@synthesize contentMode = _contentMode; -@synthesize size = _size; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _contentMode = UIViewContentModeScaleToFill; - _size = CGSizeZero; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_imageURL); - TT_RELEASE_SAFELY(_image); - TT_RELEASE_SAFELY(_defaultImage); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTImageStyle*)styleWithImageURL:(NSString*)imageURL next:(TTStyle*)next { - TTImageStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.imageURL = imageURL; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTImageStyle*)styleWithImageURL:(NSString*)imageURL defaultImage:(UIImage*)defaultImage - next:(TTStyle*)next { - TTImageStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.imageURL = imageURL; - style.defaultImage = defaultImage; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTImageStyle*)styleWithImageURL:(NSString*)imageURL - defaultImage:(UIImage*)defaultImage - contentMode:(UIViewContentMode)contentMode - size:(CGSize)size - next:(TTStyle*)next { - TTImageStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.imageURL = imageURL; - style.defaultImage = defaultImage; - style.contentMode = contentMode; - style.size = size; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTImageStyle*)styleWithImage:(UIImage*)image next:(TTStyle*)next { - TTImageStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.image = image; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTImageStyle*)styleWithImage:(UIImage*)image defaultImage:(UIImage*)defaultImage - next:(TTStyle*)next { - TTImageStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.image = image; - style.defaultImage = defaultImage; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTImageStyle*)styleWithImage:(UIImage*)image - defaultImage:(UIImage*)defaultImage - contentMode:(UIViewContentMode)contentMode - size:(CGSize)size - next:(TTStyle*)next { - TTImageStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.image = image; - style.defaultImage = defaultImage; - style.contentMode = contentMode; - style.size = size; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)imageForContext:(TTStyleContext*)context { - UIImage* image = self.image; - if (!image && [context.delegate respondsToSelector:@selector(imageForLayerWithStyle:)]) { - image = [context.delegate imageForLayerWithStyle:self]; - } - return image; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - UIImage* image = [self imageForContext:context]; - if (image) { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - CGRect rect = [image convertRect:context.contentFrame withContentMode:_contentMode]; - [context.shape addToPath:rect]; - CGContextClip(ctx); - - [image drawInRect:context.contentFrame contentMode:_contentMode]; - - CGContextRestoreGState(ctx); - } - return [self.next draw:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context { - if (_size.width || _size.height) { - size.width += _size.width; - size.height += _size.height; - - } else if (_contentMode != UIViewContentModeScaleToFill - && _contentMode != UIViewContentModeScaleAspectFill - && _contentMode != UIViewContentModeScaleAspectFit) { - UIImage* image = [self imageForContext:context]; - if (image) { - size.width += image.size.width; - size.height += image.size.height; - } - } - - if (_next) { - return [self.next addToSize:size context:context]; - - } else { - return size; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)image { - if (!_image && _imageURL) { - _image = [[[TTURLCache sharedCache] imageForURL:_imageURL] retain]; - } - - return _image; -} - - -@end diff --git a/src/Three20Style/Sources/TTInnerShadowStyle.m b/src/Three20Style/Sources/TTInnerShadowStyle.m deleted file mode 100644 index 9251dfa0ef..0000000000 --- a/src/Three20Style/Sources/TTInnerShadowStyle.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTInnerShadowStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTShape.h" - -// Core -#import "Three20Core/NSStringAdditions.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTInnerShadowStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - - [context.shape addToPath:context.frame]; - CGContextClip(ctx); - - [context.shape addInverseToPath:context.frame]; - [[UIColor whiteColor] setFill]; - - // Due to a bug in OS versions 3.2 and 4.0, the shadow appears upside-down. It pains me to - // write this, but a lot of research has failed to turn up a way to detect the flipped shadow - // programmatically - float shadowYOffset = -_offset.height; - NSString *osVersion = [UIDevice currentDevice].systemVersion; - if ([osVersion versionStringCompare:@"3.2"] != NSOrderedAscending) { - shadowYOffset = _offset.height; - } - - CGContextSetShadowWithColor(ctx, CGSizeMake(_offset.width, shadowYOffset), _blur, - _color.CGColor); - CGContextEOFillPath(ctx); - CGContextRestoreGState(ctx); - - return [self.next draw:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context { - if (_next) { - return [self.next addToSize:size context:context]; - - } else { - return size; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTInsetStyle.m b/src/Three20Style/Sources/TTInsetStyle.m deleted file mode 100644 index 842159e40f..0000000000 --- a/src/Three20Style/Sources/TTInsetStyle.m +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTInsetStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTInsetStyle - -@synthesize inset = _inset; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _inset = UIEdgeInsetsZero; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTInsetStyle*)styleWithInset:(UIEdgeInsets)inset next:(TTStyle*)next { - TTInsetStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.inset = inset; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGRect rect = context.frame; - context.frame = CGRectMake(rect.origin.x+_inset.left, rect.origin.y+_inset.top, - rect.size.width - (_inset.left + _inset.right), - rect.size.height - (_inset.top + _inset.bottom)); - [self.next draw:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)addToInsets:(UIEdgeInsets)insets forSize:(CGSize)size { - insets.top += _inset.top; - insets.right += _inset.right; - insets.bottom += _inset.bottom; - insets.left += _inset.left; - if (self.next) { - return [self.next addToInsets:insets forSize:size]; - - } else { - return insets; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTLayout.m b/src/Three20Style/Sources/TTLayout.m deleted file mode 100644 index 214bfaf745..0000000000 --- a/src/Three20Style/Sources/TTLayout.m +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTLayout.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLayout - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)layoutSubviews:(NSArray*)subviews forView:(UIView*)view { - return CGSizeZero; -} - - -@end diff --git a/src/Three20Style/Sources/TTLinearGradientBorderStyle.m b/src/Three20Style/Sources/TTLinearGradientBorderStyle.m deleted file mode 100644 index f8c7d10f2a..0000000000 --- a/src/Three20Style/Sources/TTLinearGradientBorderStyle.m +++ /dev/null @@ -1,129 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTLinearGradientBorderStyle.h" - -// Style -#import "Three20Style/TTShape.h" -#import "Three20Style/TTStyleContext.h" - -// Style (private) -#import "Three20Style/private/TTStyleInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLinearGradientBorderStyle - -@synthesize color1 = _color1; -@synthesize color2 = _color2; -@synthesize location1 = _location1; -@synthesize location2 = _location2; -@synthesize width = _width; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _location2 = 1; - _width = 1; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_color1); - TT_RELEASE_SAFELY(_color2); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTLinearGradientBorderStyle*)styleWithColor1:(UIColor*)color1 color2:(UIColor*)color2 - width:(CGFloat)width next:(TTStyle*)next { - TTLinearGradientBorderStyle* style = [[[TTLinearGradientBorderStyle alloc] initWithNext:next] - autorelease]; - style.color1 = color1; - style.color2 = color2; - style.width = width; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTLinearGradientBorderStyle*)styleWithColor1:(UIColor*)color1 location1:(CGFloat)location1 - color2:(UIColor*)color2 location2:(CGFloat)location2 - width:(CGFloat)width next:(TTStyle*)next { - TTLinearGradientBorderStyle* style = [[[TTLinearGradientBorderStyle alloc] initWithNext:next] - autorelease]; - style.color1 = color1; - style.color2 = color2; - style.width = width; - style.location1 = location1; - style.location2 = location2; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGRect rect = context.frame; - - CGContextSaveGState(ctx); - - CGRect strokeRect = CGRectInset(context.frame, _width/2, _width/2); - [context.shape addToPath:strokeRect]; - CGContextSetLineWidth(ctx, _width); - CGContextReplacePathWithStrokedPath(ctx); - CGContextClip(ctx); - - UIColor* colors[] = {_color1, _color2}; - CGFloat locations[] = {_location1, _location2}; - CGGradientRef gradient = [self newGradientWithColors:colors locations:locations count:2]; - CGContextDrawLinearGradient(ctx, gradient, CGPointMake(rect.origin.x, rect.origin.y), - CGPointMake(rect.origin.x, rect.origin.y+rect.size.height), - kCGGradientDrawsAfterEndLocation); - CGGradientRelease(gradient); - - CGContextRestoreGState(ctx); - - context.frame = CGRectInset(context.frame, _width, _width); - return [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTLinearGradientFillStyle.m b/src/Three20Style/Sources/TTLinearGradientFillStyle.m deleted file mode 100644 index e3c91e74e8..0000000000 --- a/src/Three20Style/Sources/TTLinearGradientFillStyle.m +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTLinearGradientFillStyle.h" - -// Style -#import "Three20Style/TTShape.h" -#import "Three20Style/TTStyleContext.h" - -// Style (private) -#import "Three20Style/private/TTStyleInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLinearGradientFillStyle - -@synthesize color1 = _color1; -@synthesize color2 = _color2; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_color1); - TT_RELEASE_SAFELY(_color2); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTLinearGradientFillStyle*)styleWithColor1:(UIColor*)color1 color2:(UIColor*)color2 - next:(TTStyle*)next { - TTLinearGradientFillStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.color1 = color1; - style.color2 = color2; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGRect rect = context.frame; - - CGContextSaveGState(ctx); - [context.shape addToPath:rect]; - CGContextClip(ctx); - - UIColor* colors[] = {_color1, _color2}; - CGGradientRef gradient = [self newGradientWithColors:colors count:2]; - CGContextDrawLinearGradient(ctx, gradient, CGPointMake(rect.origin.x, rect.origin.y), - CGPointMake(rect.origin.x, rect.origin.y+rect.size.height), - kCGGradientDrawsAfterEndLocation); - CGGradientRelease(gradient); - - CGContextRestoreGState(ctx); - - return [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTMaskStyle.m b/src/Three20Style/Sources/TTMaskStyle.m deleted file mode 100644 index cf97a016fe..0000000000 --- a/src/Three20Style/Sources/TTMaskStyle.m +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTMaskStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTMaskStyle - -@synthesize mask = _mask; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_mask); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTMaskStyle*)styleWithMask:(UIImage*)mask next:(TTStyle*)next { - TTMaskStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.mask = mask; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - if (_mask) { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - - // Translate context upside-down to invert the clip-to-mask, which turns the mask upside down - CGContextTranslateCTM(ctx, 0, context.frame.size.height); - CGContextScaleCTM(ctx, 1.0, -1.0); - - CGRect maskRect = CGRectMake(0, 0, _mask.size.width, _mask.size.height); - CGContextClipToMask(ctx, maskRect, _mask.CGImage); - - [self.next draw:context]; - CGContextRestoreGState(ctx); - - } else { - return [self.next draw:context]; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTPartStyle.m b/src/Three20Style/Sources/TTPartStyle.m deleted file mode 100644 index 04837acd6e..0000000000 --- a/src/Three20Style/Sources/TTPartStyle.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTPartStyle.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTPartStyle - -@synthesize name = _name; -@synthesize style = _style; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_name); - TT_RELEASE_SAFELY(_style); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTPartStyle*)styleWithName:(NSString*)name style:(TTStyle*)stylez next:(TTStyle*)next { - TTPartStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.name = name; - style.style = stylez; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - [self.next draw:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawPart:(TTStyleContext*)context { - [_style draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTRectangleShape.m b/src/Three20Style/Sources/TTRectangleShape.m deleted file mode 100644 index 3a8de73a3a..0000000000 --- a/src/Three20Style/Sources/TTRectangleShape.m +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTRectangleShape.h" - -static TTRectangleShape* sharedRectangleShape = nil; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTRectangleShape - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTRectangleShape*)shape { - if (!sharedRectangleShape) { - sharedRectangleShape = [[TTRectangleShape alloc] init]; - } - return sharedRectangleShape; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addToPath:(CGRect)rect { - [self openPath:rect]; - - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextAddRect(context, CGRectMake(0, 0, rect.size.width, rect.size.height)); - - [self closePath:rect]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addInverseToPath:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - - CGFloat width = 5; - CGRect shadowRect = CGRectMake(-width, -width, fw+width*2, fh+width*2); - CGMutablePathRef path = CGPathCreateMutable(); - CGPathAddRect(path, nil, shadowRect); - CGPathCloseSubpath(path); - - CGPathAddRect(path, nil, rect); - CGPathCloseSubpath(path); - - [self openPath:rect]; - CGContextAddPath(context, path); - [self closePath:rect]; - - CGPathRelease(path); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTopEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - - CGContextMoveToPoint(context, 0, 0); - CGContextAddLineToPoint(context, fw, 0); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRightEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - - CGContextMoveToPoint(context, fw, 0); - CGContextAddLineToPoint(context, fw, fh); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addBottomEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - - CGContextMoveToPoint(context, fw, fh); - CGContextAddLineToPoint(context, 0, fh); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addLeftEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fh = rect.size.height; - - CGContextMoveToPoint(context, 0, fh); - CGContextAddLineToPoint(context, 0, 0); -} - - -@end diff --git a/src/Three20Style/Sources/TTReflectiveFillStyle.m b/src/Three20Style/Sources/TTReflectiveFillStyle.m deleted file mode 100644 index 9da92aa895..0000000000 --- a/src/Three20Style/Sources/TTReflectiveFillStyle.m +++ /dev/null @@ -1,123 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTReflectiveFillStyle.h" - -// Style -#import "Three20Style/TTShape.h" -#import "Three20Style/TTStyleContext.h" - -// Style (private) -#import "Three20Style/private/TTStyleInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTReflectiveFillStyle - -@synthesize color = _color; -@synthesize withBottomHighlight = _withBottomHighlight; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_color); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTReflectiveFillStyle*)styleWithColor:(UIColor*)color next:(TTStyle*)next { - TTReflectiveFillStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.color = color; - style.withBottomHighlight = NO; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTReflectiveFillStyle*)styleWithColor:(UIColor*)color - withBottomHighlight:(BOOL)withBottomHighlight next:(TTStyle*)next { - TTReflectiveFillStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.color = color; - style.withBottomHighlight = withBottomHighlight; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGRect rect = context.frame; - - CGContextSaveGState(ctx); - [context.shape addToPath:rect]; - CGContextClip(ctx); - - // Draw the background color - [_color setFill]; - CGContextFillRect(ctx, rect); - - // The highlights are drawn using an overlayed, semi-transparent gradient. - // The values here are absolutely arbitrary. They were nabbed by inspecting the colors of - // the "Delete Contact" button in the Contacts app. - UIColor* topStartHighlight = [UIColor colorWithWhite:1.0 alpha:0.685]; - UIColor* topEndHighlight = [UIColor colorWithWhite:1.0 alpha:0.13]; - UIColor* clearColor = [UIColor colorWithWhite:1.0 alpha:0.0]; - - UIColor* botEndHighlight; - if ( _withBottomHighlight ) { - botEndHighlight = [UIColor colorWithWhite:1.0 alpha:0.27]; - - } else { - botEndHighlight = clearColor; - } - - UIColor* colors[] = { - topStartHighlight, topEndHighlight, - clearColor, - clearColor, botEndHighlight}; - CGFloat locations[] = {0, 0.5, 0.5, 0.6, 1.0}; - - CGGradientRef gradient = [self newGradientWithColors:colors locations:locations count:5]; - CGContextDrawLinearGradient(ctx, gradient, CGPointMake(rect.origin.x, rect.origin.y), - CGPointMake(rect.origin.x, rect.origin.y+rect.size.height), 0); - CGGradientRelease(gradient); - - CGContextRestoreGState(ctx); - - return [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTRoundedLeftArrowShape.m b/src/Three20Style/Sources/TTRoundedLeftArrowShape.m deleted file mode 100644 index bdee2e3f78..0000000000 --- a/src/Three20Style/Sources/TTRoundedLeftArrowShape.m +++ /dev/null @@ -1,179 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTRoundedLeftArrowShape.h" - -// Style (private) -#import "Three20Style/private/TTShapeInternal.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTRoundedLeftArrowShape - -@synthesize radius = _radius; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTRoundedLeftArrowShape*)shapeWithRadius:(CGFloat)radius { - TTRoundedLeftArrowShape* shape = [[[TTRoundedLeftArrowShape alloc] init] autorelease]; - shape.radius = radius; - return shape; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addToPath:(CGRect)rect { - [self openPath:rect]; - - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = radius*kArrowRadius; - - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextMoveToPoint(context, 0, floor(fh/2)); - CGContextAddArcToPoint(context, point, 0, floor(fw-radius), 0, radius2); - CGContextAddArcToPoint(context, fw, 0, fw, floor(radius), radius); - CGContextAddArcToPoint(context, fw, fh, floor(point+radius2), fh, radius); - CGContextAddArcToPoint(context, point, fh, 0, floor(fh/2), radius2); - - [self closePath:rect]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addInverseToPath:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = radius*kArrowRadius; - - CGFloat width = 5; - CGRect shadowRect = CGRectMake(-width, -width, fw+width*2, fh+width*2); - CGMutablePathRef path = CGPathCreateMutable(); - CGPathAddRect(path, nil, shadowRect); - CGPathCloseSubpath(path); - - CGPathMoveToPoint(path, nil, 0, floor(fh/2)); - CGPathAddArcToPoint(path, nil, point, 0, floor(fw-radius), 0, radius2); - CGPathAddArcToPoint(path, nil, fw, 0, fw, floor(radius), radius); - CGPathAddArcToPoint(path, nil, fw, fh, floor(point+radius2), fh, radius); - CGPathAddArcToPoint(path, nil, point, fh, 0, floor(fh/2), radius2); - - [self openPath:rect]; - CGContextAddPath(context, path); - [self closePath:rect]; - - CGPathRelease(path); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTopEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = radius*kArrowRadius; - - CGContextMoveToPoint(context, 0, floor(fh/2)); - CGContextAddArcToPoint(context, point, 0, floor(fw-radius), 0, radius2); - - if (lightSource >= 0 && lightSource <= 90) { - CGContextAddLineToPoint(context, floor(fw-radius), 0); - - } else { - CGContextAddArcToPoint(context, fw, 0, fw, floor(radius), radius); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRightEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat radius = RD(_radius); - - if (lightSource >= 0 && lightSource <= 90) { - CGContextMoveToPoint(context, floor(fw-radius), 0); - CGContextAddArcToPoint(context, fw, 0, fw, floor(radius), radius); - - } else { - CGContextMoveToPoint(context, fw, radius); - CGContextAddLineToPoint(context, fw, fh-radius); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addBottomEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = _radius*kArrowRadius; - - CGContextMoveToPoint(context, fw, floor(fh-radius)); - CGContextAddArcToPoint(context, fw, fh, floor(point+radius2), fh, radius); - CGContextAddLineToPoint(context, floor(point+radius2)-1, fh); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addLeftEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = radius*kArrowRadius; - - CGContextMoveToPoint(context, floor(point+radius2), fh); - CGContextAddArcToPoint(context, point, fh, 0, floor(fh/2), radius2); - CGContextAddLineToPoint(context, 0, floor(fh/2)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)insetsForSize:(CGSize)size { - CGFloat fh = size.height/3; - return UIEdgeInsetsMake(0, floor(RD(_radius)), 0, 0); - // CGFloat fh = size.height/3; - // return UIEdgeInsetsMake(floor(RD(_radius)), floor(RD(_radius))*2, - // floor(RD(_radius)), floor(RD(_radius))); -} - - -@end diff --git a/src/Three20Style/Sources/TTRoundedRectangleShape.m b/src/Three20Style/Sources/TTRoundedRectangleShape.m deleted file mode 100644 index e373d6a20d..0000000000 --- a/src/Three20Style/Sources/TTRoundedRectangleShape.m +++ /dev/null @@ -1,179 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTRoundedRectangleShape.h" - -// Style (private) -#import "Three20Style/private/TTShapeInternal.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTRoundedRectangleShape - -@synthesize topLeftRadius = _topLeftRadius; -@synthesize topRightRadius = _topRightRadius; -@synthesize bottomRightRadius = _bottomRightRadius; -@synthesize bottomLeftRadius = _bottomLeftRadius; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTRoundedRectangleShape*)shapeWithRadius:(CGFloat)radius { - TTRoundedRectangleShape* shape = [[[TTRoundedRectangleShape alloc] init] autorelease]; - shape.topLeftRadius = shape.topRightRadius = shape.bottomRightRadius = shape.bottomLeftRadius - = radius; - return shape; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTRoundedRectangleShape*)shapeWithTopLeft:(CGFloat)topLeft topRight:(CGFloat)topRight - bottomRight:(CGFloat)bottomRight bottomLeft:(CGFloat)bottomLeft { - TTRoundedRectangleShape* shape = [[[TTRoundedRectangleShape alloc] init] autorelease]; - shape.topLeftRadius = topLeft; - shape.topRightRadius = topRight; - shape.bottomRightRadius = bottomRight; - shape.bottomLeftRadius = bottomLeft; - return shape; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addToPath:(CGRect)rect { - [self openPath:rect]; - - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextMoveToPoint(context, fw, floor(fh/2)); - CGContextAddArcToPoint(context, fw, fh, floor(fw/2), fh, RD(_bottomRightRadius)); - CGContextAddArcToPoint(context, 0, fh, 0, floor(fh/2), RD(_bottomLeftRadius)); - CGContextAddArcToPoint(context, 0, 0, floor(fw/2), 0, RD(_topLeftRadius)); - CGContextAddArcToPoint(context, fw, 0, fw, floor(fh/2), RD(_topRightRadius)); - - [self closePath:rect]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addInverseToPath:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - - CGFloat width = 5; - CGRect shadowRect = CGRectMake(-width, -width, fw+width*2, fh+width*2); - CGMutablePathRef path = CGPathCreateMutable(); - CGPathAddRect(path, nil, shadowRect); - CGPathCloseSubpath(path); - - CGPathMoveToPoint(path, nil, fw, floor(fh/2)); - CGPathAddArcToPoint(path, nil, fw, fh, floor(fw/2), fh, RD(_bottomRightRadius)); - CGPathAddArcToPoint(path, nil, 0, fh, 0, floor(fh/2), RD(_bottomLeftRadius)); - CGPathAddArcToPoint(path, nil, 0, 0, floor(fw/2), 0, RD(_topLeftRadius)); - CGPathAddArcToPoint(path, nil, fw, 0, fw, floor(fh/2), RD(_topRightRadius)); - CGPathCloseSubpath(path); - - [self openPath:rect]; - CGContextAddPath(context, path); - [self closePath:rect]; - - CGPathRelease(path); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTopEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - - if (lightSource >= 0 && lightSource <= 90) { - CGContextMoveToPoint(context, RD(_topLeftRadius), 0); - - } else { - CGContextMoveToPoint(context, 0, RD(_topLeftRadius)); - CGContextAddArcToPoint(context, 0, 0, RD(_topLeftRadius), 0, RD(_topLeftRadius)); - } - CGContextAddArcToPoint(context, fw, 0, fw, RD(_topRightRadius), RD(_topRightRadius)); - CGContextAddLineToPoint(context, fw, RD(_topRightRadius)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRightEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - - CGContextMoveToPoint(context, fw, RD(_topRightRadius)); - CGContextAddArcToPoint(context, fw, fh, fw-RD(_bottomRightRadius), fh, RD(_bottomRightRadius)); - CGContextAddLineToPoint(context, fw-RD(_bottomRightRadius), fh); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addBottomEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - - CGContextMoveToPoint(context, fw-RD(_bottomRightRadius), fh); - CGContextAddLineToPoint(context, RD(_bottomLeftRadius), fh); - CGContextAddArcToPoint(context, 0, fh, 0, fh-RD(_bottomLeftRadius), RD(_bottomLeftRadius)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addLeftEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fh = rect.size.height; - - CGContextMoveToPoint(context, 0, fh-RD(_bottomLeftRadius)); - CGContextAddLineToPoint(context, 0, RD(_topLeftRadius)); - - if (lightSource >= 0 && lightSource <= 90) { - CGContextAddArcToPoint(context, 0, 0, RD(_topLeftRadius), 0, RD(_topLeftRadius)); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -//- (UIEdgeInsets)insetsForSize:(CGSize)size { -// CGFloat fh = size.height/3; -// return UIEdgeInsetsMake(floor(MAX(RD(_topLeftRadius), RD(_topRightRadius))), -// floor(MAX(RD(_topLeftRadius), RD(_bottomLeftRadius))), -// floor(MAX(RD(_bottomLeftRadius), RD(_bottomRightRadius))), -// floor(MAX(RD(_topRightRadius), RD(_bottomRightRadius)))); -//} - - -@end diff --git a/src/Three20Style/Sources/TTRoundedRightArrowShape.m b/src/Three20Style/Sources/TTRoundedRightArrowShape.m deleted file mode 100644 index 959d2530e4..0000000000 --- a/src/Three20Style/Sources/TTRoundedRightArrowShape.m +++ /dev/null @@ -1,149 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTRoundedRightArrowShape.h" - -// Style (private) -#import "Three20Style/private/TTShapeInternal.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTRoundedRightArrowShape - -@synthesize radius = _radius; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTRoundedRightArrowShape*)shapeWithRadius:(CGFloat)radius { - TTRoundedRightArrowShape* shape = [[[TTRoundedRightArrowShape alloc] init] autorelease]; - shape.radius = radius; - return shape; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addToPath:(CGRect)rect { - [self openPath:rect]; - - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = radius*kArrowRadius; - - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextMoveToPoint(context, fw, floor(fh/2)); - CGContextAddArcToPoint(context, fw-point, fh, 0, fh, radius2); - CGContextAddArcToPoint(context, 0, fh, 0, 0, radius); - CGContextAddArcToPoint(context, 0, 0, fw-point, 0, radius); - CGContextAddArcToPoint(context, fw-point, 0, fw, floor(fh/2), radius2); - CGContextAddLineToPoint(context, fw, floor(fh/2)); - - [self closePath:rect]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTopEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = radius*kArrowRadius; - - if (lightSource >= 0 && lightSource <= 90) { - CGContextMoveToPoint(context, radius, 0); - - } else { - CGContextMoveToPoint(context, 0, radius); - CGContextAddArcToPoint(context, 0, 0, radius, 0, radius); - } - CGContextAddLineToPoint(context, fw-(point+radius2), 0); - CGContextAddArcToPoint(context, fw-point, 0, fw, floor(fh/2), radius2); - CGContextAddLineToPoint(context, fw, floor(fh/2)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRightEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = radius*kArrowRadius; - - CGContextMoveToPoint(context, fw, floor(fh/2)); - CGContextAddArcToPoint(context, fw-point, fh, fw-(point+radius2), fh, radius2); - CGContextAddLineToPoint(context, fw-(point+radius2), fh); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addBottomEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fw = rect.size.width; - CGFloat fh = rect.size.height; - CGFloat point = floor(fh/kArrowPointWidth); - CGFloat radius = RD(_radius); - CGFloat radius2 = radius*kArrowRadius; - - CGContextMoveToPoint(context, floor(fw-(point+radius2)), fh); - CGContextAddArcToPoint(context, 0, fh, 0, floor(fh-radius), radius); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addLeftEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGFloat fh = rect.size.height; - CGFloat radius = RD(_radius); - - CGContextMoveToPoint(context, 0, floor(fh-radius)); - CGContextAddLineToPoint(context, 0, floor(radius)); - - if (lightSource >= 0 && lightSource <= 90) { - CGContextAddArcToPoint(context, 0, 0, floor(radius), 0, radius); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)insetsForSize:(CGSize)size { - CGFloat fh = size.height/3; - return UIEdgeInsetsMake(0, 0, 0, floor(RD(_radius))); - // CGFloat fh = size.height/3; - // return UIEdgeInsetsMake(floor(RD(_radius)), floor(RD(_radius)), - // floor(RD(_radius)), floor(RD(_radius))*2); -} - - -@end diff --git a/src/Three20Style/Sources/TTShadowStyle.m b/src/Three20Style/Sources/TTShadowStyle.m deleted file mode 100644 index 2b45c260c6..0000000000 --- a/src/Three20Style/Sources/TTShadowStyle.m +++ /dev/null @@ -1,142 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTShadowStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTShape.h" - -// Core -#import "Three20Core/NSStringAdditions.h" -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreRects.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTShadowStyle - -@synthesize color = _color; -@synthesize blur = _blur; -@synthesize offset = _offset; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _offset = CGSizeZero; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_color); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTShadowStyle*)styleWithColor:(UIColor*)color blur:(CGFloat)blur offset:(CGSize)offset - next:(TTStyle*)next { - TTShadowStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.color = color; - style.blur = blur; - style.offset = offset; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGFloat blurSize = round(_blur / 2); - UIEdgeInsets inset = UIEdgeInsetsMake(blurSize, blurSize, blurSize, blurSize); - if (_offset.width < 0) { - inset.left += fabs(_offset.width) + blurSize*2; - inset.right -= blurSize; - - } else if (_offset.width > 0) { - inset.right += fabs(_offset.width) + blurSize*2; - inset.left -= blurSize; - } - if (_offset.height < 0) { - inset.top += fabs(_offset.height) + blurSize*2; - inset.bottom -= blurSize; - - } else if (_offset.height > 0) { - inset.bottom += fabs(_offset.height) + blurSize*2; - inset.top -= blurSize; - } - - context.frame = TTRectInset(context.frame, inset); - context.contentFrame = TTRectInset(context.contentFrame, inset); - - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - - // Due to a bug in OS versions 3.2 and 4.0, the shadow appears upside-down. It pains me to - // write this, but a lot of research has failed to turn up a way to detect the flipped shadow - // programmatically - float shadowYOffset = -_offset.height; - NSString *osVersion = [UIDevice currentDevice].systemVersion; - if ([osVersion versionStringCompare:@"3.2"] != NSOrderedAscending) { - shadowYOffset = _offset.height; - } - - [context.shape addToPath:context.frame]; - CGContextSetShadowWithColor(ctx, CGSizeMake(_offset.width, shadowYOffset), _blur, - _color.CGColor); - CGContextBeginTransparencyLayer(ctx, nil); - [self.next draw:context]; - CGContextEndTransparencyLayer(ctx); - - CGContextRestoreGState(ctx); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context { - CGFloat blurSize = round(_blur / 2); - size.width += _offset.width + (_offset.width ? blurSize : 0) + blurSize*2; - size.height += _offset.height + (_offset.height ? blurSize : 0) + blurSize*2; - - if (_next) { - return [self.next addToSize:size context:context]; - - } else { - return size; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTShape.m b/src/Three20Style/Sources/TTShape.m deleted file mode 100644 index e01c1e1c22..0000000000 --- a/src/Three20Style/Sources/TTShape.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTShape.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTShape - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)openPath:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSaveGState(context); - CGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect)); - CGContextBeginPath(context); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)closePath:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextClosePath(context); - CGContextRestoreGState(context); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)insetsForSize:(CGSize)size { - return UIEdgeInsetsZero; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTopEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRightEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addBottomEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addLeftEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addToPath:(CGRect)rect { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addInverseToPath:(CGRect)rect { -} - - -@end diff --git a/src/Three20Style/Sources/TTShapeInternal.m b/src/Three20Style/Sources/TTShapeInternal.m deleted file mode 100644 index e99334c6fa..0000000000 --- a/src/Three20Style/Sources/TTShapeInternal.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/private/TTShapeInternal.h" - -const CGFloat kArrowPointWidth = 2.8; -const CGFloat kArrowRadius = 2; - diff --git a/src/Three20Style/Sources/TTShapeStyle.m b/src/Three20Style/Sources/TTShapeStyle.m deleted file mode 100644 index 691a4a9fa8..0000000000 --- a/src/Three20Style/Sources/TTShapeStyle.m +++ /dev/null @@ -1,101 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTShapeStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTShape.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreRects.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTShapeStyle - -@synthesize shape = _shape; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_shape); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTShapeStyle*)styleWithShape:(TTShape*)shape next:(TTStyle*)next { - TTShapeStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.shape = shape; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - UIEdgeInsets shapeInsets = [_shape insetsForSize:context.frame.size]; - context.contentFrame = TTRectInset(context.contentFrame, shapeInsets); - context.shape = _shape; - [self.next draw:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)addToInsets:(UIEdgeInsets)insets forSize:(CGSize)size { - UIEdgeInsets shapeInsets = [_shape insetsForSize:size]; - insets.top += shapeInsets.top; - insets.right += shapeInsets.right; - insets.bottom += shapeInsets.bottom; - insets.left += shapeInsets.left; - - if (self.next) { - return [self.next addToInsets:insets forSize:size]; - - } else { - return insets; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context { - CGSize innerSize = [self.next addToSize:size context:context]; - UIEdgeInsets shapeInsets = [_shape insetsForSize:innerSize]; - innerSize.width += shapeInsets.left + shapeInsets.right; - innerSize.height += shapeInsets.top + shapeInsets.bottom; - - return innerSize; -} - - -@end diff --git a/src/Three20Style/Sources/TTSolidBorderStyle.m b/src/Three20Style/Sources/TTSolidBorderStyle.m deleted file mode 100644 index 94ef337a4b..0000000000 --- a/src/Three20Style/Sources/TTSolidBorderStyle.m +++ /dev/null @@ -1,94 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTSolidBorderStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTShape.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSolidBorderStyle - -@synthesize color = _color; -@synthesize width = _width; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _width = 1; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_color); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTSolidBorderStyle*)styleWithColor:(UIColor*)color width:(CGFloat)width next:(TTStyle*)next { - TTSolidBorderStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.color = color; - style.width = width; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - - CGRect strokeRect = CGRectInset(context.frame, _width/2, _width/2); - [context.shape addToPath:strokeRect]; - - [_color setStroke]; - CGContextSetLineWidth(ctx, _width); - CGContextStrokePath(ctx); - - CGContextRestoreGState(ctx); - - context.frame = CGRectInset(context.frame, _width, _width); - return [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTSolidFillStyle.m b/src/Three20Style/Sources/TTSolidFillStyle.m deleted file mode 100644 index c12a588df2..0000000000 --- a/src/Three20Style/Sources/TTSolidFillStyle.m +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTSolidFillStyle.h" - -// Style -#import "Three20Style/TTShape.h" -#import "Three20Style/TTStyleContext.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSolidFillStyle - -@synthesize color = _color; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_color); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTSolidFillStyle*)styleWithColor:(UIColor*)color next:(TTStyle*)next { - TTSolidFillStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.color = color; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - - CGContextSaveGState(ctx); - [context.shape addToPath:context.frame]; - - [_color setFill]; - CGContextFillPath(ctx); - CGContextRestoreGState(ctx); - - return [self.next draw:context]; -} - - -@end diff --git a/src/Three20Style/Sources/TTSpeechBubbleShape.m b/src/Three20Style/Sources/TTSpeechBubbleShape.m deleted file mode 100644 index e697dd3e4f..0000000000 --- a/src/Three20Style/Sources/TTSpeechBubbleShape.m +++ /dev/null @@ -1,293 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTSpeechBubbleShape.h" - -// Style (private) -#import "Three20Style/private/TTShapeInternal.h" - -static const CGFloat kInsetWidth = 5; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSpeechBubbleShape - -@synthesize radius = _radius; -@synthesize pointLocation = _pointLocation; -@synthesize pointAngle = _pointAngle; -@synthesize pointSize = _pointSize; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTSpeechBubbleShape*)shapeWithRadius:(CGFloat)radius pointLocation:(CGFloat)pointLocation - pointAngle:(CGFloat)pointAngle pointSize:(CGSize)pointSize { - TTSpeechBubbleShape* shape = [[[TTSpeechBubbleShape alloc] init] autorelease]; - shape.radius = radius; - shape.pointLocation = pointLocation; - shape.pointAngle = pointAngle; - shape.pointSize = pointSize; - return shape; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)subtractPointFromRect:(CGRect)rect { - CGFloat x = 0; - CGFloat y = 0; - CGFloat w = rect.size.width; - CGFloat h = rect.size.height; - - if ((_pointLocation >= 0 && _pointLocation < 45) - || (_pointLocation >= 315 && _pointLocation < 360)) { - if ((_pointAngle >= 270 && _pointAngle < 360) || (_pointAngle >= 0 && _pointAngle < 90)) { - x += _pointSize.width; - w -= _pointSize.width; - } - - } else if (_pointLocation >= 45 && _pointLocation < 135) { - if (_pointAngle >= 0 && _pointAngle < 180) { - y += _pointSize.height; - h -= _pointSize.height; - } - - } else if (_pointLocation >= 135 && _pointLocation < 225) { - if (_pointAngle >= 90 && _pointAngle < 270) { - w -= _pointSize.width; - } - - } else if (_pointLocation >= 225 && _pointLocation <= 315) { - if (_pointAngle >= 180 && _pointAngle < 360) { - h -= _pointSize.height; - } - } - - return CGRectMake(x, y, w, h); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTopEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CGMutablePathRef)path - reset:(BOOL)reset { - CGFloat fw = size.width; - CGFloat fh = size.height; - CGFloat pointX = 0; - - if (lightSource >= 0 && lightSource <= 90) { - if (reset) { - CGPathMoveToPoint(path, nil, RD(_radius), 0); - } - - } else { - if (reset) { - CGPathMoveToPoint(path, nil, 0, RD(_radius)); - } - CGPathAddArcToPoint(path, nil, 0, 0, RD(_radius), 0, RD(_radius)); - } - - if (_pointLocation >= 45 && _pointLocation <= 135) { - CGFloat ph = _pointAngle >= 0 && _pointAngle < 180 ? _pointSize.height : -_pointSize.height; - pointX = ((_pointLocation-45)/90) * fw; - - CGPathAddLineToPoint(path, nil, pointX-floor(_pointSize.width/2), 0); - CGPathAddLineToPoint(path, nil, pointX, -ph); - CGPathAddLineToPoint(path, nil, pointX+floor(_pointSize.width/2), 0); - } - - CGPathAddArcToPoint(path, nil, fw, 0, fw, RD(_radius), RD(_radius)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRightEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CGMutablePathRef)path - reset:(BOOL)reset { - CGFloat fw = size.width; - CGFloat fh = size.height; - - if (reset) { - CGPathMoveToPoint(path, nil, fw, RD(_radius)); - } - - CGPathAddArcToPoint(path, nil, fw, fh, fw-RD(_radius), fh, RD(_radius)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addBottomEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CGMutablePathRef)path - reset:(BOOL)reset { - CGFloat fw = size.width; - CGFloat fh = size.height; - CGFloat pointX = 0; - - if (reset) { - CGPathMoveToPoint(path, nil, fw-RD(_radius), fh); - } - - if (_pointLocation >= 225 && _pointLocation <= 315) { - CGFloat ph; - - if (_pointAngle >= 0 && _pointAngle < 180) { - ph = _pointSize.height; - - } else { - ph = -_pointSize.height; - } - - pointX = fw - (((_pointLocation-225)/90) * fw); - CGPathAddArcToPoint(path, nil, fw-RD(_radius), fh, floor(fw/2), fh, RD(_radius)); - CGPathAddLineToPoint(path, nil, pointX+floor(_pointSize.width/2), fh); - CGPathAddLineToPoint(path, nil, pointX, fh-ph); - CGPathAddLineToPoint(path, nil, pointX-floor(_pointSize.width/2), fh); - CGPathAddLineToPoint(path, nil, RD(_radius), fh); - } - - CGPathAddArcToPoint(path, nil, 0, fh, 0, fh-RD(_radius), RD(_radius)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addLeftEdge:(CGSize)size lightSource:(NSInteger)lightSource toPath:(CGMutablePathRef)path - reset:(BOOL)reset { - CGFloat fh = size.height; - - if (reset) { - CGPathMoveToPoint(path, nil, 0, fh-RD(_radius)); - } - - if (lightSource >= 0 && lightSource <= 90) { - CGPathAddArcToPoint(path, nil, 0, 0, RD(_radius), 0, RD(_radius)); - - } else { - CGPathAddLineToPoint(path, nil, 0, RD(_radius)); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addToPath:(CGSize)size path:(CGMutablePathRef)path { - [self addTopEdge:size lightSource:0 toPath:path reset:YES]; - [self addRightEdge:size lightSource:0 toPath:path reset:NO]; - [self addBottomEdge:size lightSource:0 toPath:path reset:NO]; - [self addLeftEdge:size lightSource:0 toPath:path reset:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawPath:(CGMutablePathRef)path inRect:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextTranslateCTM(context, rect.origin.x, rect.origin.y); - CGContextAddPath(context, path); - CGContextTranslateCTM(context, -rect.origin.x, -rect.origin.y); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addToPath:(CGRect)rect { - [self openPath:rect]; - - CGMutablePathRef path = CGPathCreateMutable(); - rect = [self subtractPointFromRect:rect]; - [self addToPath:rect.size path:path]; - CGPathCloseSubpath(path); - [self drawPath:path inRect:rect]; - CGPathRelease(path); - - [self closePath:rect]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addInverseToPath:(CGRect)rect { - [self openPath:rect]; - - CGMutablePathRef path = CGPathCreateMutable(); - rect = [self subtractPointFromRect:rect]; - CGRect shadowRect = CGRectMake(-kInsetWidth, -kInsetWidth, - rect.size.width+kInsetWidth*2, rect.size.height+kInsetWidth*2); - CGPathAddRect(path, nil, shadowRect); - [self addToPath:rect.size path:path]; - CGPathCloseSubpath(path); - [self drawPath:path inRect:rect]; - CGPathRelease(path); - - [self closePath:rect]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTopEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - rect = [self subtractPointFromRect:rect]; - - CGMutablePathRef path = CGPathCreateMutable(); - [self addTopEdge:rect.size lightSource:lightSource toPath:path reset:YES]; - [self drawPath:path inRect:rect]; - CGPathRelease(path); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRightEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - rect = [self subtractPointFromRect:rect]; - - CGMutablePathRef path = CGPathCreateMutable(); - [self addRightEdge:rect.size lightSource:lightSource toPath:path reset:YES]; - [self drawPath:path inRect:rect]; - CGPathRelease(path); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addBottomEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - rect = [self subtractPointFromRect:rect]; - - CGMutablePathRef path = CGPathCreateMutable(); - [self addBottomEdge:rect.size lightSource:lightSource toPath:path reset:YES]; - [self drawPath:path inRect:rect]; - CGPathRelease(path); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addLeftEdgeToPath:(CGRect)rect lightSource:(NSInteger)lightSource { - rect = [self subtractPointFromRect:rect]; - - CGMutablePathRef path = CGPathCreateMutable(); - [self addLeftEdge:rect.size lightSource:lightSource toPath:path reset:YES]; - [self drawPath:path inRect:rect]; - CGPathRelease(path); -} - - -@end diff --git a/src/Three20Style/Sources/TTStyle.m b/src/Three20Style/Sources/TTStyle.m deleted file mode 100644 index bdb72213f2..0000000000 --- a/src/Three20Style/Sources/TTStyle.m +++ /dev/null @@ -1,143 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyle.h" - -// Style -#import "Three20Style/TTPartStyle.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -#define ZEROLIMIT(_VALUE) (_VALUE < 0 ? 0 : (_VALUE > 1 ? 1 : _VALUE)) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyle - -@synthesize next = _next; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super init]) { - _next = [next retain]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNext:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_next); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)next:(TTStyle*)next { - self.next = next; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - [self.next draw:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)addToInsets:(UIEdgeInsets)insets forSize:(CGSize)size { - if (self.next) { - return [self.next addToInsets:insets forSize:size]; - - } else { - return insets; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context { - if (_next) { - return [self.next addToSize:size context:context]; - - } else { - return size; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addStyle:(TTStyle*)style { - if (_next) { - [_next addStyle:style]; - - } else { - _next = [style retain]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)firstStyleOfClass:(Class)cls { - if ([self isKindOfClass:cls]) { - return self; - - } else { - return [self.next firstStyleOfClass:cls]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)styleForPart:(NSString*)name { - TTStyle* style = self; - while (style) { - if ([style isKindOfClass:[TTPartStyle class]]) { - TTPartStyle* partStyle = (TTPartStyle*)style; - if ([partStyle.name isEqualToString:name]) { - return partStyle; - } - } - style = style.next; - } - return nil; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyleContext.m b/src/Three20Style/Sources/TTStyleContext.m deleted file mode 100644 index f09b628f17..0000000000 --- a/src/Three20Style/Sources/TTStyleContext.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyleContext.h" - -// Style -#import "Three20Style/TTRectangleShape.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyleContext - -@synthesize frame = _frame; -@synthesize contentFrame = _contentFrame; -@synthesize shape = _shape; -@synthesize font = _font; -@synthesize didDrawContent = _didDrawContent; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - _frame = CGRectZero; - _contentFrame = CGRectZero; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_shape); - TT_RELEASE_SAFELY(_font); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTShape*)shape { - if (!_shape) { - _shape = [[TTRectangleShape shape] retain]; - } - - return _shape; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyleInternal.m b/src/Three20Style/Sources/TTStyleInternal.m deleted file mode 100644 index 84836af016..0000000000 --- a/src/Three20Style/Sources/TTStyleInternal.m +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/private/TTStyleInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -const NSInteger kDefaultLightSource = 125; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -TT_FIX_CATEGORY_BUG(TTStyleInternal) - -@implementation TTStyle (TTInternal) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGGradientRef)newGradientWithColors:(UIColor**)colors locations:(CGFloat*)locations - count:(int)count { - CGFloat* components = malloc(sizeof(CGFloat)*4*count); - for (int i = 0; i < count; ++i) { - UIColor* color = colors[i]; - size_t n = CGColorGetNumberOfComponents(color.CGColor); - const CGFloat* rgba = CGColorGetComponents(color.CGColor); - if (n == 2) { - components[i*4] = rgba[0]; - components[i*4+1] = rgba[0]; - components[i*4+2] = rgba[0]; - components[i*4+3] = rgba[1]; - - } else if (n == 4) { - components[i*4] = rgba[0]; - components[i*4+1] = rgba[1]; - components[i*4+2] = rgba[2]; - components[i*4+3] = rgba[3]; - } - } - - CGContextRef context = UIGraphicsGetCurrentContext(); - CGColorSpaceRef space = CGBitmapContextGetColorSpace(context); - CGGradientRef gradient = CGGradientCreateWithColorComponents(space, components, locations, count); - free(components); - - return gradient; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGGradientRef)newGradientWithColors:(UIColor**)colors count:(int)count { - return [self newGradientWithColors:colors locations:nil count:count]; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyleSheet.m b/src/Three20Style/Sources/TTStyleSheet.m deleted file mode 100644 index b799f5abee..0000000000 --- a/src/Three20Style/Sources/TTStyleSheet.m +++ /dev/null @@ -1,134 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyleSheet.h" - -// Style -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static TTStyleSheet* gStyleSheet = nil; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyleSheet - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - [[NSNotificationCenter defaultCenter] - addObserver: self - selector: @selector(didReceiveMemoryWarning:) - name: UIApplicationDidReceiveMemoryWarningNotification - object: nil]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[NSNotificationCenter defaultCenter] - removeObserver: self - name: UIApplicationDidReceiveMemoryWarningNotification - object: nil]; - TT_RELEASE_SAFELY(_styles); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTStyleSheet*)globalStyleSheet { - if (!gStyleSheet) { - gStyleSheet = [[TTDefaultStyleSheet alloc] init]; - } - return gStyleSheet; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)setGlobalStyleSheet:(TTStyleSheet*)styleSheet { - [gStyleSheet release]; - gStyleSheet = [styleSheet retain]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSNotifications - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didReceiveMemoryWarning:(void*)object { - [self freeMemory]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)styleWithSelector:(NSString*)selector { - return [self styleWithSelector:selector forState:UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)styleWithSelector:(NSString*)selector forState:(UIControlState)state { - NSString* key = state == UIControlStateNormal - ? selector - : [NSString stringWithFormat:@"%@%d", selector, state]; - TTStyle* style = [_styles objectForKey:key]; - if (!style) { - SEL sel = NSSelectorFromString(selector); - if ([self respondsToSelector:sel]) { - style = [self performSelector:sel withObject:(id)state]; - if (style) { - if (!_styles) { - _styles = [[NSMutableDictionary alloc] init]; - } - [_styles setObject:style forKey:key]; - } - } - } - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)freeMemory { - TT_RELEASE_SAFELY(_styles); -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledBlock.m b/src/Three20Style/Sources/TTStyledBlock.m deleted file mode 100644 index 3d44179ee6..0000000000 --- a/src/Three20Style/Sources/TTStyledBlock.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledBlock.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledBlock -@end diff --git a/src/Three20Style/Sources/TTStyledBoldNode.m b/src/Three20Style/Sources/TTStyledBoldNode.m deleted file mode 100644 index 04cd272285..0000000000 --- a/src/Three20Style/Sources/TTStyledBoldNode.m +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledBoldNode.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledBoldNode - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"*%@*", _firstChild]; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledBoxFrame.m b/src/Three20Style/Sources/TTStyledBoxFrame.m deleted file mode 100644 index 2e06c26dae..0000000000 --- a/src/Three20Style/Sources/TTStyledBoxFrame.m +++ /dev/null @@ -1,140 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledBoxFrame.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTTextStyle.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledBoxFrame - -@synthesize parentFrame = _parentFrame; -@synthesize firstChildFrame = _firstChildFrame; -@synthesize style = _style; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_firstChildFrame); - TT_RELEASE_SAFELY(_style); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawSubframes { - TTStyledFrame* frame = _firstChildFrame; - while (frame) { - [frame drawInRect:frame.bounds]; - frame = frame.nextFrame; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyleDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawLayer:(TTStyleContext*)context withStyle:(TTStyle*)style { - if ([style isKindOfClass:[TTTextStyle class]]) { - TTTextStyle* textStyle = (TTTextStyle*)style; - UIFont* font = context.font; - context.font = textStyle.font; - if (textStyle.color) { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - [textStyle.color setFill]; - - [self drawSubframes]; - - CGContextRestoreGState(ctx); - - } else { - [self drawSubframes]; - } - - context.font = font; - - } else { - [self drawSubframes]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyledFrame - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return _firstChildFrame.font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawInRect:(CGRect)rect { - if (_style && !CGRectIsEmpty(_bounds)) { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - context.frame = rect; - context.contentFrame = rect; - - [_style draw:context]; - if (context.didDrawContent) { - return; - } - } - - [self drawSubframes]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledBoxFrame*)hitTest:(CGPoint)point { - if (CGRectContainsPoint(_bounds, point)) { - TTStyledBoxFrame* frame = [_firstChildFrame hitTest:point]; - return frame ? frame : self; - - } else if (_nextFrame) { - return [_nextFrame hitTest:point]; - - } else { - return nil; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledButtonNode.m b/src/Three20Style/Sources/TTStyledButtonNode.m deleted file mode 100644 index 6454f74569..0000000000 --- a/src/Three20Style/Sources/TTStyledButtonNode.m +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledButtonNode.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledButtonNode - -@synthesize URL = _URL; -@synthesize highlighted = _highlighted; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithURL:(NSString*)URL { - if (self = [self initWithText:nil URL:URL next:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithURL:(NSString*)URL next:(TTStyledNode*)nextSibling { - if (self = [self initWithText:nil URL:URL next:nextSibling]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithText:(NSString*)text URL:(NSString*)URL next:(TTStyledNode*)nextSibling { - if (self = [super initWithText:text next:nextSibling]) { - self.URL = URL; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithText:nil URL:nil next:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_URL); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"<%@>", _firstChild]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyledNode - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)performDefaultAction { - if (nil != _URL) { - // TODO (jverkoey 04/20/2010): Remove dependency on UI. - //TTOpenURL(_URL); - } -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledElement.m b/src/Three20Style/Sources/TTStyledElement.m deleted file mode 100644 index c389ccae05..0000000000 --- a/src/Three20Style/Sources/TTStyledElement.m +++ /dev/null @@ -1,208 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledElement.h" - -// Style -#import "Three20Style/TTStyledTextNode.h" - -// Style (private) -#import "Three20Style/private/TTStyledNodeInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledElement - -@synthesize firstChild = _firstChild; -@synthesize lastChild = _lastChild; -@synthesize className = _className; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithText:(NSString*)text { - if (self = [self initWithText:text next:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithText:(NSString*)text next:(TTStyledNode*)nextSibling { - if (self = [super initWithNextSibling:nextSibling]) { - if (nil != text) { - [self addChild:[[[TTStyledTextNode alloc] initWithText:text] autorelease]]; - } - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithText:nil next:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_firstChild); - TT_RELEASE_SAFELY(_className); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"%@", _firstChild]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyledNode - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)outerText { - if (_firstChild) { - NSMutableArray* strings = [NSMutableArray array]; - for (TTStyledNode* node = _firstChild; node; node = node.nextSibling) { - [strings addObject:node.outerText]; - } - return [strings componentsJoinedByString:@""]; - - } else { - return [super outerText]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)outerHTML { - NSString* html = nil; - if (_firstChild) { - html = [NSString stringWithFormat:@"
%@
", _firstChild.outerHTML]; - - } else { - html = @"
"; - } - if (_nextSibling) { - return [NSString stringWithFormat:@"%@%@", html, _nextSibling.outerHTML]; - - } else { - return html; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addChild:(TTStyledNode*)child { - if (!_firstChild) { - _firstChild = [child retain]; - _lastChild = [self findLastSibling:child]; - - } else { - _lastChild.nextSibling = child; - _lastChild = [self findLastSibling:child]; - } - child.parentNode = self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addText:(NSString*)text { - [self addChild:[[[TTStyledTextNode alloc] initWithText:text] autorelease]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)replaceChild:(TTStyledNode*)oldChild withChild:(TTStyledNode*)newChild { - if (oldChild == _firstChild) { - newChild.nextSibling = oldChild.nextSibling; - oldChild.nextSibling = nil; - newChild.parentNode = self; - if (oldChild == _lastChild) { - _lastChild = newChild; - } - [_firstChild release]; - _firstChild = [newChild retain]; - - } else { - TTStyledNode* node = _firstChild; - while (node) { - if (node.nextSibling == oldChild) { - [oldChild retain]; - if (newChild) { - newChild.nextSibling = oldChild.nextSibling; - node.nextSibling = newChild; - - } else { - node.nextSibling = oldChild.nextSibling; - } - oldChild.nextSibling = nil; - newChild.parentNode = self; - if (oldChild == _lastChild) { - _lastChild = newChild ? newChild : node; - } - [oldChild release]; - break; - } - node = node.nextSibling; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledNode*)getElementByClassName:(NSString*)className { - TTStyledNode* node = _firstChild; - while (node) { - if ([node isKindOfClass:[TTStyledElement class]]) { - TTStyledElement* element = (TTStyledElement*)node; - if ([element.className isEqualToString:className]) { - return element; - } - - TTStyledNode* found = [element getElementByClassName:className]; - if (found) { - return found; - } - } - node = node.nextSibling; - } - return nil; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledFrame.m b/src/Three20Style/Sources/TTStyledFrame.m deleted file mode 100644 index 0af921c913..0000000000 --- a/src/Three20Style/Sources/TTStyledFrame.m +++ /dev/null @@ -1,123 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledFrame.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledFrame - -@synthesize element = _element; -@synthesize nextFrame = _nextFrame; -@synthesize bounds = _bounds; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithElement:(TTStyledElement*)element { - if (self = [super init]) { - _element = element; - _bounds = CGRectZero; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_nextFrame); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)x { - return _bounds.origin.x; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setX:(CGFloat)x { - _bounds.origin.x = x; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)y { - return _bounds.origin.y; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setY:(CGFloat)y { - _bounds.origin.y = y; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)width { - return _bounds.size.width; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setWidth:(CGFloat)width { - _bounds.size.width = width; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)height { - return _bounds.size.height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHeight:(CGFloat)height { - _bounds.size.height = height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawInRect:(CGRect)rect { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledBoxFrame*)hitTest:(CGPoint)point { - return [_nextFrame hitTest:point]; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledImageFrame.m b/src/Three20Style/Sources/TTStyledImageFrame.m deleted file mode 100644 index f939240565..0000000000 --- a/src/Three20Style/Sources/TTStyledImageFrame.m +++ /dev/null @@ -1,121 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledImageFrame.h" - -// Style -#import "Three20Style/TTStyledImageNode.h" -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTShape.h" -#import "Three20Style/TTImageStyle.h" -#import "Three20Style/UIImageAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledImageFrame - -@synthesize imageNode = _imageNode; -@synthesize style = _style; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithElement:(TTStyledElement*)element node:(TTStyledImageNode*)node { - if (self = [super initWithElement:element]) { - _imageNode = node; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_style); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawImage:(CGRect)rect { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - CGContextAddRect(ctx, rect); - CGContextClip(ctx); - - UIImage* image = _imageNode.image ? _imageNode.image : _imageNode.defaultImage; - [image drawInRect:rect contentMode:UIViewContentModeScaleAspectFit]; - CGContextRestoreGState(ctx); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyleDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawLayer:(TTStyleContext*)context withStyle:(TTStyle*)style { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - [context.shape addToPath:context.frame]; - CGContextClip(ctx); - - UIViewContentMode contentMode = UIViewContentModeScaleAspectFit; - if ([style isMemberOfClass:[TTImageStyle class]]) { - TTImageStyle* imageStyle = (TTImageStyle*)style; - contentMode = imageStyle.contentMode; - } - - UIImage* image = _imageNode.image ? _imageNode.image : _imageNode.defaultImage; - [image drawInRect:context.contentFrame contentMode:contentMode]; - - CGContextRestoreGState(ctx); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawInRect:(CGRect)rect { - if (_style) { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - context.frame = rect; - context.contentFrame = rect; - - [_style draw:context]; - if (!context.didDrawContent) { - [self drawImage:rect]; - } - - } else { - [self drawImage:rect]; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledImageNode.m b/src/Three20Style/Sources/TTStyledImageNode.m deleted file mode 100644 index bc897bcb7c..0000000000 --- a/src/Three20Style/Sources/TTStyledImageNode.m +++ /dev/null @@ -1,113 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledImageNode.h" - -// Network -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledImageNode - -@synthesize URL = _URL; -@synthesize image = _image; -@synthesize defaultImage = _defaultImage; -@synthesize width = _width; -@synthesize height = _height; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithURL:(NSString*)URL { - if (self = [super initWithText:nil next:nil]) { - self.URL = URL; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithURL:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_URL); - TT_RELEASE_SAFELY(_image); - TT_RELEASE_SAFELY(_defaultImage); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"(%@)", _URL]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyledNode - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)outerHTML { - NSString* html = [NSString stringWithFormat:@"", _URL]; - if (_nextSibling) { - return [NSString stringWithFormat:@"%@%@", html, _nextSibling.outerHTML]; - - } else { - return html; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setURL:(NSString*)URL { - if (nil == _URL || ![URL isEqualToString:_URL]) { - [_URL release]; - _URL = [URL retain]; - - if (nil != _URL) { - self.image = [[TTURLCache sharedCache] imageForURL:_URL]; - - } else { - self.image = nil; - } - } -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledInline.m b/src/Three20Style/Sources/TTStyledInline.m deleted file mode 100644 index 02c232ed54..0000000000 --- a/src/Three20Style/Sources/TTStyledInline.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledInline.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledInline -@end diff --git a/src/Three20Style/Sources/TTStyledInlineBlock.m b/src/Three20Style/Sources/TTStyledInlineBlock.m deleted file mode 100644 index ac023e96ff..0000000000 --- a/src/Three20Style/Sources/TTStyledInlineBlock.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledInlineBlock.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledInlineBlock -@end diff --git a/src/Three20Style/Sources/TTStyledInlineFrame.m b/src/Three20Style/Sources/TTStyledInlineFrame.m deleted file mode 100644 index 4d00238805..0000000000 --- a/src/Three20Style/Sources/TTStyledInlineFrame.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledInlineFrame.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledInlineFrame - -@synthesize inlinePreviousFrame = _inlinePreviousFrame; -@synthesize inlineNextFrame = _inlineNextFrame; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledInlineFrame*)inlineParentFrame { - if ([_parentFrame isKindOfClass:[TTStyledInlineFrame class]]) { - return (TTStyledInlineFrame*)_parentFrame; - - } else { - return nil; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledItalicNode.m b/src/Three20Style/Sources/TTStyledItalicNode.m deleted file mode 100644 index 24cb9a3d38..0000000000 --- a/src/Three20Style/Sources/TTStyledItalicNode.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledItalicNode.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledItalicNode - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"/%@/", _firstChild]; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledLayout.m b/src/Three20Style/Sources/TTStyledLayout.m deleted file mode 100644 index 1400e1d997..0000000000 --- a/src/Three20Style/Sources/TTStyledLayout.m +++ /dev/null @@ -1,840 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledLayout.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyledFrame.h" -#import "Three20Style/TTStyleSheet.h" -#import "Three20Style/TTBoxStyle.h" -#import "Three20Style/TTTextStyle.h" -#import "Three20Style/TTStyledElement.h" -#import "Three20Style/TTStyledInlineFrame.h" -#import "Three20Style/TTStyledTextFrame.h" -#import "Three20Style/TTStyledImageFrame.h" -#import "Three20Style/UIFontAdditions.h" - -// Styled nodes -#import "Three20Style/TTStyledImageNode.h" -#import "Three20Style/TTStyledBoldNode.h" -#import "Three20Style/TTStyledItalicNode.h" -#import "Three20Style/TTStyledLinkNode.h" -#import "Three20Style/TTStyledBlock.h" -#import "Three20Style/TTStyledLineBreakNode.h" -#import "Three20Style/TTStyledTextNode.h" - -// Core -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledLayout - -@synthesize width = _width; -@synthesize height = _height; -@synthesize rootFrame = _rootFrame; -@synthesize font = _font; -@synthesize invalidImages = _invalidImages; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithRootNode:(TTStyledNode*)rootNode { - if (self = [super init]) { - _rootNode = rootNode; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithX:(CGFloat)x width:(CGFloat)width height:(CGFloat)height { - if (self = [super init]) { - _x = x; - _minX = x; - _width = width; - _height = height; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_rootFrame); - TT_RELEASE_SAFELY(_font); - TT_RELEASE_SAFELY(_boldFont); - TT_RELEASE_SAFELY(_italicFont); - TT_RELEASE_SAFELY(_linkStyle); - TT_RELEASE_SAFELY(_invalidImages); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)boldVersionOfFont:(UIFont*)font { - // XXXjoe Clearly this doesn't work if your font is not the system font - return [UIFont boldSystemFontOfSize:font.pointSize]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)italicVersionOfFont:(UIFont*)font { - // XXXjoe Clearly this doesn't work if your font is not the system font - return [UIFont italicSystemFontOfSize:font.pointSize]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledNode*)findLastNode:(TTStyledNode*)node { - TTStyledNode* lastNode = nil; - while (node) { - if ([node isKindOfClass:[TTStyledElement class]]) { - TTStyledElement* element = (TTStyledElement*)node; - lastNode = [self findLastNode:element.firstChild]; - - } else { - lastNode = node; - } - node = node.nextSibling; - } - return lastNode; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)boldFont { - if (!_boldFont) { - _boldFont = [[self boldVersionOfFont:self.font] retain]; - } - return _boldFont; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)italicFont { - if (!_italicFont) { - _italicFont = [[self italicVersionOfFont:self.font] retain]; - } - return _italicFont; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)linkStyle { - if (!_linkStyle) { - _linkStyle = [TTSTYLE(linkText:) retain]; - } - return _linkStyle; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledNode*)lastNode { - if (!_lastNode) { - _lastNode = [self findLastNode:_rootNode]; - } - return _lastNode; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)offsetFrame:(TTStyledFrame*)frame by:(CGFloat)y { - frame.y += y; - - if ([frame isKindOfClass:[TTStyledInlineFrame class]]) { - TTStyledInlineFrame* inlineFrame = (TTStyledInlineFrame*)frame; - TTStyledFrame* child = inlineFrame.firstChildFrame; - while (child) { - [self offsetFrame:child by:y]; - child = child.nextFrame; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)expandLineWidth:(CGFloat)width { - _lineWidth += width; - TTStyledInlineFrame* inlineFrame = _inlineFrame; - while (inlineFrame) { - inlineFrame.width += width; - inlineFrame = inlineFrame.inlineParentFrame; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)inflateLineHeight:(CGFloat)height { - if (height > _lineHeight) { - _lineHeight = height; - } - if (_inlineFrame) { - TTStyledInlineFrame* inlineFrame = _inlineFrame; - while (inlineFrame) { - if (height > inlineFrame.height) { - inlineFrame.height = height; - } - inlineFrame = inlineFrame.inlineParentFrame; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addFrame:(TTStyledFrame*)frame { - if (!_rootFrame) { - _rootFrame = [frame retain]; - - } else if (_topFrame) { - if (!_topFrame.firstChildFrame) { - _topFrame.firstChildFrame = frame; - - } else { - _lastFrame.nextFrame = frame; - } - - } else { - _lastFrame.nextFrame = frame; - } - _lastFrame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)pushFrame:(TTStyledBoxFrame*)frame { - [self addFrame:frame]; - frame.parentFrame = _topFrame; - _topFrame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)popFrame { - _lastFrame = _topFrame; - _topFrame = _topFrame.parentFrame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledFrame*)addContentFrame:(TTStyledFrame*)frame width:(CGFloat)width { - [self addFrame:frame]; - if (!_lineFirstFrame) { - _lineFirstFrame = frame; - } - _x += width; - return frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addContentFrame:(TTStyledFrame*)frame width:(CGFloat)width height:(CGFloat)height { - frame.bounds = CGRectMake(_x, _height, width, height); - [self addContentFrame:frame width:width]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addAbsoluteFrame:(TTStyledFrame*)frame width:(CGFloat)width height:(CGFloat)height { - frame.bounds = CGRectMake(_x, _height, width, height); - [self addFrame:frame]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledInlineFrame*)addInlineFrame:(TTStyle*)style element:(TTStyledElement*)element - width:(CGFloat)width height:(CGFloat)height { - TTStyledInlineFrame* frame = [[[TTStyledInlineFrame alloc] initWithElement:element] autorelease]; - frame.style = style; - frame.bounds = CGRectMake(_x, _height, width, height); - [self pushFrame:frame]; - if (!_lineFirstFrame) { - _lineFirstFrame = frame; - } - return frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledInlineFrame*)cloneInlineFrame:(TTStyledInlineFrame*)frame { - TTStyledInlineFrame* parent = frame.inlineParentFrame; - if (parent) { - [self cloneInlineFrame:parent]; - } - - TTStyledInlineFrame* clone = [self addInlineFrame:frame.style element:frame.element - width:0 height:0]; - clone.inlinePreviousFrame = frame; - frame.inlineNextFrame = clone; - return clone; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledFrame*)addBlockFrame:(TTStyle*)style element:(TTStyledElement*)element - width:(CGFloat)width height:(CGFloat)height { - TTStyledBoxFrame* frame = [[[TTStyledBoxFrame alloc] initWithElement:element] autorelease]; - frame.style = style; - frame.bounds = CGRectMake(_x, _height, width, height); - [self pushFrame:frame]; - return frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)checkFloats { - if (_floatHeight && _height > _floatHeight) { - _minX -= _floatLeftWidth; - _width += _floatLeftWidth+_floatRightWidth; - _floatRightWidth = 0; - _floatLeftWidth = 0; - _floatHeight = 0; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)breakLine { - if (_inlineFrame) { - TTStyledInlineFrame* inlineFrame = _inlineFrame; - while (inlineFrame) { - if (inlineFrame.style) { - TTBoxStyle* padding = [inlineFrame.style firstStyleOfClass:[TTBoxStyle class]]; - if (padding) { - TTStyledInlineFrame* inlineFrame2 = inlineFrame; - while (inlineFrame2) { - inlineFrame2.y -= padding.padding.top; - inlineFrame2.height += padding.padding.top+padding.padding.bottom; - inlineFrame2 = inlineFrame2.inlineParentFrame; - } - } - } - inlineFrame = inlineFrame.inlineParentFrame; - } - } - - // Vertically align all frames on the current line - if (_lineFirstFrame.nextFrame) { - TTStyledFrame* frame = _lineFirstFrame; - while (frame) { - // Align to the text baseline - // XXXjoe Support top, bottom, and center alignment also - if (frame.height < _lineHeight) { - UIFont* font = frame.font ? frame.font : _font; - [self offsetFrame:frame by:(_lineHeight - (frame.height - font.descender))]; - } - frame = frame.nextFrame; - } - } - - _height += _lineHeight; - [self checkFloats]; - - _lineWidth = 0; - _lineHeight = 0; - _x = _minX; - _lineFirstFrame = nil; - - if (_inlineFrame) { - while ([_topFrame isKindOfClass:[TTStyledInlineFrame class]]) { - [self popFrame]; - } - _inlineFrame = [self cloneInlineFrame:_inlineFrame]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledFrame*)addFrameForText:(NSString*)text element:(TTStyledElement*)element - node:(TTStyledTextNode*)node width:(CGFloat)width height:(CGFloat)height { - TTStyledTextFrame* frame = [[[TTStyledTextFrame alloc] initWithText:text element:element - node:node] autorelease]; - frame.font = _font; - [self addContentFrame:frame width:width height:height]; - return frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutElement:(TTStyledElement*)elt { - TTStyle* style = nil; - if (elt.className) { - TTStyle* eltStyle = [[TTStyleSheet globalStyleSheet] styleWithSelector:elt.className]; - if (eltStyle) { - style = eltStyle; - } - } - if (!style && [elt isKindOfClass:[TTStyledLinkNode class]]) { - style = self.linkStyle; - } - - // Figure out which font to use for the node - UIFont* font = nil; - TTTextStyle* textStyle = nil; - if (style) { - textStyle = [style firstStyleOfClass:[TTTextStyle class]]; - if (textStyle) { - font = textStyle.font; - } - } - if (!font) { - if ([elt isKindOfClass:[TTStyledLinkNode class]] - || [elt isKindOfClass:[TTStyledBoldNode class]]) { - font = self.boldFont; - - } else if ([elt isKindOfClass:[TTStyledItalicNode class]]) { - font = self.italicFont; - - } else { - font = self.font; - } - } - - UIFont* lastFont = _font; - self.font = font; - - TTBoxStyle* padding = style ? [style firstStyleOfClass:[TTBoxStyle class]] : nil; - - if (padding && padding.position) { - TTStyledFrame* blockFrame = [self addBlockFrame:style element:elt width:_width height:_height]; - - CGFloat contentWidth = padding.margin.left + padding.margin.right; - CGFloat contentHeight = padding.margin.top + padding.margin.bottom; - - if (elt.firstChild) { - TTStyledNode* child = elt.firstChild; - TTStyledLayout* layout = [[[TTStyledLayout alloc] initWithX:_minX - width:0 height:_height] autorelease]; - layout.font = _font; - layout.invalidImages = _invalidImages; - [layout layout:child]; - if (!_invalidImages && layout.invalidImages) { - _invalidImages = [layout.invalidImages retain]; - } - - TTStyledFrame* frame = [self addContentFrame:layout.rootFrame width:layout.width]; - - CGFloat frameHeight = layout.height - _height; - contentWidth += layout.width; - contentHeight += frameHeight; - - if (padding.position == TTPositionFloatLeft) { - frame.x += _floatLeftWidth; - _floatLeftWidth += contentWidth; - if (_height+contentHeight > _floatHeight) { - _floatHeight = contentHeight+_height; - } - _minX += contentWidth; - _width -= contentWidth; - - } else if (padding.position == TTPositionFloatRight) { - frame.x += _width - (_floatRightWidth + contentWidth); - _floatRightWidth += contentWidth; - if (_height+contentHeight > _floatHeight) { - _floatHeight = contentHeight+_height; - } - _x -= contentWidth; - _width -= contentWidth; - } - - blockFrame.width = layout.width + padding.padding.left + padding.padding.right; - blockFrame.height = frameHeight + padding.padding.top + padding.padding.bottom; - } - - } else { - CGFloat minX = _minX, width = _width, floatLeftWidth = _floatLeftWidth, - floatRightWidth = _floatRightWidth, floatHeight = _floatHeight; - BOOL isBlock = [elt isKindOfClass:[TTStyledBlock class]]; - TTStyledFrame* blockFrame = nil; - - if (isBlock) { - if (padding) { - _x += padding.margin.left; - _minX += padding.margin.left; - _width -= padding.margin.left + padding.margin.right; - _height += padding.margin.top; - } - - if (_lastFrame) { - if (!_lineHeight && [elt isKindOfClass:[TTStyledLineBreakNode class]]) { - _lineHeight = [_font ttLineHeight]; - } - [self breakLine]; - } - if (style) { - blockFrame = [self addBlockFrame:style element:elt width:_width height:_height]; - } - - } else { - if (padding) { - _x += padding.margin.left; - _height += padding.margin.top; - } - if (style) { - _inlineFrame = [self addInlineFrame:style element:elt width:0 height:0]; - } - } - - if (padding) { - if (isBlock) { - _minX += padding.padding.left; - } - _width -= padding.padding.left+padding.padding.right; - _x += padding.padding.left; - [self expandLineWidth:padding.padding.left]; - - if (isBlock) { - _height += padding.padding.top; - } - } - - if (elt.firstChild) { - [self layout:elt.firstChild container:elt]; - } - - if (isBlock) { - _minX = minX, _width = width, _floatLeftWidth = floatLeftWidth, - _floatRightWidth = floatRightWidth, _floatHeight = floatHeight; - [self breakLine]; - - if (padding) { - _height += padding.padding.bottom; - } - - blockFrame.height = _height - blockFrame.height; - - if (padding) { - if (blockFrame.height < padding.minSize.height) { - _height += padding.minSize.height - blockFrame.height; - blockFrame.height = padding.minSize.height; - } - - _height += padding.margin.bottom; - } - - } else if (!isBlock && style) { - if (padding) { - _x += padding.padding.right + padding.margin.right; - _lineWidth += padding.padding.right + padding.margin.right; - - TTStyledInlineFrame* inlineFrame = _inlineFrame; - while (inlineFrame) { - if (inlineFrame != _inlineFrame) { - inlineFrame.width += padding.margin.right; - } - inlineFrame.width += padding.padding.right; - inlineFrame.y -= padding.padding.top; - inlineFrame.height += padding.padding.top+padding.padding.bottom; - inlineFrame = inlineFrame.inlineParentFrame; - } - } - _inlineFrame = _inlineFrame.inlineParentFrame; - } - } - - self.font = lastFont; - - if (style) { - [self popFrame]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutImage:(TTStyledImageNode*)imageNode container:(TTStyledElement*)element { - UIImage* image = imageNode.image; - if (!image && imageNode.URL) { - if (!_invalidImages) { - _invalidImages = TTCreateNonRetainingArray(); - } - [_invalidImages addObject:imageNode]; - } - - TTStyle* style = imageNode.className - ? [[TTStyleSheet globalStyleSheet] styleWithSelector:imageNode.className] : nil; - TTBoxStyle* padding = style ? [style firstStyleOfClass:[TTBoxStyle class]] : nil; - - CGFloat imageWidth = imageNode.width ? imageNode.width : image.size.width; - CGFloat imageHeight = imageNode.height ? imageNode.height : image.size.height; - CGFloat contentWidth = imageWidth; - CGFloat contentHeight = imageHeight; - - if (padding && padding.position != TTPositionAbsolute) { - _x += padding.margin.left; - contentWidth += padding.margin.left + padding.margin.right; - contentHeight += padding.margin.top + padding.margin.bottom; - } - - if ((!padding || !padding.position) && (_lineWidth + contentWidth > _width)) { - if (_lineWidth) { - // The image will be placed on the next line, so create a new frame for - // the current line and mark it with a line break - [self breakLine]; - - } else { - _width = contentWidth; - } - } - - TTStyledImageFrame* frame = [[[TTStyledImageFrame alloc] initWithElement:element - node:imageNode] autorelease]; - frame.style = style; - - if (!padding || !padding.position) { - [self addContentFrame:frame width:imageWidth height:imageHeight]; - [self expandLineWidth:contentWidth]; - [self inflateLineHeight:contentHeight]; - - } else if (padding.position == TTPositionAbsolute) { - [self addAbsoluteFrame:frame width:imageWidth height:imageHeight]; - frame.x += padding.margin.left; - frame.y += padding.margin.top; - - } else if (padding.position == TTPositionFloatLeft) { - [self addContentFrame:frame width:imageWidth height:imageHeight]; - - frame.x += _floatLeftWidth; - _floatLeftWidth += contentWidth; - if (_height+contentHeight > _floatHeight) { - _floatHeight = contentHeight+_height; - } - _minX += contentWidth; - _width -= contentWidth; - - } else if (padding.position == TTPositionFloatRight) { - [self addContentFrame:frame width:imageWidth height:imageHeight]; - - frame.x += _width - (_floatRightWidth + contentWidth); - _floatRightWidth += contentWidth; - if (_height+contentHeight > _floatHeight) { - _floatHeight = contentHeight+_height; - } - _x -= contentWidth; - _width -= contentWidth; - } - - if (padding && padding.position != TTPositionAbsolute) { - frame.y += padding.margin.top; - _x += padding.margin.right; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutText:(TTStyledTextNode*)textNode container:(TTStyledElement*)element { - NSString* text = textNode.text; - NSUInteger length = text.length; - - if (!textNode.nextSibling && textNode == _rootNode) { - // This is the only node, so measure it all at once and move on - CGSize textSize = [text sizeWithFont:_font - constrainedToSize:CGSizeMake(_width, CGFLOAT_MAX) - lineBreakMode:UILineBreakModeWordWrap]; - [self addFrameForText:text element:element node:textNode width:textSize.width - height:textSize.height]; - _height += textSize.height; - return; - } - - NSCharacterSet* whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet]; - - NSInteger stringIndex = 0; - NSInteger lineStartIndex = 0; - CGFloat frameWidth = 0; - NSInteger frameStart = 0; - - while (stringIndex < length) { - // Search for the next whitespace character - NSRange searchRange = NSMakeRange(stringIndex, length - stringIndex); - NSRange spaceRange = [text rangeOfCharacterFromSet:whitespace options:0 range:searchRange]; - - // Get the word prior to the whitespace - NSRange wordRange = spaceRange.location != NSNotFound - ? NSMakeRange(searchRange.location, (spaceRange.location+1) - searchRange.location) - : NSMakeRange(searchRange.location, length - searchRange.location); - NSString* word = [text substringWithRange:wordRange]; - - // If there is no width to constrain to, then just use an infinite width, - // which will prevent any word wrapping - CGFloat availWidth = _width ? _width : CGFLOAT_MAX; - - // Measure the word and check to see if it fits on the current line - CGSize wordSize = [word sizeWithFont:_font]; - if (wordSize.width > _width) { - for (NSInteger i = 0; i < word.length; ++i) { - NSString* c = [word substringWithRange:NSMakeRange(i, 1)]; - CGSize letterSize = [c sizeWithFont:_font]; - - if (_lineWidth + letterSize.width > _width) { - NSRange lineRange = NSMakeRange(lineStartIndex, stringIndex - lineStartIndex); - if (lineRange.length) { - NSString* line = [text substringWithRange:lineRange]; - frameWidth = [[text substringWithRange:NSMakeRange(frameStart, - stringIndex - frameStart)] - sizeWithFont:_font].width; - [self addFrameForText:line element:element node:textNode width:frameWidth - height:_lineHeight ? _lineHeight : [_font ttLineHeight]]; - } - - if (_lineWidth) { - [self breakLine]; - } - - lineStartIndex = lineRange.location + lineRange.length; - frameStart = stringIndex; - } - - [self expandLineWidth:letterSize.width]; - [self inflateLineHeight:wordSize.height]; - ++stringIndex; - } - - NSRange lineRange = NSMakeRange(lineStartIndex, stringIndex - lineStartIndex); - if (lineRange.length) { - NSString* line = [text substringWithRange:lineRange]; - frameWidth = [[text substringWithRange:NSMakeRange(frameStart, stringIndex - frameStart)] - sizeWithFont:_font].width; - [self addFrameForText:line element:element node:textNode width:frameWidth - height:_lineHeight ? _lineHeight : [_font ttLineHeight]]; - - lineStartIndex = lineRange.location + lineRange.length; - frameStart = stringIndex; - } - - } else { - if (_lineWidth + wordSize.width > _width) { - // The word will be placed on the next line, so create a new frame for - // the current line and mark it with a line break - NSRange lineRange = NSMakeRange(lineStartIndex, stringIndex - lineStartIndex); - if (lineRange.length) { - NSString* line = [text substringWithRange:lineRange]; - frameWidth = [[text substringWithRange:NSMakeRange(frameStart, stringIndex - frameStart)] - sizeWithFont:_font].width; - [self addFrameForText:line element:element node:textNode width:frameWidth - height:_lineHeight ? _lineHeight : [_font ttLineHeight]]; - } - - if (_lineWidth) { - [self breakLine]; - } - lineStartIndex = lineRange.location + lineRange.length; - frameStart = stringIndex; - } - - if (!_lineWidth && textNode == _lastNode) { - // We are at the start of a new line, and this is the last node, so we don't need to - // keep measuring every word. We can just measure all remaining text and create a new - // frame for all of it. - NSString* lines = [text substringWithRange:searchRange]; - CGSize linesSize = [lines sizeWithFont:_font - constrainedToSize:CGSizeMake(availWidth, CGFLOAT_MAX) - lineBreakMode:UILineBreakModeWordWrap]; - - [self addFrameForText:lines element:element node:textNode width:linesSize.width - height:linesSize.height]; - _height += linesSize.height; - break; - } - - [self expandLineWidth:wordSize.width]; - [self inflateLineHeight:wordSize.height]; - - stringIndex = wordRange.location + wordRange.length; - if (stringIndex >= length) { - // The current word was at the very end of the string - NSRange lineRange = NSMakeRange(lineStartIndex, (wordRange.location + wordRange.length) - - lineStartIndex); - NSString* line = !_lineWidth ? word : [text substringWithRange:lineRange]; - frameWidth = [[text substringWithRange:NSMakeRange(frameStart, stringIndex - frameStart)] - sizeWithFont:_font].width; - [self addFrameForText:line element:element node:textNode width:frameWidth - height:[_font ttLineHeight]]; - frameWidth = 0; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - if (!_font) { - self.font = TTSTYLEVAR(font); - } - return _font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - if (font != _font) { - [_font release]; - _font = [font retain]; - TT_RELEASE_SAFELY(_boldFont); - TT_RELEASE_SAFELY(_italicFont); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layout:(TTStyledNode*)node container:(TTStyledElement*)element { - while (node) { - if ([node isKindOfClass:[TTStyledImageNode class]]) { - TTStyledImageNode* imageNode = (TTStyledImageNode*)node; - [self layoutImage:imageNode container:element]; - - } else if ([node isKindOfClass:[TTStyledElement class]]) { - TTStyledElement* elt = (TTStyledElement*)node; - [self layoutElement:elt]; - - } else if ([node isKindOfClass:[TTStyledTextNode class]]) { - TTStyledTextNode* textNode = (TTStyledTextNode*)node; - [self layoutText:textNode container:element]; - } - - node = node.nextSibling; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layout:(TTStyledNode*)node { - [self layout:node container:nil]; - if (_lineWidth) { - [self breakLine]; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledLineBreakNode.m b/src/Three20Style/Sources/TTStyledLineBreakNode.m deleted file mode 100644 index e2660ca336..0000000000 --- a/src/Three20Style/Sources/TTStyledLineBreakNode.m +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledLineBreakNode.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledLineBreakNode -@end diff --git a/src/Three20Style/Sources/TTStyledLinkNode.m b/src/Three20Style/Sources/TTStyledLinkNode.m deleted file mode 100644 index 5e3bb8887d..0000000000 --- a/src/Three20Style/Sources/TTStyledLinkNode.m +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledLinkNode.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledLinkNode - -@synthesize URL = _URL; -@synthesize highlighted = _highlighted; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithURL:(NSString*)URL { - if (self = [self initWithText:nil URL:URL next:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithURL:(NSString*)URL next:(TTStyledNode*)nextSibling { - if (self = [self initWithText:nil URL:URL next:nextSibling]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithText:(NSString*)text URL:(NSString*)URL next:(TTStyledNode*)nextSibling { - if (self = [super initWithText:text next:nextSibling]) { - self.URL = URL; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithText:nil URL:nil next:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_URL); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"<%@>", _firstChild]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyledNode - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)performDefaultAction { - if (nil != _URL) { - // TODO (jverkoey 04/20/2010): Remove dependency on UI. - //TTOpenURL(_URL); - } -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledNode.m b/src/Three20Style/Sources/TTStyledNode.m deleted file mode 100644 index da2c9f449e..0000000000 --- a/src/Three20Style/Sources/TTStyledNode.m +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledNode.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledNode - -@synthesize nextSibling = _nextSibling; -@synthesize parentNode = _parentNode; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNextSibling:(TTStyledNode*)nextSibling { - if (self = [super init]) { - self.nextSibling = nextSibling; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNextSibling:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_nextSibling); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setNextSibling:(TTStyledNode*)node { - if (node != _nextSibling) { - [_nextSibling release]; - _nextSibling = [node retain]; - node.parentNode = _parentNode; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)outerText { - return @""; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)outerHTML { - if (_nextSibling) { - return _nextSibling.outerHTML; - - } else { - return @""; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)ancestorOrSelfWithClass:(Class)cls { - if ([self isKindOfClass:cls]) { - return self; - - } else { - return [_parentNode ancestorOrSelfWithClass:cls]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) performDefaultAction { -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledNodeInternal.m b/src/Three20Style/Sources/TTStyledNodeInternal.m deleted file mode 100644 index 7cded31c2b..0000000000 --- a/src/Three20Style/Sources/TTStyledNodeInternal.m +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/private/TTStyledNodeInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -TT_FIX_CATEGORY_BUG(TTStyledNodeInternal) - -@implementation TTStyledNode (TTInternal) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledNode*)findLastSibling:(TTStyledNode*)sibling { - while (sibling) { - if (!sibling.nextSibling) { - return sibling; - } - sibling = sibling.nextSibling; - } - return nil; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledText.m b/src/Three20Style/Sources/TTStyledText.m deleted file mode 100644 index 632afde0c2..0000000000 --- a/src/Three20Style/Sources/TTStyledText.m +++ /dev/null @@ -1,460 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledText.h" - -// Style -#import "Three20Style/TTStyledTextDelegate.h" -#import "Three20Style/TTStyledNode.h" -#import "Three20Style/TTStyledFrame.h" -#import "Three20Style/TTStyledLayout.h" -#import "Three20Style/TTStyledTextParser.h" -#import "Three20Style/TTStyledImageNode.h" -#import "Three20Style/TTStyledTextNode.h" -#import "Three20Style/TTStyledBoxFrame.h" -#import "Three20Style/TTStyledTextFrame.h" -#import "Three20Style/TTStyledImageFrame.h" - -// Network -#import "Three20Network/TTURLImageResponse.h" -#import "Three20Network/TTURLCache.h" -#import "Three20Network/TTURLRequest.h" - -// Core -#import "Three20Core/TTGlobalCore.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTStyledText() - -/** - * Cancels all network requests. - */ -- (void)stopLoadingImages; - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledText - -@synthesize rootNode = _rootNode; -@synthesize font = _font; -@synthesize width = _width; -@synthesize height = _height; -@synthesize invalidImages = _invalidImages; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNode:(TTStyledNode*)rootNode { - if (self = [super init]) { - _rootNode = [rootNode retain]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [self stopLoadingImages]; - TT_RELEASE_SAFELY(_rootNode); - TT_RELEASE_SAFELY(_rootFrame); - TT_RELEASE_SAFELY(_font); - TT_RELEASE_SAFELY(_invalidImages); - TT_RELEASE_SAFELY(_imageRequests); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [self.rootNode outerText]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTStyledText*)textFromXHTML:(NSString*)source { - return [self textFromXHTML:source lineBreaks:NO URLs:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTStyledText*)textFromXHTML:(NSString*)source lineBreaks:(BOOL)lineBreaks URLs:(BOOL)URLs { - TTStyledTextParser* parser = [[[TTStyledTextParser alloc] init] autorelease]; - parser.parseLineBreaks = lineBreaks; - parser.parseURLs = URLs; - [parser parseXHTML:source]; - if (parser.rootNode) { - return [[[TTStyledText alloc] initWithNode:parser.rootNode] autorelease]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTStyledText*)textWithURLs:(NSString*)source { - return [self textWithURLs:source lineBreaks:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTStyledText*)textWithURLs:(NSString*)source lineBreaks:(BOOL)lineBreaks { - TTStyledTextParser* parser = [[[TTStyledTextParser alloc] init] autorelease]; - parser.parseLineBreaks = lineBreaks; - parser.parseURLs = YES; - [parser parseText:source]; - if (parser.rootNode) { - return [[[TTStyledText alloc] initWithNode:parser.rootNode] autorelease]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)stopLoadingImages { - if (_imageRequests) { - NSMutableArray* requests = [_imageRequests retain]; - TT_RELEASE_SAFELY(_imageRequests); - - if (!_invalidImages) { - _invalidImages = [[NSMutableArray alloc] init]; - } - - for (TTURLRequest* request in requests) { - [_invalidImages addObject:request.userInfo]; - [request cancel]; - } - [requests release]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadImages { - [self stopLoadingImages]; - - if (_delegate && _invalidImages) { - BOOL loadedSome = NO; - for (TTStyledImageNode* imageNode in _invalidImages) { - if (imageNode.URL) { - UIImage* image = [[TTURLCache sharedCache] imageForURL:imageNode.URL]; - if (image) { - imageNode.image = image; - loadedSome = YES; - - } else { - TTURLRequest* request = [TTURLRequest requestWithURL:imageNode.URL delegate:self]; - request.userInfo = imageNode; - request.response = [[[TTURLImageResponse alloc] init] autorelease]; - [request send]; - } - } - } - - TT_RELEASE_SAFELY(_invalidImages); - - if (loadedSome) { - [_delegate styledTextNeedsDisplay:self]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledFrame*)getFrameForNode:(TTStyledNode*)node inFrame:(TTStyledFrame*)frame { - while (frame) { - if ([frame isKindOfClass:[TTStyledBoxFrame class]]) { - TTStyledBoxFrame* boxFrame = (TTStyledBoxFrame*)frame; - if (boxFrame.element == node) { - return boxFrame; - } - - TTStyledFrame* found = [self getFrameForNode:node inFrame:boxFrame.firstChildFrame]; - if (found) { - return found; - } - - } else if ([frame isKindOfClass:[TTStyledTextFrame class]]) { - TTStyledTextFrame* textFrame = (TTStyledTextFrame*)frame; - if (textFrame.node == node) { - return textFrame; - } - - } else if ([frame isKindOfClass:[TTStyledImageFrame class]]) { - TTStyledImageFrame* imageFrame = (TTStyledImageFrame*)frame; - if (imageFrame.imageNode == node) { - return imageFrame; - } - } - - frame = frame.nextFrame; - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLRequestDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidStartLoad:(TTURLRequest*)request { - if (!_imageRequests) { - _imageRequests = [[NSMutableArray alloc] init]; - } - [_imageRequests addObject:request]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidFinishLoad:(TTURLRequest*)request { - TTURLImageResponse* response = request.response; - TTStyledImageNode* imageNode = request.userInfo; - imageNode.image = response.image; - - [_imageRequests removeObject:request]; - - [_delegate styledTextNeedsDisplay:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)request:(TTURLRequest*)request didFailLoadWithError:(NSError*)error { - [_imageRequests removeObject:request]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidCancelLoad:(TTURLRequest*)request { - [_imageRequests removeObject:request]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDelegate:(id)delegate { - if (_delegate != delegate) { - _delegate = delegate; - [self loadImages]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledFrame*)rootFrame { - [self layoutIfNeeded]; - return _rootFrame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - if (font != _font) { - [_font release]; - _font = [font retain]; - [self setNeedsLayout]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setWidth:(CGFloat)width { - if (width != _width) { - _width = width; - [self setNeedsLayout]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)height { - [self layoutIfNeeded]; - return _height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)needsLayout { - return !_rootFrame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutFrames { - TTStyledLayout* layout = [[TTStyledLayout alloc] initWithRootNode:_rootNode]; - layout.width = _width; - layout.font = _font; - [layout layout:_rootNode]; - - [_rootFrame release]; - _rootFrame = [layout.rootFrame retain]; - _height = ceil(layout.height); - [_invalidImages release]; - _invalidImages = [layout.invalidImages retain]; - [layout release]; - - [self loadImages]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutIfNeeded { - if (!_rootFrame) { - [self layoutFrames]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setNeedsLayout { - TT_RELEASE_SAFELY(_rootFrame); - _height = 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawAtPoint:(CGPoint)point { - [self drawAtPoint:point highlighted:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawAtPoint:(CGPoint)point highlighted:(BOOL)highlighted { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - CGContextTranslateCTM(ctx, point.x, point.y); - - TTStyledFrame* frame = self.rootFrame; - while (frame) { - [frame drawInRect:frame.bounds]; - frame = frame.nextFrame; - } - - CGContextRestoreGState(ctx); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledBoxFrame*)hitTest:(CGPoint)point { - return [self.rootFrame hitTest:point]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledFrame*)getFrameForNode:(TTStyledNode*)node { - return [self getFrameForNode:node inFrame:_rootFrame]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addChild:(TTStyledNode*)child { - if (!_rootNode) { - self.rootNode = child; - - } else { - TTStyledNode* previousNode = _rootNode; - TTStyledNode* node = _rootNode.nextSibling; - while (node) { - previousNode = node; - node = node.nextSibling; - } - previousNode.nextSibling = child; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addText:(NSString*)text { - [self addChild:[[[TTStyledTextNode alloc] initWithText:text] autorelease]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)insertChild:(TTStyledNode*)child atIndex:(NSInteger)insertIndex { - if (!_rootNode) { - self.rootNode = child; - - } else if (insertIndex == 0) { - child.nextSibling = _rootNode; - self.rootNode = child; - - } else { - NSInteger i = 0; - TTStyledNode* previousNode = _rootNode; - TTStyledNode* node = _rootNode.nextSibling; - while (node && i != insertIndex) { - ++i; - previousNode = node; - node = node.nextSibling; - } - child.nextSibling = node; - previousNode.nextSibling = child; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyledNode*)getElementByClassName:(NSString*)className { - TTStyledNode* node = _rootNode; - while (node) { - if ([node isKindOfClass:[TTStyledElement class]]) { - TTStyledElement* element = (TTStyledElement*)node; - if ([element.className isEqualToString:className]) { - return element; - } - - TTStyledNode* found = [element getElementByClassName:className]; - if (found) { - return found; - } - } - node = node.nextSibling; - } - return nil; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledTextFrame.m b/src/Three20Style/Sources/TTStyledTextFrame.m deleted file mode 100644 index 5e74e8f6a5..0000000000 --- a/src/Three20Style/Sources/TTStyledTextFrame.m +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledTextFrame.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledTextFrame - -@synthesize node = _node; -@synthesize text = _text; -@synthesize font = _font; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithText:(NSString*)text element:(TTStyledElement*)element node:(TTStyledTextNode*)node { - if (self = [super initWithElement:element]) { - _text = [text copy]; - _node = node; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_text); - TT_RELEASE_SAFELY(_font); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawInRect:(CGRect)rect { - [_text drawInRect:rect withFont:_font lineBreakMode:UILineBreakModeClip]; -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledTextNode.m b/src/Three20Style/Sources/TTStyledTextNode.m deleted file mode 100644 index 4df6d2c34b..0000000000 --- a/src/Three20Style/Sources/TTStyledTextNode.m +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledTextNode.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledTextNode - -@synthesize text = _text; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithText:(NSString*)text { - if (self = [self initWithText:text next:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithText:(NSString*)text next:(TTStyledNode*)nextSibling { - if (self = [super initWithNextSibling:nextSibling]) { - self.text = text; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_text); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return _text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyledNode - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)outerText { - return _text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)outerHTML { - if (_nextSibling) { - return [NSString stringWithFormat:@"%@%@", _text, _nextSibling.outerHTML]; - - } else { - return _text; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTStyledTextParser.m b/src/Three20Style/Sources/TTStyledTextParser.m deleted file mode 100644 index b4c6bea2ca..0000000000 --- a/src/Three20Style/Sources/TTStyledTextParser.m +++ /dev/null @@ -1,315 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTStyledTextParser.h" - -// Style -#import "Three20Style/TTStyledElement.h" -#import "Three20Style/TTStyledTextNode.h" -#import "Three20Style/TTStyledInline.h" -#import "Three20Style/TTStyledBlock.h" -#import "Three20Style/TTStyledLineBreakNode.h" -#import "Three20Style/TTStyledBoldNode.h" -#import "Three20Style/TTStyledButtonNode.h" -#import "Three20Style/TTStyledLinkNode.h" -#import "Three20Style/TTStyledItalicNode.h" -#import "Three20Style/TTStyledImageNode.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledTextParser - -@synthesize rootNode = _rootNode; -@synthesize parseLineBreaks = _parseLineBreaks; -@synthesize parseURLs = _parseURLs; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_rootNode); - TT_RELEASE_SAFELY(_chars); - TT_RELEASE_SAFELY(_stack); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addNode:(TTStyledNode*)node { - if (!_rootNode) { - _rootNode = [node retain]; - _lastNode = node; - - } else if (_topElement) { - [_topElement addChild:node]; - - } else { - _lastNode.nextSibling = node; - _lastNode = node; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)pushNode:(TTStyledElement*)element { - if (!_stack) { - _stack = [[NSMutableArray alloc] init]; - } - - [self addNode:element]; - [_stack addObject:element]; - _topElement = element; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)popNode { - TTStyledElement* element = [_stack lastObject]; - if (element) { - [_stack removeLastObject]; - } - - _topElement = [_stack lastObject]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)flushCharacters { - if (_chars.length) { - [self parseText:_chars]; - } - - TT_RELEASE_SAFELY(_chars); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parseURLs:(NSString*)string { - NSInteger stringIndex = 0; - - while (stringIndex < string.length) { - NSRange searchRange = NSMakeRange(stringIndex, string.length - stringIndex); - NSRange startRange = [string rangeOfString:@"http://" options:NSCaseInsensitiveSearch - range:searchRange]; - if (startRange.location == NSNotFound) { - NSString* text = [string substringWithRange:searchRange]; - TTStyledTextNode* node = [[[TTStyledTextNode alloc] initWithText:text] autorelease]; - [self addNode:node]; - break; - - } else { - NSRange beforeRange = NSMakeRange(searchRange.location, - startRange.location - searchRange.location); - if (beforeRange.length) { - NSString* text = [string substringWithRange:beforeRange]; - TTStyledTextNode* node = [[[TTStyledTextNode alloc] initWithText:text] autorelease]; - [self addNode:node]; - } - - NSRange subSearchRange = NSMakeRange(startRange.location, - string.length - startRange.location); - NSRange endRange = [string rangeOfString:@" " options:NSCaseInsensitiveSearch - range:subSearchRange]; - if (endRange.location == NSNotFound) { - NSString* URL = [string substringWithRange:subSearchRange]; - TTStyledLinkNode* node = [[[TTStyledLinkNode alloc] initWithText:URL] autorelease]; - node.URL = URL; - [self addNode:node]; - break; - - } else { - NSRange URLRange = NSMakeRange(startRange.location, - endRange.location - startRange.location); - NSString* URL = [string substringWithRange:URLRange]; - TTStyledLinkNode* node = [[[TTStyledLinkNode alloc] initWithText:URL] autorelease]; - node.URL = URL; - [self addNode:node]; - stringIndex = endRange.location; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSXMLParserDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName - namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName - attributes:(NSDictionary *)attributeDict { - [self flushCharacters]; - - NSString* tag = [elementName lowercaseString]; - if ([tag isEqualToString:@"span"]) { - TTStyledInline* node = [[[TTStyledInline alloc] init] autorelease]; - node.className = [attributeDict objectForKey:@"class"]; - [self pushNode:node]; - - } else if ([tag isEqualToString:@"br"]) { - TTStyledLineBreakNode* node = [[[TTStyledLineBreakNode alloc] init] autorelease]; - node.className = [attributeDict objectForKey:@"class"]; - [self pushNode:node]; - - } else if ([tag isEqualToString:@"div"] || [tag isEqualToString:@"p"]) { - TTStyledBlock* node = [[[TTStyledBlock alloc] init] autorelease]; - node.className = [attributeDict objectForKey:@"class"]; - [self pushNode:node]; - - } else if ([tag isEqualToString:@"b"] || [tag isEqualToString:@"strong"]) { - TTStyledBoldNode* node = [[[TTStyledBoldNode alloc] init] autorelease]; - [self pushNode:node]; - - } else if ([tag isEqualToString:@"i"] || [tag isEqualToString:@"em"]) { - TTStyledItalicNode* node = [[[TTStyledItalicNode alloc] init] autorelease]; - [self pushNode:node]; - - } else if ([tag isEqualToString:@"a"]) { - TTStyledLinkNode* node = [[[TTStyledLinkNode alloc] init] autorelease]; - node.URL = [attributeDict objectForKey:@"href"]; - [self pushNode:node]; - - } else if ([tag isEqualToString:@"button"]) { - TTStyledButtonNode* node = [[[TTStyledButtonNode alloc] init] autorelease]; - node.URL = [attributeDict objectForKey:@"href"]; - [self pushNode:node]; - - } else if ([tag isEqualToString:@"img"]) { - TTStyledImageNode* node = [[[TTStyledImageNode alloc] init] autorelease]; - node.className = [attributeDict objectForKey:@"class"]; - node.URL = [attributeDict objectForKey:@"src"]; - NSString* width = [attributeDict objectForKey:@"width"]; - if (width) { - node.width = width.floatValue; - } - NSString* height = [attributeDict objectForKey:@"height"]; - if (height) { - node.height = height.floatValue; - } - [self pushNode:node]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { - if (!_chars) { - _chars = [string mutableCopy]; - - } else { - [_chars appendString:string]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName - namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { - [self flushCharacters]; - [self popNode]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSData *) parser:(NSXMLParser *)parser - resolveExternalEntityName:(NSString *)entityName - systemID:(NSString *)systemID { - static NSDictionary* entityTable = nil; - if (!entityTable) { - entityTable = [[NSDictionary alloc] initWithObjectsAndKeys: - [NSData dataWithBytes:" " length:1], @"nbsp", - [NSData dataWithBytes:"&" length:1], @"amp", - [NSData dataWithBytes:"\"" length:1], @"quot", - [NSData dataWithBytes:"<" length:1], @"lt", - [NSData dataWithBytes:">" length:1], @"gt", - nil]; - } - return [entityTable objectForKey:entityName]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parseXHTML:(NSString*)html { - NSString* document = [NSString stringWithFormat:@"%@", html]; - NSData* data = [document dataUsingEncoding:html.fastestEncoding]; - NSXMLParser* parser = [[[NSXMLParser alloc] initWithData:data] autorelease]; - parser.delegate = self; - [parser parse]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parseText:(NSString*)string { - if (_parseLineBreaks) { - NSCharacterSet* newLines = [NSCharacterSet newlineCharacterSet]; - NSInteger stringIndex = 0; - NSInteger length = string.length; - - while (1) { - NSRange searchRange = NSMakeRange(stringIndex, length - stringIndex); - NSRange range = [string rangeOfCharacterFromSet:newLines options:0 range:searchRange]; - if (range.location != NSNotFound) { - // Find all text before the line break and parse it - NSRange textRange = NSMakeRange(stringIndex, range.location - stringIndex); - NSString* substr = [string substringWithRange:textRange]; - [self parseURLs:substr]; - - // Add a line break node after the text - TTStyledLineBreakNode* br = [[[TTStyledLineBreakNode alloc] init] autorelease]; - [self addNode:br]; - - stringIndex = stringIndex + substr.length + 1; - - } else { - // Find all text until the end of hte string and parse it - NSString* substr = [string substringFromIndex:stringIndex]; - [self parseURLs:substr]; - break; - } - } - - } else if (_parseURLs) { - [self parseURLs:string]; - - } else { - TTStyledTextNode* node = [[[TTStyledTextNode alloc] initWithText:string] autorelease]; - [self addNode:node]; - } -} - - -@end diff --git a/src/Three20Style/Sources/TTTextStyle.m b/src/Three20Style/Sources/TTTextStyle.m deleted file mode 100644 index 3764bae821..0000000000 --- a/src/Three20Style/Sources/TTTextStyle.m +++ /dev/null @@ -1,318 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTTextStyle.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTStyleDelegate.h" -#import "Three20Style/UIFontAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTextStyle - -@synthesize font = _font; -@synthesize color = _color; -@synthesize shadowColor = _shadowColor; -@synthesize shadowOffset = _shadowOffset; -@synthesize minimumFontSize = _minimumFontSize; -@synthesize numberOfLines = _numberOfLines; -@synthesize textAlignment = _textAlignment; -@synthesize verticalAlignment = _verticalAlignment; -@synthesize lineBreakMode = _lineBreakMode; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNext:(TTStyle*)next { - if (self = [super initWithNext:next]) { - _shadowOffset = CGSizeZero; - _numberOfLines = 1; - _textAlignment = UITextAlignmentCenter; - _verticalAlignment = UIControlContentVerticalAlignmentCenter; - _lineBreakMode = UILineBreakModeTailTruncation; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_font); - TT_RELEASE_SAFELY(_color); - TT_RELEASE_SAFELY(_shadowColor); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTTextStyle*)styleWithFont:(UIFont*)font next:(TTStyle*)next { - TTTextStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.font = font; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTTextStyle*)styleWithColor:(UIColor*)color next:(TTStyle*)next { - TTTextStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.color = color; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color next:(TTStyle*)next { - TTTextStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.font = font; - style.color = color; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color - textAlignment:(UITextAlignment)textAlignment next:(TTStyle*)next { - TTTextStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.font = font; - style.color = color; - style.textAlignment = textAlignment; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color - shadowColor:(UIColor*)shadowColor shadowOffset:(CGSize)shadowOffset - next:(TTStyle*)next { - TTTextStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.font = font; - style.color = color; - style.shadowColor = shadowColor; - style.shadowOffset = shadowOffset; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color - minimumFontSize:(CGFloat)minimumFontSize - shadowColor:(UIColor*)shadowColor shadowOffset:(CGSize)shadowOffset - next:(TTStyle*)next { - TTTextStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.font = font; - style.color = color; - style.minimumFontSize = minimumFontSize; - style.shadowColor = shadowColor; - style.shadowOffset = shadowOffset; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTTextStyle*)styleWithFont:(UIFont*)font color:(UIColor*)color - minimumFontSize:(CGFloat)minimumFontSize - shadowColor:(UIColor*)shadowColor shadowOffset:(CGSize)shadowOffset - textAlignment:(UITextAlignment)textAlignment - verticalAlignment:(UIControlContentVerticalAlignment)verticalAlignment - lineBreakMode:(UILineBreakMode)lineBreakMode numberOfLines:(NSInteger)numberOfLines - next:(TTStyle*)next { - TTTextStyle* style = [[[self alloc] initWithNext:next] autorelease]; - style.font = font; - style.color = color; - style.minimumFontSize = minimumFontSize; - style.shadowColor = shadowColor; - style.shadowOffset = shadowOffset; - style.textAlignment = textAlignment; - style.verticalAlignment = verticalAlignment; - style.lineBreakMode = lineBreakMode; - style.numberOfLines = numberOfLines; - return style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeOfText:(NSString*)text withFont:(UIFont*)font size:(CGSize)size { - if (_numberOfLines == 1) { - return [text sizeWithFont:font]; - - } else { - CGSize maxSize = CGSizeMake(size.width, CGFLOAT_MAX); - CGSize textSize = [text sizeWithFont:font constrainedToSize:maxSize - lineBreakMode:_lineBreakMode]; - if (_numberOfLines) { - CGFloat maxHeight = font.ttLineHeight * _numberOfLines; - if (textSize.height > maxHeight) { - textSize.height = maxHeight; - } - } - return textSize; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)rectForText:(NSString*)text forSize:(CGSize)size withFont:(UIFont*)font { - CGRect rect = CGRectZero; - if (_textAlignment == UITextAlignmentLeft - && _verticalAlignment == UIControlContentVerticalAlignmentTop) { - rect.size = size; - - } else { - CGSize textSize = [self sizeOfText:text withFont:font size:size]; - - if (size.width < textSize.width) { - size.width = textSize.width; - } - - rect.size = textSize; - - if (_textAlignment == UITextAlignmentCenter) { - rect.origin.x = round(size.width/2 - textSize.width/2); - - } else if (_textAlignment == UITextAlignmentRight) { - rect.origin.x = size.width - textSize.width; - } - - if (_verticalAlignment == UIControlContentVerticalAlignmentCenter) { - rect.origin.y = round(size.height/2 - textSize.height/2); - - } else if (_verticalAlignment == UIControlContentVerticalAlignmentBottom) { - rect.origin.y = size.height - textSize.height; - } - } - return rect; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawText:(NSString*)text context:(TTStyleContext*)context { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - - UIFont* font = _font ? _font : context.font; - - if (nil == font) { - font = [UIFont systemFontOfSize:[UIFont systemFontSize]]; - } - - if (_shadowColor) { - CGSize offset = CGSizeMake(_shadowOffset.width, -_shadowOffset.height); - CGContextSetShadowWithColor(ctx, offset, 0, _shadowColor.CGColor); - } - - if (_color) { - [_color setFill]; - } - - CGRect rect = context.contentFrame; - - if (_numberOfLines == 1) { - CGRect titleRect = [self rectForText:text forSize:rect.size withFont:font]; - titleRect.size = [text drawAtPoint: - CGPointMake(titleRect.origin.x+rect.origin.x, - titleRect.origin.y+rect.origin.y) - forWidth:rect.size.width withFont:font - minFontSize:_minimumFontSize ? _minimumFontSize : font.pointSize - actualFontSize:nil lineBreakMode:_lineBreakMode - baselineAdjustment:UIBaselineAdjustmentAlignCenters]; - context.contentFrame = titleRect; - - } else { - CGRect titleRect = [self rectForText:text forSize:rect.size withFont:font]; - titleRect = CGRectOffset(titleRect, rect.origin.x, rect.origin.y); - rect.size = [text drawInRect:titleRect withFont:font lineBreakMode:_lineBreakMode - alignment:_textAlignment]; - context.contentFrame = rect; - } - - CGContextRestoreGState(ctx); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyle - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)draw:(TTStyleContext*)context { - if ([context.delegate respondsToSelector:@selector(textForLayerWithStyle:)]) { - NSString* text = [context.delegate textForLayerWithStyle:self]; - if (text) { - context.didDrawContent = YES; - [self drawText:text context:context]; - } - } - - if (!context.didDrawContent - && [context.delegate respondsToSelector:@selector(drawLayer:withStyle:)]) { - [context.delegate drawLayer:context withStyle:self]; - context.didDrawContent = YES; - } - - [self.next draw:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context { - if ([context.delegate respondsToSelector:@selector(textForLayerWithStyle:)]) { - NSString* text = [context.delegate textForLayerWithStyle:self]; - UIFont* font = _font ? _font : context.font; - - CGFloat maxWidth = context.contentFrame.size.width; - if (!maxWidth) { - maxWidth = CGFLOAT_MAX; - } - CGFloat maxHeight = _numberOfLines ? _numberOfLines * font.ttLineHeight : CGFLOAT_MAX; - CGSize maxSize = CGSizeMake(maxWidth, maxHeight); - CGSize textSize = [self sizeOfText:text withFont:font size:maxSize]; - - size.width += textSize.width; - size.height += textSize.height; - } - - if (_next) { - return [self.next addToSize:size context:context]; - - } else { - return size; - } -} - - -@end diff --git a/src/Three20Style/Sources/UIColorAdditions.m b/src/Three20Style/Sources/UIColorAdditions.m deleted file mode 100644 index 05b285ed22..0000000000 --- a/src/Three20Style/Sources/UIColorAdditions.m +++ /dev/null @@ -1,218 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/UIColorAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Color algorithms from http://www.cs.rit.edu/~ncs/color/t_convert.html - -#define MAX3(a,b,c) (a > b ? (a > c ? a : c) : (b > c ? b : c)) -#define MIN3(a,b,c) (a < b ? (a < c ? a : c) : (b < c ? b : c)) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -void RGBtoHSV(float r, float g, float b, float* h, float* s, float* v) { - float min, max, delta; - min = MIN3(r, g, b); - max = MAX3(r, g, b); - *v = max; // v - delta = max - min; - if ( max != 0 ) - *s = delta / max; // s - else { - // r = g = b = 0 // s = 0, v is undefined - *s = 0; - *h = -1; - return; - } - if ( r == max ) - *h = ( g - b ) / delta; // between yellow & magenta - else if ( g == max ) - *h = 2 + ( b - r ) / delta; // between cyan & yellow - else - *h = 4 + ( r - g ) / delta; // between magenta & cyan - *h *= 60; // degrees - if ( *h < 0 ) - *h += 360; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -void HSVtoRGB( float *r, float *g, float *b, float h, float s, float v ) { - int i; - float f, p, q, t; - if ( s == 0 ) { - // achromatic (grey) - *r = *g = *b = v; - return; - } - h /= 60; // sector 0 to 5 - i = floor( h ); - f = h - i; // factorial part of h - p = v * ( 1 - s ); - q = v * ( 1 - s * f ); - t = v * ( 1 - s * ( 1 - f ) ); - switch( i ) { - case 0: - *r = v; - *g = t; - *b = p; - break; - case 1: - *r = q; - *g = v; - *b = p; - break; - case 2: - *r = p; - *g = v; - *b = t; - break; - case 3: - *r = p; - *g = q; - *b = v; - break; - case 4: - *r = t; - *g = p; - *b = v; - break; - default: // case 5: - *r = v; - *g = p; - *b = q; - break; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIColorAdditions) - -@implementation UIColor (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (UIColor*)colorWithHue:(CGFloat)h saturation:(CGFloat)s value:(CGFloat)v alpha:(CGFloat)a { - CGFloat r, g, b; - HSVtoRGB(&r, &g, &b, h, s, v); - return [UIColor colorWithRed:r green:g blue:b alpha:a]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)multiplyHue:(CGFloat)hd saturation:(CGFloat)sd value:(CGFloat)vd { - const CGFloat* rgba = CGColorGetComponents(self.CGColor); - CGFloat r = rgba[0]; - CGFloat g = rgba[1]; - CGFloat b = rgba[2]; - CGFloat a = rgba[3]; - - CGFloat h, s, v; - RGBtoHSV(r, g, b, &h, &s, &v); - - h *= hd; - v *= vd; - s *= sd; - - HSVtoRGB(&r, &g, &b, h, s, v); - - return [UIColor colorWithRed:r green:g blue:b alpha:a]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)copyWithAlpha:(CGFloat)newAlpha { - const CGFloat* rgba = CGColorGetComponents(self.CGColor); - CGFloat r = rgba[0]; - CGFloat g = rgba[1]; - CGFloat b = rgba[2]; - - return [[UIColor colorWithRed:r green:g blue:b alpha:newAlpha] retain]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)addHue:(CGFloat)hd saturation:(CGFloat)sd value:(CGFloat)vd { - const CGFloat* rgba = CGColorGetComponents(self.CGColor); - CGFloat r = rgba[0]; - CGFloat g = rgba[1]; - CGFloat b = rgba[2]; - CGFloat a = rgba[3]; - - CGFloat h, s, v; - RGBtoHSV(r, g, b, &h, &s, &v); - - h += hd; - v += vd; - s += sd; - - HSVtoRGB(&r, &g, &b, h, s, v); - - return [UIColor colorWithRed:r green:g blue:b alpha:a]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)highlight { - return [self multiplyHue:1 saturation:0.4 value:1.2]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)shadow { - return [self multiplyHue:1 saturation:0.6 value:0.6]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)hue { - const CGFloat* rgba = CGColorGetComponents(self.CGColor); - CGFloat h, s, v; - RGBtoHSV(rgba[0], rgba[1], rgba[2], &h, &s, &v); - return h; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)saturation { - const CGFloat* rgba = CGColorGetComponents(self.CGColor); - CGFloat h, s, v; - RGBtoHSV(rgba[0], rgba[1], rgba[2], &h, &s, &v); - return s; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)value { - const CGFloat* rgba = CGColorGetComponents(self.CGColor); - CGFloat h, s, v; - RGBtoHSV(rgba[0], rgba[1], rgba[2], &h, &s, &v); - return v; -} - - -@end diff --git a/src/Three20Style/Sources/UIFontAdditions.m b/src/Three20Style/Sources/UIFontAdditions.m deleted file mode 100644 index 24652d7aa0..0000000000 --- a/src/Three20Style/Sources/UIFontAdditions.m +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/UIFontAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIFontAdditions) - -@implementation UIFont (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)ttLineHeight { - return (self.ascender - self.descender) + 1; -} - -@end diff --git a/src/Three20Style/Sources/UIImageAdditions.m b/src/Three20Style/Sources/UIImageAdditions.m deleted file mode 100644 index 8003cbb4f6..0000000000 --- a/src/Three20Style/Sources/UIImageAdditions.m +++ /dev/null @@ -1,251 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/UIImageAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIImageAdditions) - -@implementation UIImage (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRoundedRectToPath:(CGContextRef)context rect:(CGRect)rect radius:(float)radius { - CGContextBeginPath(context); - CGContextSaveGState(context); - - if (radius == 0) { - CGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect)); - CGContextAddRect(context, rect); - - } else { - CGContextTranslateCTM(context, CGRectGetMinX(rect), CGRectGetMinY(rect)); - CGContextScaleCTM(context, radius, radius); - float fw = CGRectGetWidth(rect) / radius; - float fh = CGRectGetHeight(rect) / radius; - - CGContextMoveToPoint(context, fw, fh/2); - CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1); - CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1); - CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1); - CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1); - } - - CGContextClosePath(context); - CGContextRestoreGState(context); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Creates a new image by resizing the receiver to the desired size, and rotating it if receiver's - * imageOrientation shows it to be necessary (and the rotate argument is YES). - */ -- (UIImage*)transformWidth:(CGFloat)width height:(CGFloat)height rotate:(BOOL)rotate { - CGFloat destW = width; - CGFloat destH = height; - CGFloat sourceW = width; - CGFloat sourceH = height; - if (rotate) { - if (self.imageOrientation == UIImageOrientationRight - || self.imageOrientation == UIImageOrientationLeft) { - sourceW = height; - sourceH = width; - } - } - - CGImageRef imageRef = self.CGImage; - int bytesPerRow = destW * (CGImageGetBitsPerPixel(imageRef) >> 3); - CGContextRef bitmap = CGBitmapContextCreate(NULL, destW, destH, - CGImageGetBitsPerComponent(imageRef), bytesPerRow, CGImageGetColorSpace(imageRef), - CGImageGetBitmapInfo(imageRef)); - - if (rotate) { - if (self.imageOrientation == UIImageOrientationDown) { - CGContextTranslateCTM(bitmap, sourceW, sourceH); - CGContextRotateCTM(bitmap, 180 * (M_PI/180)); - - } else if (self.imageOrientation == UIImageOrientationLeft) { - CGContextTranslateCTM(bitmap, sourceH, 0); - CGContextRotateCTM(bitmap, 90 * (M_PI/180)); - - } else if (self.imageOrientation == UIImageOrientationRight) { - CGContextTranslateCTM(bitmap, 0, sourceW); - CGContextRotateCTM(bitmap, -90 * (M_PI/180)); - } - } - - CGContextDrawImage(bitmap, CGRectMake(0,0,sourceW,sourceH), imageRef); - - CGImageRef ref = CGBitmapContextCreateImage(bitmap); - UIImage* result = [UIImage imageWithCGImage:ref]; - CGContextRelease(bitmap); - CGImageRelease(ref); - - return result; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)convertRect:(CGRect)rect withContentMode:(UIViewContentMode)contentMode { - if (self.size.width != rect.size.width || self.size.height != rect.size.height) { - if (contentMode == UIViewContentModeLeft) { - return CGRectMake(rect.origin.x, - rect.origin.y + floor(rect.size.height/2 - self.size.height/2), - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeRight) { - return CGRectMake(rect.origin.x + (rect.size.width - self.size.width), - rect.origin.y + floor(rect.size.height/2 - self.size.height/2), - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeTop) { - return CGRectMake(rect.origin.x + floor(rect.size.width/2 - self.size.width/2), - rect.origin.y, - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeBottom) { - return CGRectMake(rect.origin.x + floor(rect.size.width/2 - self.size.width/2), - rect.origin.y + floor(rect.size.height - self.size.height), - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeCenter) { - return CGRectMake(rect.origin.x + floor(rect.size.width/2 - self.size.width/2), - rect.origin.y + floor(rect.size.height/2 - self.size.height/2), - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeBottomLeft) { - return CGRectMake(rect.origin.x, - rect.origin.y + floor(rect.size.height - self.size.height), - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeBottomRight) { - return CGRectMake(rect.origin.x + (rect.size.width - self.size.width), - rect.origin.y + (rect.size.height - self.size.height), - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeTopLeft) { - return CGRectMake(rect.origin.x, - rect.origin.y, - - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeTopRight) { - return CGRectMake(rect.origin.x + (rect.size.width - self.size.width), - rect.origin.y, - self.size.width, self.size.height); - - } else if (contentMode == UIViewContentModeScaleAspectFill) { - CGSize imageSize = self.size; - if (imageSize.height < imageSize.width) { - imageSize.width = floor((imageSize.width/imageSize.height) * rect.size.height); - imageSize.height = rect.size.height; - - } else { - imageSize.height = floor((imageSize.height/imageSize.width) * rect.size.width); - imageSize.width = rect.size.width; - } - return CGRectMake(rect.origin.x + floor(rect.size.width/2 - imageSize.width/2), - rect.origin.y + floor(rect.size.height/2 - imageSize.height/2), - imageSize.width, imageSize.height); - - } else if (contentMode == UIViewContentModeScaleAspectFit) { - CGSize imageSize = self.size; - if (imageSize.height < imageSize.width) { - imageSize.height = floor((imageSize.height/imageSize.width) * rect.size.width); - imageSize.width = rect.size.width; - - } else { - imageSize.width = floor((imageSize.width/imageSize.height) * rect.size.height); - imageSize.height = rect.size.height; - } - return CGRectMake(rect.origin.x + floor(rect.size.width/2 - imageSize.width/2), - rect.origin.y + floor(rect.size.height/2 - imageSize.height/2), - imageSize.width, imageSize.height); - } - } - return rect; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawInRect:(CGRect)rect contentMode:(UIViewContentMode)contentMode { - BOOL clip = NO; - CGRect originalRect = rect; - if (self.size.width != rect.size.width || self.size.height != rect.size.height) { - clip = contentMode != UIViewContentModeScaleAspectFill - && contentMode != UIViewContentModeScaleAspectFit; - rect = [self convertRect:rect withContentMode:contentMode]; - } - - CGContextRef context = UIGraphicsGetCurrentContext(); - if (clip) { - CGContextSaveGState(context); - CGContextAddRect(context, originalRect); - CGContextClip(context); - } - - [self drawInRect:rect]; - - if (clip) { - CGContextRestoreGState(context); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawInRect:(CGRect)rect radius:(CGFloat)radius { - [self drawInRect:rect radius:radius contentMode:UIViewContentModeScaleToFill]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawInRect:(CGRect)rect radius:(CGFloat)radius contentMode:(UIViewContentMode)contentMode { - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSaveGState(context); - if (radius) { - [self addRoundedRectToPath:context rect:rect radius:radius]; - CGContextClip(context); - } - - [self drawInRect:rect contentMode:contentMode]; - - CGContextRestoreGState(context); -} - - -@end diff --git a/src/Three20Style/Three20Style.xcodeproj/project.pbxproj b/src/Three20Style/Three20Style.xcodeproj/project.pbxproj deleted file mode 100755 index 993219ee6d..0000000000 --- a/src/Three20Style/Three20Style.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1271 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 6E6454901184D3BC00F08CB1 /* Three20Style+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64548F1184D3BC00F08CB1 /* Three20Style+Additions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6464041187F5CB00F08CB1 /* TTStyledButtonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6464021187F5CB00F08CB1 /* TTStyledButtonNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6464051187F5CB00F08CB1 /* TTStyledLinkNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6464031187F5CB00F08CB1 /* TTStyledLinkNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64640C1187F5EC00F08CB1 /* TTStyledButtonNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64640A1187F5EC00F08CB1 /* TTStyledButtonNode.m */; }; - 6E64640D1187F5EC00F08CB1 /* TTStyledLinkNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64640B1187F5EC00F08CB1 /* TTStyledLinkNode.m */; }; - 6E850F0911B0FE200071A4FD /* TTDefaultStyleSheet+DragRefreshHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E850F0711B0FE200071A4FD /* TTDefaultStyleSheet+DragRefreshHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE7366C11849C5800A35176 /* libThree20Core.a */; }; - 6EE737441184A38F00A35176 /* TTBevelBorderStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737031184A38F00A35176 /* TTBevelBorderStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737451184A38F00A35176 /* TTBlendStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737041184A38F00A35176 /* TTBlendStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737461184A38F00A35176 /* TTBoxStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737051184A38F00A35176 /* TTBoxStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737471184A38F00A35176 /* TTContentStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737061184A38F00A35176 /* TTContentStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737481184A38F00A35176 /* TTDefaultStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737071184A38F00A35176 /* TTDefaultStyleSheet.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737491184A38F00A35176 /* TTFlowLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737081184A38F00A35176 /* TTFlowLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7374A1184A38F00A35176 /* TTFourBorderStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737091184A38F00A35176 /* TTFourBorderStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7374B1184A38F00A35176 /* TTGlobalStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7370A1184A38F00A35176 /* TTGlobalStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7374C1184A38F00A35176 /* TTGridLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7370B1184A38F00A35176 /* TTGridLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7374D1184A38F00A35176 /* TTHighlightBorderStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7370C1184A38F00A35176 /* TTHighlightBorderStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7374E1184A38F00A35176 /* TTImageStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7370D1184A38F00A35176 /* TTImageStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7374F1184A38F00A35176 /* TTInnerShadowStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7370E1184A38F00A35176 /* TTInnerShadowStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737501184A38F00A35176 /* TTInsetStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7370F1184A38F00A35176 /* TTInsetStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737511184A38F00A35176 /* TTLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737101184A38F00A35176 /* TTLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737521184A38F00A35176 /* TTLinearGradientBorderStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737111184A38F00A35176 /* TTLinearGradientBorderStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737531184A38F00A35176 /* TTLinearGradientFillStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737121184A38F00A35176 /* TTLinearGradientFillStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737541184A38F00A35176 /* TTMaskStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737131184A38F00A35176 /* TTMaskStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737551184A38F00A35176 /* TTPartStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737141184A38F00A35176 /* TTPartStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737561184A38F00A35176 /* TTPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737151184A38F00A35176 /* TTPosition.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737571184A38F00A35176 /* TTRectangleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737161184A38F00A35176 /* TTRectangleShape.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737581184A38F00A35176 /* TTReflectiveFillStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737171184A38F00A35176 /* TTReflectiveFillStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737591184A38F00A35176 /* TTRoundedLeftArrowShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737181184A38F00A35176 /* TTRoundedLeftArrowShape.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7375A1184A38F00A35176 /* TTRoundedRectangleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737191184A38F00A35176 /* TTRoundedRectangleShape.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7375B1184A38F00A35176 /* TTRoundedRightArrowShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7371A1184A38F00A35176 /* TTRoundedRightArrowShape.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7375C1184A38F00A35176 /* TTShadowStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7371B1184A38F00A35176 /* TTShadowStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7375D1184A38F00A35176 /* TTShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7371C1184A38F00A35176 /* TTShape.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7375E1184A38F00A35176 /* TTShapeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7371D1184A38F00A35176 /* TTShapeInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6EE7375F1184A38F00A35176 /* TTShapeStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7371E1184A38F00A35176 /* TTShapeStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737601184A38F00A35176 /* TTSolidBorderStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7371F1184A38F00A35176 /* TTSolidBorderStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737611184A38F00A35176 /* TTSolidFillStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737201184A38F00A35176 /* TTSolidFillStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737621184A38F00A35176 /* TTSpeechBubbleShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737211184A38F00A35176 /* TTSpeechBubbleShape.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737631184A38F00A35176 /* TTStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737221184A38F00A35176 /* TTStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737641184A38F00A35176 /* TTStyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737231184A38F00A35176 /* TTStyleContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737651184A38F00A35176 /* TTStyledBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737241184A38F00A35176 /* TTStyledBlock.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737661184A38F00A35176 /* TTStyledBoldNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737251184A38F00A35176 /* TTStyledBoldNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737671184A38F00A35176 /* TTStyledBoxFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737261184A38F00A35176 /* TTStyledBoxFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737691184A38F00A35176 /* TTStyleDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737281184A38F00A35176 /* TTStyleDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7376A1184A38F00A35176 /* TTStyledElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737291184A38F00A35176 /* TTStyledElement.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7376B1184A38F00A35176 /* TTStyledFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7372A1184A38F00A35176 /* TTStyledFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7376C1184A38F00A35176 /* TTStyledImageFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7372B1184A38F00A35176 /* TTStyledImageFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7376D1184A38F00A35176 /* TTStyledImageNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7372C1184A38F00A35176 /* TTStyledImageNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7376E1184A38F00A35176 /* TTStyledInline.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7372D1184A38F00A35176 /* TTStyledInline.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7376F1184A38F00A35176 /* TTStyledInlineBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7372E1184A38F00A35176 /* TTStyledInlineBlock.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737701184A38F00A35176 /* TTStyledInlineFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7372F1184A38F00A35176 /* TTStyledInlineFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737711184A38F00A35176 /* TTStyledItalicNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737301184A38F00A35176 /* TTStyledItalicNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737721184A38F00A35176 /* TTStyledLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737311184A38F00A35176 /* TTStyledLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737731184A38F00A35176 /* TTStyledLineBreakNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737321184A38F00A35176 /* TTStyledLineBreakNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737751184A38F00A35176 /* TTStyledNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737341184A38F00A35176 /* TTStyledNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737761184A38F00A35176 /* TTStyledNodeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737351184A38F00A35176 /* TTStyledNodeInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6EE737771184A38F00A35176 /* TTStyledText.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737361184A38F00A35176 /* TTStyledText.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737781184A38F00A35176 /* TTStyledTextDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737371184A38F00A35176 /* TTStyledTextDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737791184A38F00A35176 /* TTStyledTextFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737381184A38F00A35176 /* TTStyledTextFrame.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7377B1184A38F00A35176 /* TTStyledTextNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7373A1184A38F00A35176 /* TTStyledTextNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7377C1184A38F00A35176 /* TTStyledTextParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7373B1184A38F00A35176 /* TTStyledTextParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7377F1184A38F00A35176 /* TTStyleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7373E1184A38F00A35176 /* TTStyleInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6EE737801184A38F00A35176 /* TTStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE7373F1184A38F00A35176 /* TTStyleSheet.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737811184A38F00A35176 /* TTTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737401184A38F00A35176 /* TTTextStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737821184A38F00A35176 /* UIColorAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737411184A38F00A35176 /* UIColorAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737831184A38F00A35176 /* UIFontAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737421184A38F00A35176 /* UIFontAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737841184A38F00A35176 /* UIImageAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE737431184A38F00A35176 /* UIImageAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE737C31184A39B00A35176 /* TTBevelBorderStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737851184A39B00A35176 /* TTBevelBorderStyle.m */; }; - 6EE737C41184A39B00A35176 /* TTBlendStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737861184A39B00A35176 /* TTBlendStyle.m */; }; - 6EE737C51184A39B00A35176 /* TTBoxStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737871184A39B00A35176 /* TTBoxStyle.m */; }; - 6EE737C61184A39B00A35176 /* TTContentStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737881184A39B00A35176 /* TTContentStyle.m */; }; - 6EE737C71184A39B00A35176 /* TTDefaultStyleSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737891184A39B00A35176 /* TTDefaultStyleSheet.m */; }; - 6EE737C81184A39B00A35176 /* TTFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7378A1184A39B00A35176 /* TTFlowLayout.m */; }; - 6EE737C91184A39B00A35176 /* TTFourBorderStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7378B1184A39B00A35176 /* TTFourBorderStyle.m */; }; - 6EE737CA1184A39B00A35176 /* TTGlobalStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7378C1184A39B00A35176 /* TTGlobalStyle.m */; }; - 6EE737CB1184A39B00A35176 /* TTGridLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7378D1184A39B00A35176 /* TTGridLayout.m */; }; - 6EE737CC1184A39B00A35176 /* TTHighlightBorderStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7378E1184A39B00A35176 /* TTHighlightBorderStyle.m */; }; - 6EE737CD1184A39B00A35176 /* TTImageStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7378F1184A39B00A35176 /* TTImageStyle.m */; }; - 6EE737CE1184A39B00A35176 /* TTInnerShadowStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737901184A39B00A35176 /* TTInnerShadowStyle.m */; }; - 6EE737CF1184A39B00A35176 /* TTInsetStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737911184A39B00A35176 /* TTInsetStyle.m */; }; - 6EE737D01184A39B00A35176 /* TTLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737921184A39B00A35176 /* TTLayout.m */; }; - 6EE737D11184A39B00A35176 /* TTLinearGradientBorderStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737931184A39B00A35176 /* TTLinearGradientBorderStyle.m */; }; - 6EE737D21184A39B00A35176 /* TTLinearGradientFillStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737941184A39B00A35176 /* TTLinearGradientFillStyle.m */; }; - 6EE737D31184A39B00A35176 /* TTMaskStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737951184A39B00A35176 /* TTMaskStyle.m */; }; - 6EE737D41184A39B00A35176 /* TTPartStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737961184A39B00A35176 /* TTPartStyle.m */; }; - 6EE737D51184A39B00A35176 /* TTRectangleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737971184A39B00A35176 /* TTRectangleShape.m */; }; - 6EE737D61184A39B00A35176 /* TTReflectiveFillStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737981184A39B00A35176 /* TTReflectiveFillStyle.m */; }; - 6EE737D71184A39B00A35176 /* TTRoundedLeftArrowShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737991184A39B00A35176 /* TTRoundedLeftArrowShape.m */; }; - 6EE737D81184A39B00A35176 /* TTRoundedRectangleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7379A1184A39B00A35176 /* TTRoundedRectangleShape.m */; }; - 6EE737D91184A39B00A35176 /* TTRoundedRightArrowShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7379B1184A39B00A35176 /* TTRoundedRightArrowShape.m */; }; - 6EE737DA1184A39B00A35176 /* TTShadowStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7379C1184A39B00A35176 /* TTShadowStyle.m */; }; - 6EE737DB1184A39B00A35176 /* TTShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7379D1184A39B00A35176 /* TTShape.m */; }; - 6EE737DC1184A39B00A35176 /* TTShapeInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7379E1184A39B00A35176 /* TTShapeInternal.m */; }; - 6EE737DD1184A39B00A35176 /* TTShapeStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE7379F1184A39B00A35176 /* TTShapeStyle.m */; }; - 6EE737DE1184A39B00A35176 /* TTSolidBorderStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A01184A39B00A35176 /* TTSolidBorderStyle.m */; }; - 6EE737DF1184A39B00A35176 /* TTSolidFillStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A11184A39B00A35176 /* TTSolidFillStyle.m */; }; - 6EE737E01184A39B00A35176 /* TTSpeechBubbleShape.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A21184A39B00A35176 /* TTSpeechBubbleShape.m */; }; - 6EE737E11184A39B00A35176 /* TTStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A31184A39B00A35176 /* TTStyle.m */; }; - 6EE737E21184A39B00A35176 /* TTStyleContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A41184A39B00A35176 /* TTStyleContext.m */; }; - 6EE737E31184A39B00A35176 /* TTStyledBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A51184A39B00A35176 /* TTStyledBlock.m */; }; - 6EE737E41184A39B00A35176 /* TTStyledBoldNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A61184A39B00A35176 /* TTStyledBoldNode.m */; }; - 6EE737E51184A39B00A35176 /* TTStyledBoxFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A71184A39B00A35176 /* TTStyledBoxFrame.m */; }; - 6EE737E71184A39B00A35176 /* TTStyledElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737A91184A39B00A35176 /* TTStyledElement.m */; }; - 6EE737E81184A39B00A35176 /* TTStyledFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737AA1184A39B00A35176 /* TTStyledFrame.m */; }; - 6EE737E91184A39B00A35176 /* TTStyledImageFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737AB1184A39B00A35176 /* TTStyledImageFrame.m */; }; - 6EE737EA1184A39B00A35176 /* TTStyledImageNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737AC1184A39B00A35176 /* TTStyledImageNode.m */; }; - 6EE737EB1184A39B00A35176 /* TTStyledInline.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737AD1184A39B00A35176 /* TTStyledInline.m */; }; - 6EE737EC1184A39B00A35176 /* TTStyledInlineBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737AE1184A39B00A35176 /* TTStyledInlineBlock.m */; }; - 6EE737ED1184A39B00A35176 /* TTStyledInlineFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737AF1184A39B00A35176 /* TTStyledInlineFrame.m */; }; - 6EE737EE1184A39B00A35176 /* TTStyledItalicNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737B01184A39B00A35176 /* TTStyledItalicNode.m */; }; - 6EE737EF1184A39B00A35176 /* TTStyledLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737B11184A39B00A35176 /* TTStyledLayout.m */; }; - 6EE737F01184A39B00A35176 /* TTStyledLineBreakNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737B21184A39B00A35176 /* TTStyledLineBreakNode.m */; }; - 6EE737F21184A39B00A35176 /* TTStyledNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737B41184A39B00A35176 /* TTStyledNode.m */; }; - 6EE737F31184A39B00A35176 /* TTStyledNodeInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737B51184A39B00A35176 /* TTStyledNodeInternal.m */; }; - 6EE737F41184A39B00A35176 /* TTStyledText.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737B61184A39B00A35176 /* TTStyledText.m */; }; - 6EE737F51184A39B00A35176 /* TTStyledTextFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737B71184A39B00A35176 /* TTStyledTextFrame.m */; }; - 6EE737F71184A39B00A35176 /* TTStyledTextNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737B91184A39B00A35176 /* TTStyledTextNode.m */; }; - 6EE737F81184A39B00A35176 /* TTStyledTextParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737BA1184A39B00A35176 /* TTStyledTextParser.m */; }; - 6EE737FB1184A39B00A35176 /* TTStyleInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737BD1184A39B00A35176 /* TTStyleInternal.m */; }; - 6EE737FC1184A39B00A35176 /* TTStyleSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737BE1184A39B00A35176 /* TTStyleSheet.m */; }; - 6EE737FD1184A39B00A35176 /* TTTextStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737BF1184A39B00A35176 /* TTTextStyle.m */; }; - 6EE737FE1184A39B00A35176 /* UIColorAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737C01184A39B00A35176 /* UIColorAdditions.m */; }; - 6EE737FF1184A39B00A35176 /* UIFontAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737C11184A39B00A35176 /* UIFontAdditions.m */; }; - 6EE738001184A39B00A35176 /* UIImageAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE737C21184A39B00A35176 /* UIImageAdditions.m */; }; - 6EE738A61184ADB800A35176 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE738A31184ADB400A35176 /* libThree20Network.a */; }; - 6EE738C21184AE4A00A35176 /* Three20Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EE738C11184AE4A00A35176 /* Three20Style.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE7399A1184B9CE00A35176 /* StyleAdditionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE739981184B9CE00A35176 /* StyleAdditionTests.m */; }; - 6EE7399B1184B9CE00A35176 /* StyleGlobalTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EE739991184B9CE00A35176 /* StyleGlobalTests.m */; }; - 6EE739D01184BB0400A35176 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libThree20Style.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE7367011849C6300A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE736C611849FA000A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6EE738A21184ADB400A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6EE738A41184ADB400A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE738AA1184ADD000A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6EE738AC1184ADE300A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 66313A7D1267B4E800C09C9F /* Three20Style_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20Style_Prefix.pch; path = Headers/Three20Style_Prefix.pch; sourceTree = ""; }; - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E64548F1184D3BC00F08CB1 /* Three20Style+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Three20Style+Additions.h"; path = "Headers/Three20Style+Additions.h"; sourceTree = ""; }; - 6E6464021187F5CB00F08CB1 /* TTStyledButtonNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledButtonNode.h; path = Headers/TTStyledButtonNode.h; sourceTree = ""; }; - 6E6464031187F5CB00F08CB1 /* TTStyledLinkNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledLinkNode.h; path = Headers/TTStyledLinkNode.h; sourceTree = ""; }; - 6E64640A1187F5EC00F08CB1 /* TTStyledButtonNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledButtonNode.m; path = Sources/TTStyledButtonNode.m; sourceTree = ""; }; - 6E64640B1187F5EC00F08CB1 /* TTStyledLinkNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledLinkNode.m; path = Sources/TTStyledLinkNode.m; sourceTree = ""; }; - 6E850F0711B0FE200071A4FD /* TTDefaultStyleSheet+DragRefreshHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "TTDefaultStyleSheet+DragRefreshHeader.h"; path = "Headers/TTDefaultStyleSheet+DragRefreshHeader.h"; sourceTree = ""; }; - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EE7364B11849B3D00A35176 /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EE737031184A38F00A35176 /* TTBevelBorderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTBevelBorderStyle.h; path = Headers/TTBevelBorderStyle.h; sourceTree = ""; }; - 6EE737041184A38F00A35176 /* TTBlendStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTBlendStyle.h; path = Headers/TTBlendStyle.h; sourceTree = ""; }; - 6EE737051184A38F00A35176 /* TTBoxStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTBoxStyle.h; path = Headers/TTBoxStyle.h; sourceTree = ""; }; - 6EE737061184A38F00A35176 /* TTContentStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTContentStyle.h; path = Headers/TTContentStyle.h; sourceTree = ""; }; - 6EE737071184A38F00A35176 /* TTDefaultStyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTDefaultStyleSheet.h; path = Headers/TTDefaultStyleSheet.h; sourceTree = ""; }; - 6EE737081184A38F00A35176 /* TTFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTFlowLayout.h; path = Headers/TTFlowLayout.h; sourceTree = ""; }; - 6EE737091184A38F00A35176 /* TTFourBorderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTFourBorderStyle.h; path = Headers/TTFourBorderStyle.h; sourceTree = ""; }; - 6EE7370A1184A38F00A35176 /* TTGlobalStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGlobalStyle.h; path = Headers/TTGlobalStyle.h; sourceTree = ""; }; - 6EE7370B1184A38F00A35176 /* TTGridLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGridLayout.h; path = Headers/TTGridLayout.h; sourceTree = ""; }; - 6EE7370C1184A38F00A35176 /* TTHighlightBorderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTHighlightBorderStyle.h; path = Headers/TTHighlightBorderStyle.h; sourceTree = ""; }; - 6EE7370D1184A38F00A35176 /* TTImageStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTImageStyle.h; path = Headers/TTImageStyle.h; sourceTree = ""; }; - 6EE7370E1184A38F00A35176 /* TTInnerShadowStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTInnerShadowStyle.h; path = Headers/TTInnerShadowStyle.h; sourceTree = ""; }; - 6EE7370F1184A38F00A35176 /* TTInsetStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTInsetStyle.h; path = Headers/TTInsetStyle.h; sourceTree = ""; }; - 6EE737101184A38F00A35176 /* TTLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLayout.h; path = Headers/TTLayout.h; sourceTree = ""; }; - 6EE737111184A38F00A35176 /* TTLinearGradientBorderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLinearGradientBorderStyle.h; path = Headers/TTLinearGradientBorderStyle.h; sourceTree = ""; }; - 6EE737121184A38F00A35176 /* TTLinearGradientFillStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLinearGradientFillStyle.h; path = Headers/TTLinearGradientFillStyle.h; sourceTree = ""; }; - 6EE737131184A38F00A35176 /* TTMaskStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTMaskStyle.h; path = Headers/TTMaskStyle.h; sourceTree = ""; }; - 6EE737141184A38F00A35176 /* TTPartStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPartStyle.h; path = Headers/TTPartStyle.h; sourceTree = ""; }; - 6EE737151184A38F00A35176 /* TTPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPosition.h; path = Headers/TTPosition.h; sourceTree = ""; }; - 6EE737161184A38F00A35176 /* TTRectangleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTRectangleShape.h; path = Headers/TTRectangleShape.h; sourceTree = ""; }; - 6EE737171184A38F00A35176 /* TTReflectiveFillStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTReflectiveFillStyle.h; path = Headers/TTReflectiveFillStyle.h; sourceTree = ""; }; - 6EE737181184A38F00A35176 /* TTRoundedLeftArrowShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTRoundedLeftArrowShape.h; path = Headers/TTRoundedLeftArrowShape.h; sourceTree = ""; }; - 6EE737191184A38F00A35176 /* TTRoundedRectangleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTRoundedRectangleShape.h; path = Headers/TTRoundedRectangleShape.h; sourceTree = ""; }; - 6EE7371A1184A38F00A35176 /* TTRoundedRightArrowShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTRoundedRightArrowShape.h; path = Headers/TTRoundedRightArrowShape.h; sourceTree = ""; }; - 6EE7371B1184A38F00A35176 /* TTShadowStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTShadowStyle.h; path = Headers/TTShadowStyle.h; sourceTree = ""; }; - 6EE7371C1184A38F00A35176 /* TTShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTShape.h; path = Headers/TTShape.h; sourceTree = ""; }; - 6EE7371D1184A38F00A35176 /* TTShapeInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTShapeInternal.h; path = Headers/TTShapeInternal.h; sourceTree = ""; }; - 6EE7371E1184A38F00A35176 /* TTShapeStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTShapeStyle.h; path = Headers/TTShapeStyle.h; sourceTree = ""; }; - 6EE7371F1184A38F00A35176 /* TTSolidBorderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSolidBorderStyle.h; path = Headers/TTSolidBorderStyle.h; sourceTree = ""; }; - 6EE737201184A38F00A35176 /* TTSolidFillStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSolidFillStyle.h; path = Headers/TTSolidFillStyle.h; sourceTree = ""; }; - 6EE737211184A38F00A35176 /* TTSpeechBubbleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSpeechBubbleShape.h; path = Headers/TTSpeechBubbleShape.h; sourceTree = ""; }; - 6EE737221184A38F00A35176 /* TTStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyle.h; path = Headers/TTStyle.h; sourceTree = ""; }; - 6EE737231184A38F00A35176 /* TTStyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyleContext.h; path = Headers/TTStyleContext.h; sourceTree = ""; }; - 6EE737241184A38F00A35176 /* TTStyledBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledBlock.h; path = Headers/TTStyledBlock.h; sourceTree = ""; }; - 6EE737251184A38F00A35176 /* TTStyledBoldNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledBoldNode.h; path = Headers/TTStyledBoldNode.h; sourceTree = ""; }; - 6EE737261184A38F00A35176 /* TTStyledBoxFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledBoxFrame.h; path = Headers/TTStyledBoxFrame.h; sourceTree = ""; }; - 6EE737281184A38F00A35176 /* TTStyleDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyleDelegate.h; path = Headers/TTStyleDelegate.h; sourceTree = ""; }; - 6EE737291184A38F00A35176 /* TTStyledElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledElement.h; path = Headers/TTStyledElement.h; sourceTree = ""; }; - 6EE7372A1184A38F00A35176 /* TTStyledFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledFrame.h; path = Headers/TTStyledFrame.h; sourceTree = ""; }; - 6EE7372B1184A38F00A35176 /* TTStyledImageFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledImageFrame.h; path = Headers/TTStyledImageFrame.h; sourceTree = ""; }; - 6EE7372C1184A38F00A35176 /* TTStyledImageNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledImageNode.h; path = Headers/TTStyledImageNode.h; sourceTree = ""; }; - 6EE7372D1184A38F00A35176 /* TTStyledInline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledInline.h; path = Headers/TTStyledInline.h; sourceTree = ""; }; - 6EE7372E1184A38F00A35176 /* TTStyledInlineBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledInlineBlock.h; path = Headers/TTStyledInlineBlock.h; sourceTree = ""; }; - 6EE7372F1184A38F00A35176 /* TTStyledInlineFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledInlineFrame.h; path = Headers/TTStyledInlineFrame.h; sourceTree = ""; }; - 6EE737301184A38F00A35176 /* TTStyledItalicNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledItalicNode.h; path = Headers/TTStyledItalicNode.h; sourceTree = ""; }; - 6EE737311184A38F00A35176 /* TTStyledLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledLayout.h; path = Headers/TTStyledLayout.h; sourceTree = ""; }; - 6EE737321184A38F00A35176 /* TTStyledLineBreakNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledLineBreakNode.h; path = Headers/TTStyledLineBreakNode.h; sourceTree = ""; }; - 6EE737341184A38F00A35176 /* TTStyledNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledNode.h; path = Headers/TTStyledNode.h; sourceTree = ""; }; - 6EE737351184A38F00A35176 /* TTStyledNodeInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledNodeInternal.h; path = Headers/TTStyledNodeInternal.h; sourceTree = ""; }; - 6EE737361184A38F00A35176 /* TTStyledText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledText.h; path = Headers/TTStyledText.h; sourceTree = ""; }; - 6EE737371184A38F00A35176 /* TTStyledTextDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledTextDelegate.h; path = Headers/TTStyledTextDelegate.h; sourceTree = ""; }; - 6EE737381184A38F00A35176 /* TTStyledTextFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledTextFrame.h; path = Headers/TTStyledTextFrame.h; sourceTree = ""; }; - 6EE7373A1184A38F00A35176 /* TTStyledTextNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledTextNode.h; path = Headers/TTStyledTextNode.h; sourceTree = ""; }; - 6EE7373B1184A38F00A35176 /* TTStyledTextParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledTextParser.h; path = Headers/TTStyledTextParser.h; sourceTree = ""; }; - 6EE7373E1184A38F00A35176 /* TTStyleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyleInternal.h; path = Headers/TTStyleInternal.h; sourceTree = ""; }; - 6EE7373F1184A38F00A35176 /* TTStyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyleSheet.h; path = Headers/TTStyleSheet.h; sourceTree = ""; }; - 6EE737401184A38F00A35176 /* TTTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTextStyle.h; path = Headers/TTTextStyle.h; sourceTree = ""; }; - 6EE737411184A38F00A35176 /* UIColorAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIColorAdditions.h; path = Headers/UIColorAdditions.h; sourceTree = ""; }; - 6EE737421184A38F00A35176 /* UIFontAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIFontAdditions.h; path = Headers/UIFontAdditions.h; sourceTree = ""; }; - 6EE737431184A38F00A35176 /* UIImageAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIImageAdditions.h; path = Headers/UIImageAdditions.h; sourceTree = ""; }; - 6EE737851184A39B00A35176 /* TTBevelBorderStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTBevelBorderStyle.m; path = Sources/TTBevelBorderStyle.m; sourceTree = ""; }; - 6EE737861184A39B00A35176 /* TTBlendStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTBlendStyle.m; path = Sources/TTBlendStyle.m; sourceTree = ""; }; - 6EE737871184A39B00A35176 /* TTBoxStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTBoxStyle.m; path = Sources/TTBoxStyle.m; sourceTree = ""; }; - 6EE737881184A39B00A35176 /* TTContentStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTContentStyle.m; path = Sources/TTContentStyle.m; sourceTree = ""; }; - 6EE737891184A39B00A35176 /* TTDefaultStyleSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTDefaultStyleSheet.m; path = Sources/TTDefaultStyleSheet.m; sourceTree = ""; }; - 6EE7378A1184A39B00A35176 /* TTFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTFlowLayout.m; path = Sources/TTFlowLayout.m; sourceTree = ""; }; - 6EE7378B1184A39B00A35176 /* TTFourBorderStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTFourBorderStyle.m; path = Sources/TTFourBorderStyle.m; sourceTree = ""; }; - 6EE7378C1184A39B00A35176 /* TTGlobalStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGlobalStyle.m; path = Sources/TTGlobalStyle.m; sourceTree = ""; }; - 6EE7378D1184A39B00A35176 /* TTGridLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGridLayout.m; path = Sources/TTGridLayout.m; sourceTree = ""; }; - 6EE7378E1184A39B00A35176 /* TTHighlightBorderStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTHighlightBorderStyle.m; path = Sources/TTHighlightBorderStyle.m; sourceTree = ""; }; - 6EE7378F1184A39B00A35176 /* TTImageStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTImageStyle.m; path = Sources/TTImageStyle.m; sourceTree = ""; }; - 6EE737901184A39B00A35176 /* TTInnerShadowStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTInnerShadowStyle.m; path = Sources/TTInnerShadowStyle.m; sourceTree = ""; }; - 6EE737911184A39B00A35176 /* TTInsetStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTInsetStyle.m; path = Sources/TTInsetStyle.m; sourceTree = ""; }; - 6EE737921184A39B00A35176 /* TTLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLayout.m; path = Sources/TTLayout.m; sourceTree = ""; }; - 6EE737931184A39B00A35176 /* TTLinearGradientBorderStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLinearGradientBorderStyle.m; path = Sources/TTLinearGradientBorderStyle.m; sourceTree = ""; }; - 6EE737941184A39B00A35176 /* TTLinearGradientFillStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLinearGradientFillStyle.m; path = Sources/TTLinearGradientFillStyle.m; sourceTree = ""; }; - 6EE737951184A39B00A35176 /* TTMaskStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTMaskStyle.m; path = Sources/TTMaskStyle.m; sourceTree = ""; }; - 6EE737961184A39B00A35176 /* TTPartStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTPartStyle.m; path = Sources/TTPartStyle.m; sourceTree = ""; }; - 6EE737971184A39B00A35176 /* TTRectangleShape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTRectangleShape.m; path = Sources/TTRectangleShape.m; sourceTree = ""; }; - 6EE737981184A39B00A35176 /* TTReflectiveFillStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTReflectiveFillStyle.m; path = Sources/TTReflectiveFillStyle.m; sourceTree = ""; }; - 6EE737991184A39B00A35176 /* TTRoundedLeftArrowShape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTRoundedLeftArrowShape.m; path = Sources/TTRoundedLeftArrowShape.m; sourceTree = ""; }; - 6EE7379A1184A39B00A35176 /* TTRoundedRectangleShape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTRoundedRectangleShape.m; path = Sources/TTRoundedRectangleShape.m; sourceTree = ""; }; - 6EE7379B1184A39B00A35176 /* TTRoundedRightArrowShape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTRoundedRightArrowShape.m; path = Sources/TTRoundedRightArrowShape.m; sourceTree = ""; }; - 6EE7379C1184A39B00A35176 /* TTShadowStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTShadowStyle.m; path = Sources/TTShadowStyle.m; sourceTree = ""; }; - 6EE7379D1184A39B00A35176 /* TTShape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTShape.m; path = Sources/TTShape.m; sourceTree = ""; }; - 6EE7379E1184A39B00A35176 /* TTShapeInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTShapeInternal.m; path = Sources/TTShapeInternal.m; sourceTree = ""; }; - 6EE7379F1184A39B00A35176 /* TTShapeStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTShapeStyle.m; path = Sources/TTShapeStyle.m; sourceTree = ""; }; - 6EE737A01184A39B00A35176 /* TTSolidBorderStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSolidBorderStyle.m; path = Sources/TTSolidBorderStyle.m; sourceTree = ""; }; - 6EE737A11184A39B00A35176 /* TTSolidFillStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSolidFillStyle.m; path = Sources/TTSolidFillStyle.m; sourceTree = ""; }; - 6EE737A21184A39B00A35176 /* TTSpeechBubbleShape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSpeechBubbleShape.m; path = Sources/TTSpeechBubbleShape.m; sourceTree = ""; }; - 6EE737A31184A39B00A35176 /* TTStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyle.m; path = Sources/TTStyle.m; sourceTree = ""; }; - 6EE737A41184A39B00A35176 /* TTStyleContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyleContext.m; path = Sources/TTStyleContext.m; sourceTree = ""; }; - 6EE737A51184A39B00A35176 /* TTStyledBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledBlock.m; path = Sources/TTStyledBlock.m; sourceTree = ""; }; - 6EE737A61184A39B00A35176 /* TTStyledBoldNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledBoldNode.m; path = Sources/TTStyledBoldNode.m; sourceTree = ""; }; - 6EE737A71184A39B00A35176 /* TTStyledBoxFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledBoxFrame.m; path = Sources/TTStyledBoxFrame.m; sourceTree = ""; }; - 6EE737A91184A39B00A35176 /* TTStyledElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledElement.m; path = Sources/TTStyledElement.m; sourceTree = ""; }; - 6EE737AA1184A39B00A35176 /* TTStyledFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledFrame.m; path = Sources/TTStyledFrame.m; sourceTree = ""; }; - 6EE737AB1184A39B00A35176 /* TTStyledImageFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledImageFrame.m; path = Sources/TTStyledImageFrame.m; sourceTree = ""; }; - 6EE737AC1184A39B00A35176 /* TTStyledImageNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledImageNode.m; path = Sources/TTStyledImageNode.m; sourceTree = ""; }; - 6EE737AD1184A39B00A35176 /* TTStyledInline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledInline.m; path = Sources/TTStyledInline.m; sourceTree = ""; }; - 6EE737AE1184A39B00A35176 /* TTStyledInlineBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledInlineBlock.m; path = Sources/TTStyledInlineBlock.m; sourceTree = ""; }; - 6EE737AF1184A39B00A35176 /* TTStyledInlineFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledInlineFrame.m; path = Sources/TTStyledInlineFrame.m; sourceTree = ""; }; - 6EE737B01184A39B00A35176 /* TTStyledItalicNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledItalicNode.m; path = Sources/TTStyledItalicNode.m; sourceTree = ""; }; - 6EE737B11184A39B00A35176 /* TTStyledLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledLayout.m; path = Sources/TTStyledLayout.m; sourceTree = ""; }; - 6EE737B21184A39B00A35176 /* TTStyledLineBreakNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledLineBreakNode.m; path = Sources/TTStyledLineBreakNode.m; sourceTree = ""; }; - 6EE737B41184A39B00A35176 /* TTStyledNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledNode.m; path = Sources/TTStyledNode.m; sourceTree = ""; }; - 6EE737B51184A39B00A35176 /* TTStyledNodeInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledNodeInternal.m; path = Sources/TTStyledNodeInternal.m; sourceTree = ""; }; - 6EE737B61184A39B00A35176 /* TTStyledText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledText.m; path = Sources/TTStyledText.m; sourceTree = ""; }; - 6EE737B71184A39B00A35176 /* TTStyledTextFrame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledTextFrame.m; path = Sources/TTStyledTextFrame.m; sourceTree = ""; }; - 6EE737B91184A39B00A35176 /* TTStyledTextNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledTextNode.m; path = Sources/TTStyledTextNode.m; sourceTree = ""; }; - 6EE737BA1184A39B00A35176 /* TTStyledTextParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledTextParser.m; path = Sources/TTStyledTextParser.m; sourceTree = ""; }; - 6EE737BD1184A39B00A35176 /* TTStyleInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyleInternal.m; path = Sources/TTStyleInternal.m; sourceTree = ""; }; - 6EE737BE1184A39B00A35176 /* TTStyleSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyleSheet.m; path = Sources/TTStyleSheet.m; sourceTree = ""; }; - 6EE737BF1184A39B00A35176 /* TTTextStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTextStyle.m; path = Sources/TTTextStyle.m; sourceTree = ""; }; - 6EE737C01184A39B00A35176 /* UIColorAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIColorAdditions.m; path = Sources/UIColorAdditions.m; sourceTree = ""; }; - 6EE737C11184A39B00A35176 /* UIFontAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIFontAdditions.m; path = Sources/UIFontAdditions.m; sourceTree = ""; }; - 6EE737C21184A39B00A35176 /* UIImageAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIImageAdditions.m; path = Sources/UIImageAdditions.m; sourceTree = ""; }; - 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EE738C11184AE4A00A35176 /* Three20Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20Style.h; path = Headers/Three20Style.h; sourceTree = ""; }; - 6EE739981184B9CE00A35176 /* StyleAdditionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = StyleAdditionTests.m; path = UnitTests/StyleAdditionTests.m; sourceTree = ""; }; - 6EE739991184B9CE00A35176 /* StyleGlobalTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = StyleGlobalTests.m; path = UnitTests/StyleGlobalTests.m; sourceTree = ""; }; - BEF31F3A0F352DF5000DE5D2 /* libThree20Style.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libThree20Style.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* StyleUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StyleUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */, - 6EE738A61184ADB800A35176 /* libThree20Network.a in Frameworks */, - 6EE739D01184BB0400A35176 /* libThree20Style.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libThree20Style.a */, - EB9E6C6210B6A8F800DE563C /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6EE738C11184AE4A00A35176 /* Three20Style.h */, - 6E64548F1184D3BC00F08CB1 /* Three20Style+Additions.h */, - 66313A7D1267B4E800C09C9F /* Three20Style_Prefix.pch */, - 6EE737001184A1D500A35176 /* Source */, - 6E08B743118397FA00DA1579 /* Dependencies */, - 6EE7364D11849B4200A35176 /* Configurations */, - 6E08B274118282F700DA1579 /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 6E08B274118282F700DA1579 /* Tests */ = { - isa = PBXGroup; - children = ( - 6EE7364611849AF200A35176 /* Resources */, - 6EE739981184B9CE00A35176 /* StyleAdditionTests.m */, - 6EE739991184B9CE00A35176 /* StyleGlobalTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6E08B743118397FA00DA1579 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */, - 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EE7364611849AF200A35176 /* Resources */ = { - isa = PBXGroup; - children = ( - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6EE7364D11849B4200A35176 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6EE7364B11849B3D00A35176 /* Library.xcconfig */, - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */, - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6EE7366711849C5800A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE7366C11849C5800A35176 /* libThree20Core.a */, - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EE737001184A1D500A35176 /* Source */ = { - isa = PBXGroup; - children = ( - 6EE737011184A1E500A35176 /* Global */, - 6EE7384B1184A4F500A35176 /* Additions */, - 6EE738401184A3C800A35176 /* Stylesheet */, - 6EE738511184A9F700A35176 /* Style */, - 6EE738541184AAC300A35176 /* Shape */, - 6EE738571184AB1900A35176 /* Layout */, - 6EE7385F1184AC8500A35176 /* Styled Layout */, - 6EE738591184AB4500A35176 /* Styled Text */, - ); - name = Source; - sourceTree = ""; - }; - 6EE737011184A1E500A35176 /* Global */ = { - isa = PBXGroup; - children = ( - 6EE7370A1184A38F00A35176 /* TTGlobalStyle.h */, - 6EE7378C1184A39B00A35176 /* TTGlobalStyle.m */, - 6EE737151184A38F00A35176 /* TTPosition.h */, - ); - name = Global; - sourceTree = ""; - }; - 6EE738401184A3C800A35176 /* Stylesheet */ = { - isa = PBXGroup; - children = ( - 6EE7373F1184A38F00A35176 /* TTStyleSheet.h */, - 6EE737BE1184A39B00A35176 /* TTStyleSheet.m */, - 6EE737071184A38F00A35176 /* TTDefaultStyleSheet.h */, - 6EE737891184A39B00A35176 /* TTDefaultStyleSheet.m */, - 6E850F0711B0FE200071A4FD /* TTDefaultStyleSheet+DragRefreshHeader.h */, - ); - name = Stylesheet; - sourceTree = ""; - }; - 6EE7384B1184A4F500A35176 /* Additions */ = { - isa = PBXGroup; - children = ( - 6EE737411184A38F00A35176 /* UIColorAdditions.h */, - 6EE737C01184A39B00A35176 /* UIColorAdditions.m */, - 6EE737421184A38F00A35176 /* UIFontAdditions.h */, - 6EE737C11184A39B00A35176 /* UIFontAdditions.m */, - 6EE737431184A38F00A35176 /* UIImageAdditions.h */, - 6EE737C21184A39B00A35176 /* UIImageAdditions.m */, - ); - name = Additions; - sourceTree = ""; - }; - 6EE738511184A9F700A35176 /* Style */ = { - isa = PBXGroup; - children = ( - 6EE737221184A38F00A35176 /* TTStyle.h */, - 6EE737A31184A39B00A35176 /* TTStyle.m */, - 6EE737281184A38F00A35176 /* TTStyleDelegate.h */, - 6EE738901184ACDA00A35176 /* Private */, - 6EE738531184AA9F00A35176 /* Context */, - 6EE738521184AA1500A35176 /* Styles */, - ); - name = Style; - sourceTree = ""; - }; - 6EE738521184AA1500A35176 /* Styles */ = { - isa = PBXGroup; - children = ( - 6EE737031184A38F00A35176 /* TTBevelBorderStyle.h */, - 6EE737851184A39B00A35176 /* TTBevelBorderStyle.m */, - 6EE737041184A38F00A35176 /* TTBlendStyle.h */, - 6EE737861184A39B00A35176 /* TTBlendStyle.m */, - 6EE737051184A38F00A35176 /* TTBoxStyle.h */, - 6EE737871184A39B00A35176 /* TTBoxStyle.m */, - 6EE737061184A38F00A35176 /* TTContentStyle.h */, - 6EE737881184A39B00A35176 /* TTContentStyle.m */, - 6EE737091184A38F00A35176 /* TTFourBorderStyle.h */, - 6EE7378B1184A39B00A35176 /* TTFourBorderStyle.m */, - 6EE7370C1184A38F00A35176 /* TTHighlightBorderStyle.h */, - 6EE7378E1184A39B00A35176 /* TTHighlightBorderStyle.m */, - 6EE7370D1184A38F00A35176 /* TTImageStyle.h */, - 6EE7378F1184A39B00A35176 /* TTImageStyle.m */, - 6EE7370E1184A38F00A35176 /* TTInnerShadowStyle.h */, - 6EE737901184A39B00A35176 /* TTInnerShadowStyle.m */, - 6EE7370F1184A38F00A35176 /* TTInsetStyle.h */, - 6EE737911184A39B00A35176 /* TTInsetStyle.m */, - 6EE737111184A38F00A35176 /* TTLinearGradientBorderStyle.h */, - 6EE737931184A39B00A35176 /* TTLinearGradientBorderStyle.m */, - 6EE737121184A38F00A35176 /* TTLinearGradientFillStyle.h */, - 6EE737941184A39B00A35176 /* TTLinearGradientFillStyle.m */, - 6EE737131184A38F00A35176 /* TTMaskStyle.h */, - 6EE737951184A39B00A35176 /* TTMaskStyle.m */, - 6EE737141184A38F00A35176 /* TTPartStyle.h */, - 6EE737961184A39B00A35176 /* TTPartStyle.m */, - 6EE737171184A38F00A35176 /* TTReflectiveFillStyle.h */, - 6EE737981184A39B00A35176 /* TTReflectiveFillStyle.m */, - 6EE7371B1184A38F00A35176 /* TTShadowStyle.h */, - 6EE7379C1184A39B00A35176 /* TTShadowStyle.m */, - 6EE7371E1184A38F00A35176 /* TTShapeStyle.h */, - 6EE7379F1184A39B00A35176 /* TTShapeStyle.m */, - 6EE7371F1184A38F00A35176 /* TTSolidBorderStyle.h */, - 6EE737A01184A39B00A35176 /* TTSolidBorderStyle.m */, - 6EE737201184A38F00A35176 /* TTSolidFillStyle.h */, - 6EE737A11184A39B00A35176 /* TTSolidFillStyle.m */, - 6EE737401184A38F00A35176 /* TTTextStyle.h */, - 6EE737BF1184A39B00A35176 /* TTTextStyle.m */, - ); - name = Styles; - sourceTree = ""; - }; - 6EE738531184AA9F00A35176 /* Context */ = { - isa = PBXGroup; - children = ( - 6EE737231184A38F00A35176 /* TTStyleContext.h */, - 6EE737A41184A39B00A35176 /* TTStyleContext.m */, - ); - name = Context; - sourceTree = ""; - }; - 6EE738541184AAC300A35176 /* Shape */ = { - isa = PBXGroup; - children = ( - 6EE7371C1184A38F00A35176 /* TTShape.h */, - 6EE7379D1184A39B00A35176 /* TTShape.m */, - 6EE738561184AB0500A35176 /* Private */, - 6EE738551184AAEC00A35176 /* Shapes */, - ); - name = Shape; - sourceTree = ""; - }; - 6EE738551184AAEC00A35176 /* Shapes */ = { - isa = PBXGroup; - children = ( - 6EE737161184A38F00A35176 /* TTRectangleShape.h */, - 6EE737971184A39B00A35176 /* TTRectangleShape.m */, - 6EE737181184A38F00A35176 /* TTRoundedLeftArrowShape.h */, - 6EE737991184A39B00A35176 /* TTRoundedLeftArrowShape.m */, - 6EE737191184A38F00A35176 /* TTRoundedRectangleShape.h */, - 6EE7379A1184A39B00A35176 /* TTRoundedRectangleShape.m */, - 6EE7371A1184A38F00A35176 /* TTRoundedRightArrowShape.h */, - 6EE7379B1184A39B00A35176 /* TTRoundedRightArrowShape.m */, - 6EE737211184A38F00A35176 /* TTSpeechBubbleShape.h */, - 6EE737A21184A39B00A35176 /* TTSpeechBubbleShape.m */, - ); - name = Shapes; - sourceTree = ""; - }; - 6EE738561184AB0500A35176 /* Private */ = { - isa = PBXGroup; - children = ( - 6EE7371D1184A38F00A35176 /* TTShapeInternal.h */, - 6EE7379E1184A39B00A35176 /* TTShapeInternal.m */, - ); - name = Private; - sourceTree = ""; - }; - 6EE738571184AB1900A35176 /* Layout */ = { - isa = PBXGroup; - children = ( - 6EE737101184A38F00A35176 /* TTLayout.h */, - 6EE737921184A39B00A35176 /* TTLayout.m */, - 6EE738581184AB3100A35176 /* Layouts */, - ); - name = Layout; - sourceTree = ""; - }; - 6EE738581184AB3100A35176 /* Layouts */ = { - isa = PBXGroup; - children = ( - 6EE737081184A38F00A35176 /* TTFlowLayout.h */, - 6EE7378A1184A39B00A35176 /* TTFlowLayout.m */, - 6EE7370B1184A38F00A35176 /* TTGridLayout.h */, - 6EE7378D1184A39B00A35176 /* TTGridLayout.m */, - ); - name = Layouts; - sourceTree = ""; - }; - 6EE738591184AB4500A35176 /* Styled Text */ = { - isa = PBXGroup; - children = ( - 6EE737361184A38F00A35176 /* TTStyledText.h */, - 6EE737B61184A39B00A35176 /* TTStyledText.m */, - 6EE737371184A38F00A35176 /* TTStyledTextDelegate.h */, - 6EE738911184AD2B00A35176 /* Styled Text Parser */, - 6EE7385A1184AB7200A35176 /* Styled Node */, - 6EE7385D1184AC1400A35176 /* Styled Frame */, - ); - name = "Styled Text"; - sourceTree = ""; - }; - 6EE7385A1184AB7200A35176 /* Styled Node */ = { - isa = PBXGroup; - children = ( - 6EE737341184A38F00A35176 /* TTStyledNode.h */, - 6EE737B41184A39B00A35176 /* TTStyledNode.m */, - 6EE7385B1184AB8400A35176 /* Private */, - 6EE7385C1184AB9300A35176 /* Styled Nodes */, - ); - name = "Styled Node"; - sourceTree = ""; - }; - 6EE7385B1184AB8400A35176 /* Private */ = { - isa = PBXGroup; - children = ( - 6EE737351184A38F00A35176 /* TTStyledNodeInternal.h */, - 6EE737B51184A39B00A35176 /* TTStyledNodeInternal.m */, - ); - name = Private; - sourceTree = ""; - }; - 6EE7385C1184AB9300A35176 /* Styled Nodes */ = { - isa = PBXGroup; - children = ( - 6EE737291184A38F00A35176 /* TTStyledElement.h */, - 6EE737A91184A39B00A35176 /* TTStyledElement.m */, - 6EE737241184A38F00A35176 /* TTStyledBlock.h */, - 6EE737A51184A39B00A35176 /* TTStyledBlock.m */, - 6EE7372D1184A38F00A35176 /* TTStyledInline.h */, - 6EE737AD1184A39B00A35176 /* TTStyledInline.m */, - 6EE7372E1184A38F00A35176 /* TTStyledInlineBlock.h */, - 6EE737AE1184A39B00A35176 /* TTStyledInlineBlock.m */, - 6EE737251184A38F00A35176 /* TTStyledBoldNode.h */, - 6EE737A61184A39B00A35176 /* TTStyledBoldNode.m */, - 6E6464021187F5CB00F08CB1 /* TTStyledButtonNode.h */, - 6E64640A1187F5EC00F08CB1 /* TTStyledButtonNode.m */, - 6EE7372C1184A38F00A35176 /* TTStyledImageNode.h */, - 6EE737AC1184A39B00A35176 /* TTStyledImageNode.m */, - 6EE737301184A38F00A35176 /* TTStyledItalicNode.h */, - 6EE737B01184A39B00A35176 /* TTStyledItalicNode.m */, - 6EE737321184A38F00A35176 /* TTStyledLineBreakNode.h */, - 6EE737B21184A39B00A35176 /* TTStyledLineBreakNode.m */, - 6E6464031187F5CB00F08CB1 /* TTStyledLinkNode.h */, - 6E64640B1187F5EC00F08CB1 /* TTStyledLinkNode.m */, - 6EE7373A1184A38F00A35176 /* TTStyledTextNode.h */, - 6EE737B91184A39B00A35176 /* TTStyledTextNode.m */, - ); - name = "Styled Nodes"; - sourceTree = ""; - }; - 6EE7385D1184AC1400A35176 /* Styled Frame */ = { - isa = PBXGroup; - children = ( - 6EE7372A1184A38F00A35176 /* TTStyledFrame.h */, - 6EE737AA1184A39B00A35176 /* TTStyledFrame.m */, - 6EE7385E1184AC3D00A35176 /* Styled Frames */, - ); - name = "Styled Frame"; - sourceTree = ""; - }; - 6EE7385E1184AC3D00A35176 /* Styled Frames */ = { - isa = PBXGroup; - children = ( - 6EE737261184A38F00A35176 /* TTStyledBoxFrame.h */, - 6EE737A71184A39B00A35176 /* TTStyledBoxFrame.m */, - 6EE7372B1184A38F00A35176 /* TTStyledImageFrame.h */, - 6EE737AB1184A39B00A35176 /* TTStyledImageFrame.m */, - 6EE7372F1184A38F00A35176 /* TTStyledInlineFrame.h */, - 6EE737AF1184A39B00A35176 /* TTStyledInlineFrame.m */, - 6EE737381184A38F00A35176 /* TTStyledTextFrame.h */, - 6EE737B71184A39B00A35176 /* TTStyledTextFrame.m */, - ); - name = "Styled Frames"; - sourceTree = ""; - }; - 6EE7385F1184AC8500A35176 /* Styled Layout */ = { - isa = PBXGroup; - children = ( - 6EE737311184A38F00A35176 /* TTStyledLayout.h */, - 6EE737B11184A39B00A35176 /* TTStyledLayout.m */, - ); - name = "Styled Layout"; - sourceTree = ""; - }; - 6EE738901184ACDA00A35176 /* Private */ = { - isa = PBXGroup; - children = ( - 6EE7373E1184A38F00A35176 /* TTStyleInternal.h */, - 6EE737BD1184A39B00A35176 /* TTStyleInternal.m */, - ); - name = Private; - sourceTree = ""; - }; - 6EE738911184AD2B00A35176 /* Styled Text Parser */ = { - isa = PBXGroup; - children = ( - 6EE7373B1184A38F00A35176 /* TTStyledTextParser.h */, - 6EE737BA1184A39B00A35176 /* TTStyledTextParser.m */, - ); - name = "Styled Text Parser"; - sourceTree = ""; - }; - 6EE7389E1184ADB400A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE738A31184ADB400A35176 /* libThree20Network.a */, - 6EE738A51184ADB400A35176 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE737441184A38F00A35176 /* TTBevelBorderStyle.h in Headers */, - 6EE737451184A38F00A35176 /* TTBlendStyle.h in Headers */, - 6EE737461184A38F00A35176 /* TTBoxStyle.h in Headers */, - 6EE737471184A38F00A35176 /* TTContentStyle.h in Headers */, - 6EE737481184A38F00A35176 /* TTDefaultStyleSheet.h in Headers */, - 6EE737491184A38F00A35176 /* TTFlowLayout.h in Headers */, - 6EE7374A1184A38F00A35176 /* TTFourBorderStyle.h in Headers */, - 6EE7374B1184A38F00A35176 /* TTGlobalStyle.h in Headers */, - 6EE7374C1184A38F00A35176 /* TTGridLayout.h in Headers */, - 6EE7374D1184A38F00A35176 /* TTHighlightBorderStyle.h in Headers */, - 6EE7374E1184A38F00A35176 /* TTImageStyle.h in Headers */, - 6EE7374F1184A38F00A35176 /* TTInnerShadowStyle.h in Headers */, - 6EE737501184A38F00A35176 /* TTInsetStyle.h in Headers */, - 6EE737511184A38F00A35176 /* TTLayout.h in Headers */, - 6EE737521184A38F00A35176 /* TTLinearGradientBorderStyle.h in Headers */, - 6EE737531184A38F00A35176 /* TTLinearGradientFillStyle.h in Headers */, - 6EE737541184A38F00A35176 /* TTMaskStyle.h in Headers */, - 6EE737551184A38F00A35176 /* TTPartStyle.h in Headers */, - 6EE737561184A38F00A35176 /* TTPosition.h in Headers */, - 6EE737571184A38F00A35176 /* TTRectangleShape.h in Headers */, - 6EE737581184A38F00A35176 /* TTReflectiveFillStyle.h in Headers */, - 6EE737591184A38F00A35176 /* TTRoundedLeftArrowShape.h in Headers */, - 6EE7375A1184A38F00A35176 /* TTRoundedRectangleShape.h in Headers */, - 6EE7375B1184A38F00A35176 /* TTRoundedRightArrowShape.h in Headers */, - 6EE7375C1184A38F00A35176 /* TTShadowStyle.h in Headers */, - 6EE7375D1184A38F00A35176 /* TTShape.h in Headers */, - 6EE7375E1184A38F00A35176 /* TTShapeInternal.h in Headers */, - 6EE7375F1184A38F00A35176 /* TTShapeStyle.h in Headers */, - 6EE737601184A38F00A35176 /* TTSolidBorderStyle.h in Headers */, - 6EE737611184A38F00A35176 /* TTSolidFillStyle.h in Headers */, - 6EE737621184A38F00A35176 /* TTSpeechBubbleShape.h in Headers */, - 6EE737631184A38F00A35176 /* TTStyle.h in Headers */, - 6EE737641184A38F00A35176 /* TTStyleContext.h in Headers */, - 6EE737651184A38F00A35176 /* TTStyledBlock.h in Headers */, - 6EE737661184A38F00A35176 /* TTStyledBoldNode.h in Headers */, - 6EE737671184A38F00A35176 /* TTStyledBoxFrame.h in Headers */, - 6EE737691184A38F00A35176 /* TTStyleDelegate.h in Headers */, - 6EE7376A1184A38F00A35176 /* TTStyledElement.h in Headers */, - 6EE7376B1184A38F00A35176 /* TTStyledFrame.h in Headers */, - 6EE7376C1184A38F00A35176 /* TTStyledImageFrame.h in Headers */, - 6EE7376D1184A38F00A35176 /* TTStyledImageNode.h in Headers */, - 6EE7376E1184A38F00A35176 /* TTStyledInline.h in Headers */, - 6EE7376F1184A38F00A35176 /* TTStyledInlineBlock.h in Headers */, - 6EE737701184A38F00A35176 /* TTStyledInlineFrame.h in Headers */, - 6EE737711184A38F00A35176 /* TTStyledItalicNode.h in Headers */, - 6EE737721184A38F00A35176 /* TTStyledLayout.h in Headers */, - 6EE737731184A38F00A35176 /* TTStyledLineBreakNode.h in Headers */, - 6EE737751184A38F00A35176 /* TTStyledNode.h in Headers */, - 6EE737761184A38F00A35176 /* TTStyledNodeInternal.h in Headers */, - 6EE737771184A38F00A35176 /* TTStyledText.h in Headers */, - 6EE737781184A38F00A35176 /* TTStyledTextDelegate.h in Headers */, - 6EE737791184A38F00A35176 /* TTStyledTextFrame.h in Headers */, - 6EE7377B1184A38F00A35176 /* TTStyledTextNode.h in Headers */, - 6EE7377C1184A38F00A35176 /* TTStyledTextParser.h in Headers */, - 6EE7377F1184A38F00A35176 /* TTStyleInternal.h in Headers */, - 6EE737801184A38F00A35176 /* TTStyleSheet.h in Headers */, - 6EE737811184A38F00A35176 /* TTTextStyle.h in Headers */, - 6EE737821184A38F00A35176 /* UIColorAdditions.h in Headers */, - 6EE737831184A38F00A35176 /* UIFontAdditions.h in Headers */, - 6EE737841184A38F00A35176 /* UIImageAdditions.h in Headers */, - 6EE738C21184AE4A00A35176 /* Three20Style.h in Headers */, - 6E6454901184D3BC00F08CB1 /* Three20Style+Additions.h in Headers */, - 6E6464041187F5CB00F08CB1 /* TTStyledButtonNode.h in Headers */, - 6E6464051187F5CB00F08CB1 /* TTStyledLinkNode.h in Headers */, - 6E850F0911B0FE200071A4FD /* TTDefaultStyleSheet+DragRefreshHeader.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* Three20Style */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20Style" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E645F2C1187AFFE00F08CB1 /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E65BA131ADFB500ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EE7367111849C6300A35176 /* PBXTargetDependency */, - 6EE738AB1184ADD000A35176 /* PBXTargetDependency */, - ); - name = Three20Style; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libThree20Style.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* Three20StyleUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20StyleUnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6EE736C511849F9D00A35176 /* PBXTargetDependency */, - 6EE738AD1184ADE300A35176 /* PBXTargetDependency */, - 6EE736C711849FA000A35176 /* PBXTargetDependency */, - ); - name = Three20StyleUnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* StyleUnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20Style" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EE7366711849C5800A35176 /* Products */; - ProjectRef = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6EE7389E1184ADB400A35176 /* Products */; - ProjectRef = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* Three20Style */, - EB9E6C6110B6A8F800DE563C /* Three20StyleUnitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6EE7366C11849C5800A35176 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE738A31184ADB400A35176 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6EE738A21184ADB400A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE738A51184ADB400A35176 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6EE738A41184ADB400A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E65BA131ADFB500ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E645F2C1187AFFE00F08CB1 /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE737C31184A39B00A35176 /* TTBevelBorderStyle.m in Sources */, - 6EE737C41184A39B00A35176 /* TTBlendStyle.m in Sources */, - 6EE737C51184A39B00A35176 /* TTBoxStyle.m in Sources */, - 6EE737C61184A39B00A35176 /* TTContentStyle.m in Sources */, - 6EE737C71184A39B00A35176 /* TTDefaultStyleSheet.m in Sources */, - 6EE737C81184A39B00A35176 /* TTFlowLayout.m in Sources */, - 6EE737C91184A39B00A35176 /* TTFourBorderStyle.m in Sources */, - 6EE737CA1184A39B00A35176 /* TTGlobalStyle.m in Sources */, - 6EE737CB1184A39B00A35176 /* TTGridLayout.m in Sources */, - 6EE737CC1184A39B00A35176 /* TTHighlightBorderStyle.m in Sources */, - 6EE737CD1184A39B00A35176 /* TTImageStyle.m in Sources */, - 6EE737CE1184A39B00A35176 /* TTInnerShadowStyle.m in Sources */, - 6EE737CF1184A39B00A35176 /* TTInsetStyle.m in Sources */, - 6EE737D01184A39B00A35176 /* TTLayout.m in Sources */, - 6EE737D11184A39B00A35176 /* TTLinearGradientBorderStyle.m in Sources */, - 6EE737D21184A39B00A35176 /* TTLinearGradientFillStyle.m in Sources */, - 6EE737D31184A39B00A35176 /* TTMaskStyle.m in Sources */, - 6EE737D41184A39B00A35176 /* TTPartStyle.m in Sources */, - 6EE737D51184A39B00A35176 /* TTRectangleShape.m in Sources */, - 6EE737D61184A39B00A35176 /* TTReflectiveFillStyle.m in Sources */, - 6EE737D71184A39B00A35176 /* TTRoundedLeftArrowShape.m in Sources */, - 6EE737D81184A39B00A35176 /* TTRoundedRectangleShape.m in Sources */, - 6EE737D91184A39B00A35176 /* TTRoundedRightArrowShape.m in Sources */, - 6EE737DA1184A39B00A35176 /* TTShadowStyle.m in Sources */, - 6EE737DB1184A39B00A35176 /* TTShape.m in Sources */, - 6EE737DC1184A39B00A35176 /* TTShapeInternal.m in Sources */, - 6EE737DD1184A39B00A35176 /* TTShapeStyle.m in Sources */, - 6EE737DE1184A39B00A35176 /* TTSolidBorderStyle.m in Sources */, - 6EE737DF1184A39B00A35176 /* TTSolidFillStyle.m in Sources */, - 6EE737E01184A39B00A35176 /* TTSpeechBubbleShape.m in Sources */, - 6EE737E11184A39B00A35176 /* TTStyle.m in Sources */, - 6EE737E21184A39B00A35176 /* TTStyleContext.m in Sources */, - 6EE737E31184A39B00A35176 /* TTStyledBlock.m in Sources */, - 6EE737E41184A39B00A35176 /* TTStyledBoldNode.m in Sources */, - 6EE737E51184A39B00A35176 /* TTStyledBoxFrame.m in Sources */, - 6EE737E71184A39B00A35176 /* TTStyledElement.m in Sources */, - 6EE737E81184A39B00A35176 /* TTStyledFrame.m in Sources */, - 6EE737E91184A39B00A35176 /* TTStyledImageFrame.m in Sources */, - 6EE737EA1184A39B00A35176 /* TTStyledImageNode.m in Sources */, - 6EE737EB1184A39B00A35176 /* TTStyledInline.m in Sources */, - 6EE737EC1184A39B00A35176 /* TTStyledInlineBlock.m in Sources */, - 6EE737ED1184A39B00A35176 /* TTStyledInlineFrame.m in Sources */, - 6EE737EE1184A39B00A35176 /* TTStyledItalicNode.m in Sources */, - 6EE737EF1184A39B00A35176 /* TTStyledLayout.m in Sources */, - 6EE737F01184A39B00A35176 /* TTStyledLineBreakNode.m in Sources */, - 6EE737F21184A39B00A35176 /* TTStyledNode.m in Sources */, - 6EE737F31184A39B00A35176 /* TTStyledNodeInternal.m in Sources */, - 6EE737F41184A39B00A35176 /* TTStyledText.m in Sources */, - 6EE737F51184A39B00A35176 /* TTStyledTextFrame.m in Sources */, - 6EE737F71184A39B00A35176 /* TTStyledTextNode.m in Sources */, - 6EE737F81184A39B00A35176 /* TTStyledTextParser.m in Sources */, - 6EE737FB1184A39B00A35176 /* TTStyleInternal.m in Sources */, - 6EE737FC1184A39B00A35176 /* TTStyleSheet.m in Sources */, - 6EE737FD1184A39B00A35176 /* TTTextStyle.m in Sources */, - 6EE737FE1184A39B00A35176 /* UIColorAdditions.m in Sources */, - 6EE737FF1184A39B00A35176 /* UIFontAdditions.m in Sources */, - 6EE738001184A39B00A35176 /* UIImageAdditions.m in Sources */, - 6E64640C1187F5EC00F08CB1 /* TTStyledButtonNode.m in Sources */, - 6E64640D1187F5EC00F08CB1 /* TTStyledLinkNode.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE7399A1184B9CE00A35176 /* StyleAdditionTests.m in Sources */, - 6EE7399B1184B9CE00A35176 /* StyleGlobalTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6EE7367111849C6300A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6EE7367011849C6300A35176 /* PBXContainerItemProxy */; - }; - 6EE736C511849F9D00A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */; - }; - 6EE736C711849FA000A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* Three20Style */; - targetProxy = 6EE736C611849FA000A35176 /* PBXContainerItemProxy */; - }; - 6EE738AB1184ADD000A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6EE738AA1184ADD000A35176 /* PBXContainerItemProxy */; - }; - 6EE738AD1184ADE300A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6EE738AC1184ADE300A35176 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - ); - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - ); - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = ( - "\"$(SDKROOT)/Developer/Library/Frameworks\"", - "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"", - ); - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - HEADER_SEARCH_PATHS = .; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20Style" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20Style" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20StyleUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/Three20Style/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/Three20Style/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/Three20Style/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/Three20Style/UnitTests/StyleAdditionTests.m b/src/Three20Style/UnitTests/StyleAdditionTests.m deleted file mode 100644 index 64009628dd..0000000000 --- a/src/Three20Style/UnitTests/StyleAdditionTests.m +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import -#import - -#import "Three20Style/UIColorAdditions.h" - -@interface UIAdditionTests : SenTestCase { -} - -@end - - -@implementation UIAdditionTests - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIColor Additions - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)color:(UIColor*)color1 equalsColor:(UIColor*)color2 { - const CGFloat* rgba1 = CGColorGetComponents(color1.CGColor); - const CGFloat* rgba2 = CGColorGetComponents(color2.CGColor); - return 0 == memcmp(rgba1, rgba2, sizeof(CGFloat) * 4); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testUIColor { - for (CGFloat hue = 0; hue < 360; ++hue) { - UIColor* color = [UIColor colorWithHue:hue saturation:0 value:1 alpha:1]; - STAssertTrue( - [self color:color equalsColor:[UIColor colorWithRed:1 green:1 blue:1 alpha:1]], - @"HSV %f, 0, 1 should be white", hue); - } - - for (CGFloat hue = 0; hue < 360; ++hue) { - UIColor* color = [UIColor colorWithHue:hue saturation:0 value:0 alpha:1]; - STAssertTrue( - [self color:color equalsColor:[UIColor colorWithRed:0 green:0 blue:0 alpha:1]], - @"HSV %f, 0, 0 should be black", hue); - } - - UIColor* color = [UIColor colorWithHue:0 saturation:1 value:1 alpha:1]; - STAssertTrue( - [self color:color equalsColor:[UIColor colorWithRed:1 green:0 blue:0 alpha:1]], - @"HSV 0, 1, 1 should be red"); - - color = [UIColor colorWithHue:180 saturation:1 value:1 alpha:1]; - STAssertTrue( - [self color:color equalsColor:[UIColor colorWithRed:0 green:1 blue:1 alpha:1]], - @"HSV 180, 1, 1 should be teal"); - - color = [UIColor colorWithHue:90 saturation:1 value:1 alpha:1]; - STAssertTrue( - [self color:color equalsColor:[UIColor colorWithRed:0.5 green:1 blue:0 alpha:1]], - @"HSV 90, 1, 1 should be yellow"); - - color = [UIColor colorWithHue:270 saturation:1 value:1 alpha:1]; - STAssertTrue( - [self color:color equalsColor:[UIColor colorWithRed:0.5 green:0 blue:1 alpha:1]], - @"HSV 270, 1, 1 should be magenta"); - - color = [UIColor colorWithHue:0 saturation:0.5 value:1 alpha:1]; - STAssertTrue( - [self color:color equalsColor:[UIColor colorWithRed:1 green:0.5 blue:0.5 alpha:1]], - @"HSV 0, 0.5, 1 should be light red"); -} - - -@end diff --git a/src/Three20Style/UnitTests/StyleGlobalTests.m b/src/Three20Style/UnitTests/StyleGlobalTests.m deleted file mode 100644 index 6573b09bfe..0000000000 --- a/src/Three20Style/UnitTests/StyleGlobalTests.m +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import -#import - -#import "Three20Style/TTGlobalStyle.h" - -// Core -#import "Three20Core/TTGlobalCoreRects.h" - -@interface UIGlobalTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UIGlobalTests - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CGRect Transformations - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testRects { - STAssertTrue(CGRectEqualToRect( - TTRectContract(CGRectMake(0, 0, 5, 5), 5, 5), - CGRectMake(0, 0, 0, 0)), - @"The two rects are not equal"); - - STAssertTrue(CGRectEqualToRect( - TTRectShift(CGRectMake(0, 0, 5, 5), 5, 5), - CGRectMake(5, 5, 0, 0)), - @"The two rects are not equal"); - - STAssertTrue(CGRectEqualToRect( - TTRectInset(CGRectMake(0, 0, 5, 5), UIEdgeInsetsMake(1, 1, 1, 1)), - CGRectMake(1, 1, 3, 3)), - @"The two rects are not equal"); -} - - -@end diff --git a/src/Three20UI/Configurations/Library.xcconfig b/src/Three20UI/Configurations/Library.xcconfig deleted file mode 100644 index 1caac98245..0000000000 --- a/src/Three20UI/Configurations/Library.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = Three20UI -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/src/Three20UI/Configurations/Project.xcconfig b/src/Three20UI/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/Three20UI/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/Three20UI/Configurations/UnitTests.xcconfig b/src/Three20UI/Configurations/UnitTests.xcconfig deleted file mode 100644 index 16b0a5342f..0000000000 --- a/src/Three20UI/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = UIUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(UIKIT_FX) $(COREGRAPHICS_FX) $(QUARTZCORE_FX) diff --git a/src/Three20UI/Headers/TTActionSheet.h b/src/Three20UI/Headers/TTActionSheet.h deleted file mode 100644 index a1e706e7ea..0000000000 --- a/src/Three20UI/Headers/TTActionSheet.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * [private] A subclassed UIActionSheet that retains the popup view controller. - * - * This is a leightweight subclass whose sole additional purpose is to retain the popup view - * controller. - * - * @internal Questions to be answered: - * - Why is this necessary? Can we get by without this subclass? - */ -@interface TTActionSheet : UIActionSheet { -@protected - UIViewController* _popupViewController; -} - -@property (nonatomic, retain) UIViewController* popupViewController; - -@end diff --git a/src/Three20UI/Headers/TTActionSheetController.h b/src/Three20UI/Headers/TTActionSheetController.h deleted file mode 100644 index c69a56d498..0000000000 --- a/src/Three20UI/Headers/TTActionSheetController.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTPopupViewController.h" - -@protocol TTActionSheetControllerDelegate; - -/** - * A view controller that displays an action sheet. - * - * This class exists in order to allow action sheets to be displayed by TTNavigator, and gain - * all the benefits of persistence and URL dispatch. - * - * By default this controller is not persisted in the navigation history. - */ -@interface TTActionSheetController : TTPopupViewController { -@protected - id _userInfo; - NSMutableArray* _URLs; - - id _delegate; -} - -@property (nonatomic, readonly) UIActionSheet* actionSheet; -@property (nonatomic, retain) id userInfo; - -@property (nonatomic, assign) id delegate; - -/** - * Create an action sheet controller without a delegate. - * - * @param title The title of the action sheet. - */ -- (id)initWithTitle:(NSString*)title; - -/** - * The designated initializer. - * - * @param title The title of the action sheet. - * @param delegate A delegate that implements the TTActionSheetControllerDelegate protocol. - */ -- (id)initWithTitle:(NSString*)title delegate:(id)delegate; - -/** - * Append a button with the given title and TTNavigator URL. - * - * @param title The title of the new button. - * @param URL The TTNavigator url. - * @return The index of the new button. Button indices start at 0 and increase in the order they - * are added. - */ -- (NSInteger)addButtonWithTitle:(NSString*)title URL:(NSString*)URL; - -/** - * Create a cancel button with the given title and TTNavigator URL. - * - * There can be only one cancel button. - * - * @param title The title of the cancel button. - * @param URL The TTNavigator url. - * @return The index of the cancel button. Button indices start at 0 and increase in the order they - * are added. - */ -- (NSInteger)addCancelButtonWithTitle:(NSString*)title URL:(NSString*)URL; - -/** - * Create a destructive button with the given title and TTNavigator URL. - * - * There can be only one destructive button. - * - * @param title The title of the cancel button. - * @param URL The TTNavigator url. - * @return The index of the destructive button. Button indices start at 0 and increase in the order - * they are added. - */ -- (NSInteger)addDestructiveButtonWithTitle:(NSString*)title URL:(NSString*)URL; - -/** - * Retrieve the button URL at the given index. - * - * @param index The index of the button in question - * @return nil if index is out of range. Otherwise returns the button's URL at index. - */ -- (NSString*)buttonURLAtIndex:(NSInteger)index; - -@end diff --git a/src/Three20UI/Headers/TTActionSheetControllerDelegate.h b/src/Three20UI/Headers/TTActionSheetControllerDelegate.h deleted file mode 100644 index d65ca5c4ad..0000000000 --- a/src/Three20UI/Headers/TTActionSheetControllerDelegate.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTActionSheetController; - -/** - * Inherits the UIActionSheetDelegate protocol and adds TTNavigator support. - */ -@protocol TTActionSheetControllerDelegate -@optional - -/** - * Sent to the delegate after an action sheet is dismissed from the screen. - * - * This method is invoked after the animation ends and the view is hidden. - * - * If this method is not implemented, the default action is to open the given URL. - * If this method is implemented and returns NO, then the caller will not navigate to the given - * URL. - * - * @param controller The controller that was dismissed. - * @param buttonIndex The index of the button that was clicked. The button indices start at 0. If - * this is the cancel button index, the action sheet is canceling. If -1, the - * cancel button index is not set. - * @param URL The URL of the selected button. - * - * @return YES to open the given URL with TTOpenURL. - */ -- (BOOL)actionSheetController: (TTActionSheetController*)controller - didDismissWithButtonIndex: (NSInteger)buttonIndex - URL: (NSString*)URL; - -@end diff --git a/src/Three20UI/Headers/TTActivityLabel.h b/src/Three20UI/Headers/TTActivityLabel.h deleted file mode 100644 index a153cd6669..0000000000 --- a/src/Three20UI/Headers/TTActivityLabel.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -typedef enum { - TTActivityLabelStyleWhite, - TTActivityLabelStyleGray, - TTActivityLabelStyleBlackBox, - TTActivityLabelStyleBlackBezel, - TTActivityLabelStyleBlackBanner, - TTActivityLabelStyleWhiteBezel, - TTActivityLabelStyleWhiteBox -} TTActivityLabelStyle; - -@class TTView; -@class TTButton; - -@interface TTActivityLabel : UIView { - TTActivityLabelStyle _style; - - TTView* _bezelView; - UIProgressView* _progressView; - UIActivityIndicatorView* _activityIndicator; - UILabel* _label; - - float _progress; - BOOL _smoothesProgress; - NSTimer* _smoothTimer; -} - -@property (nonatomic, readonly) TTActivityLabelStyle style; - -@property (nonatomic, copy) NSString* text; -@property (nonatomic, retain) UIFont* font; - -@property (nonatomic) float progress; -@property (nonatomic) BOOL isAnimating; -@property (nonatomic) BOOL smoothesProgress; - -- (id)initWithFrame:(CGRect)frame style:(TTActivityLabelStyle)style; -- (id)initWithFrame:(CGRect)frame style:(TTActivityLabelStyle)style text:(NSString*)text; -- (id)initWithStyle:(TTActivityLabelStyle)style; - -@end diff --git a/src/Three20UI/Headers/TTAlertView.h b/src/Three20UI/Headers/TTAlertView.h deleted file mode 100644 index 95b278f65c..0000000000 --- a/src/Three20UI/Headers/TTAlertView.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTAlertView : UIAlertView { -@protected - UIViewController* _popupViewController; -} - -@property (nonatomic, retain) UIViewController* popupViewController; - -@end diff --git a/src/Three20UI/Headers/TTAlertViewController.h b/src/Three20UI/Headers/TTAlertViewController.h deleted file mode 100644 index 0bc0c4da3e..0000000000 --- a/src/Three20UI/Headers/TTAlertViewController.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTPopupViewController.h" - -@protocol TTAlertViewControllerDelegate; - -/** - * A view controller that displays an alert view. - * - * This class exists in order to allow alert views to be displayed by TTNavigator and gain - * all the benefits of persistence and URL dispatch. - */ -@interface TTAlertViewController : TTPopupViewController { -@protected - id _userInfo; - NSMutableArray* _URLs; - - id _delegate; -} - -@property (nonatomic, readonly) UIAlertView* alertView; -@property (nonatomic, retain) id userInfo; - -@property (nonatomic, assign) id delegate; - - -- (id)initWithTitle:(NSString*)title message:(NSString*)message; -- (id)initWithTitle:(NSString*)title message:(NSString*)message delegate:(id)delegate; - -- (NSInteger)addButtonWithTitle:(NSString*)title URL:(NSString*)URL; -- (NSInteger)addCancelButtonWithTitle:(NSString*)title URL:(NSString*)URL; - -- (NSString*)buttonURLAtIndex:(NSInteger)index; - -@end diff --git a/src/Three20UI/Headers/TTAlertViewControllerDelegate.h b/src/Three20UI/Headers/TTAlertViewControllerDelegate.h deleted file mode 100644 index 073cb27886..0000000000 --- a/src/Three20UI/Headers/TTAlertViewControllerDelegate.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTAlertViewController; - -@protocol TTAlertViewControllerDelegate - -- (BOOL)alertViewController: (TTAlertViewController*)controller - didDismissWithButtonIndex: (NSInteger)buttonIndex - URL: (NSString*)URL; - -@end diff --git a/src/Three20UI/Headers/TTButton.h b/src/Three20UI/Headers/TTButton.h deleted file mode 100644 index ab250acb48..0000000000 --- a/src/Three20UI/Headers/TTButton.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyleDelegate.h" - -@protocol TTImageViewDelegate; - -@interface TTButton : UIControl { - NSMutableDictionary* _content; - UIFont* _font; - BOOL _isVertical; - - id _imageDelegate; -} - -@property (nonatomic, retain) UIFont* font; -@property (nonatomic) BOOL isVertical; - -// This must be set before you call setImage: -@property (nonatomic, assign) id imageDelegate; - -+ (TTButton*)buttonWithStyle:(NSString*)selector; -+ (TTButton*)buttonWithStyle:(NSString*)selector title:(NSString*)title; - -- (NSString*)titleForState:(UIControlState)state; -- (void)setTitle:(NSString*)title forState:(UIControlState)state; - -- (NSString*)imageForState:(UIControlState)state; -- (void)setImage:(NSString*)imageURL forState:(UIControlState)state; - -- (TTStyle*)styleForState:(UIControlState)state; -- (void)setStyle:(TTStyle*)style forState:(UIControlState)state; - -/** - * Sets the styles for all control states using a single style selector. - * - * The method for the selector must accept a single argument for the control state. It will - * be called to return a style for each of the different control states. - */ -- (void)setStylesWithSelector:(NSString*)selector; - -- (void)suspendLoadingImages:(BOOL)suspended; - -- (CGRect)rectForImage; - -@end diff --git a/src/Three20UI/Headers/TTButtonBar.h b/src/Three20UI/Headers/TTButtonBar.h deleted file mode 100644 index 0fea86fb7f..0000000000 --- a/src/Three20UI/Headers/TTButtonBar.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTView.h" - -/** - * A box containing buttons with a consistent style. - */ -@interface TTButtonBar : TTView { - NSMutableArray* _buttons; - NSString* _buttonStyle; -} - -@property (nonatomic, copy) NSArray* buttons; -@property (nonatomic, copy) NSString* buttonStyle; - -- (void)addButton:(NSString*)title target:(id)target action:(SEL)selector; -- (void)removeButtons; - -@end diff --git a/src/Three20UI/Headers/TTButtonContent.h b/src/Three20UI/Headers/TTButtonContent.h deleted file mode 100644 index 9299622c32..0000000000 --- a/src/Three20UI/Headers/TTButtonContent.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -// Network -#import "Three20Network/TTURLRequestDelegate.h" - -@class TTButton; -@class TTStyle; - -@protocol TTImageViewDelegate; - -@interface TTButtonContent : NSObject { - TTButton* _button; - NSString* _title; - NSString* _imageURL; - UIImage* _image; - TTStyle* _style; - TTURLRequest* _request; - - id _delegate; -} - -@property (nonatomic, copy) NSString* title; -@property (nonatomic, copy) NSString* imageURL; -@property (nonatomic, retain) UIImage* image; -@property (nonatomic, retain) TTStyle* style; -@property (nonatomic, assign) id delegate; - -- (id)initWithButton:(TTButton*)button; - -- (void)reload; -- (void)stopLoading; - -@end diff --git a/src/Three20UI/Headers/TTErrorView.h b/src/Three20UI/Headers/TTErrorView.h deleted file mode 100644 index 36a15a2f97..0000000000 --- a/src/Three20UI/Headers/TTErrorView.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTErrorView : UIView { - UIImageView* _imageView; - UILabel* _titleView; - UILabel* _subtitleView; -} - -@property (nonatomic, retain) UIImage* image; -@property (nonatomic, copy) NSString* title; -@property (nonatomic, copy) NSString* subtitle; - -- (id)initWithTitle:(NSString*)title subtitle:(NSString*)subtitle image:(UIImage*)image; - -@end diff --git a/src/Three20UI/Headers/TTExtensionInfoController.h b/src/Three20UI/Headers/TTExtensionInfoController.h deleted file mode 100644 index 3390661996..0000000000 --- a/src/Three20UI/Headers/TTExtensionInfoController.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewController.h" - -@class TTExtensionInfo; - -/** - * Display information about a specific extension. - * - * @see TTExtensionInfo - */ -@interface TTExtensionInfoController : TTTableViewController { -@private - TTExtensionInfo* _extension; - -} - -@end diff --git a/src/Three20UI/Headers/TTExtensionsController.h b/src/Three20UI/Headers/TTExtensionsController.h deleted file mode 100644 index 06bad6b0ea..0000000000 --- a/src/Three20UI/Headers/TTExtensionsController.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewController.h" - -@class TTNavigator; - -/** - * A list of all available, loaded, and failed extensions. This controller is used in - * conjunction with the TTExtensionLoader. It is intended to provide helpful information - * about the extensions linked in the application. It can also be used as a means of - * crediting the extensions whose licenses require it. - * - * @see TTExtensionLoader - */ -@interface TTExtensionsController : TTTableViewController { - -} - -/** - * Registers two URLs with the given navigator (e.g. with a prefix of @"tt://") - * - * * @"tt://extensions" -> [TTExtensionsController class] - * * @"tt://extensions/(initWithExtensionID:)" -> [TTExtensionInfoController class] - * - * You can use any prefix (e.g. @"myApp://three20/") - * - * * @"myApp://three20/extensions" -> [TTExtensionsController class] - * * @"myApp://three20/extensions/(initWithExtensionID:)" -> [TTExtensionInfoController class] - */ -+ (void)registerUrlPathsWithNavigator:(TTNavigator*)navigator prefix:(NSString*)prefix; - -@end diff --git a/src/Three20UI/Headers/TTImageLayer.h b/src/Three20UI/Headers/TTImageLayer.h deleted file mode 100644 index 61ef9fc7d7..0000000000 --- a/src/Three20UI/Headers/TTImageLayer.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -#import - -@class TTImageView; - -@interface TTImageLayer : CALayer { - TTImageView* _override; -} - -@property (nonatomic, assign) TTImageView* override; - -@end diff --git a/src/Three20UI/Headers/TTImageView.h b/src/Three20UI/Headers/TTImageView.h deleted file mode 100644 index 6e75e4fb07..0000000000 --- a/src/Three20UI/Headers/TTImageView.h +++ /dev/null @@ -1,119 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTView.h" - -// Network -#import "Three20Network/TTURLRequestDelegate.h" - -@class TTURLRequest; -@protocol TTImageViewDelegate; - -/** - * A view that asynchronously loads an image and subsequently displays it. - */ -@interface TTImageView : TTView { - TTURLRequest* _request; - NSString* _urlPath; - UIImage* _image; - UIImage* _defaultImage; - BOOL _autoresizesToImage; - - id _delegate; -} - -/** - * The path of the image. This may be a web path (http://path/to/image.gif) or a local bundle - * path (bundle://path/to/image.png). - */ -@property (nonatomic, copy) NSString* urlPath; - -/** - * The default image that is displayed until the image has been downloaded. If no urlPath is - * specified, this image will be displayed indefinitely. - */ -@property (nonatomic, retain) UIImage* defaultImage; - -/** - * The image that is currently being displayed. - */ -@property (nonatomic, readonly) UIImage* image; - -/** - * Override the default sizing operation and resize the frame of this view with the size of - * the image. - * - * @default NO - */ -@property (nonatomic) BOOL autoresizesToImage; - -/** - * Is an asynchronous request currently active? - */ -@property (nonatomic, readonly) BOOL isLoading; - -/** - * Has the image been successfully loaded? - */ -@property (nonatomic, readonly) BOOL isLoaded; - -/** - * A delegate that notifies you when the image has started and finished loading. - */ -@property (nonatomic, assign) id delegate; - -/** - * Cancel any pending request, remove the image, and redraw the view. - */ -- (void)unsetImage; - -/** - * Force the image to be reloaded. If the image is not in the cache, an asynchronous request is - * sent off to fetch the image. - */ -- (void)reload; - -/** - * Cancel this image views' active asynchronous requests. - */ -- (void)stopLoading; - -/** - * Called when the image begins loading asynchronously. - * Overridable method. - * - * @protected - */ -- (void)imageViewDidStartLoad; - -/** - * Called when the image finishes loading asynchronously. - * Overridable method. - * - * @protected - */ -- (void)imageViewDidLoadImage:(UIImage*)image; - -/** - * Called when the image failed to load asynchronously. - * Overridable method. - * - * @protected - */ -- (void)imageViewDidFailLoadWithError:(NSError*)error; - -@end diff --git a/src/Three20UI/Headers/TTImageViewDelegate.h b/src/Three20UI/Headers/TTImageViewDelegate.h deleted file mode 100644 index a94324b7c9..0000000000 --- a/src/Three20UI/Headers/TTImageViewDelegate.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTImageView; - -@protocol TTImageViewDelegate -@optional - -/** - * Called when the image begins loading asynchronously. - */ -- (void)imageViewDidStartLoad:(TTImageView*)imageView; - -/** - * Called when the image finishes loading asynchronously. - */ -- (void)imageView:(TTImageView*)imageView didLoadImage:(UIImage*)image; - -/** - * Called when the image failed to load asynchronously. - * If error is nil then the request was cancelled. - */ -- (void)imageView:(TTImageView*)imageView didFailLoadWithError:(NSError*)error; - -@end diff --git a/src/Three20UI/Headers/TTImageViewInternal.h b/src/Three20UI/Headers/TTImageViewInternal.h deleted file mode 100644 index 16490bcfba..0000000000 --- a/src/Three20UI/Headers/TTImageViewInternal.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTImageView.h" - -@interface TTImageView (TTInternal) - -/** - * Useful when overriding the TTImageView class's setImage method. - * @see TTPhotoView - * - * @protected - */ -- (void)setImage:(UIImage*)image; - -@end diff --git a/src/Three20UI/Headers/TTLabel.h b/src/Three20UI/Headers/TTLabel.h deleted file mode 100644 index 36fe1b67a1..0000000000 --- a/src/Three20UI/Headers/TTLabel.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTView.h" - -@interface TTLabel : TTView { - NSString* _text; - UIFont* _font; -} - -@property (nonatomic, copy) NSString* text; -@property (nonatomic, retain) UIFont* font; - -- (id)initWithText:(NSString*)text; - -@end diff --git a/src/Three20UI/Headers/TTLauncherButton.h b/src/Three20UI/Headers/TTLauncherButton.h deleted file mode 100644 index 06824ecc4c..0000000000 --- a/src/Three20UI/Headers/TTLauncherButton.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTButton.h" - -@class TTLauncherItem; -@class TTLabel; - -@interface TTLauncherButton : TTButton { - TTLauncherItem* _item; - TTLabel* _badge; - TTButton* _closeButton; - - BOOL _dragging; - BOOL _editing; -} - -@property (nonatomic, readonly) TTLauncherItem* item; -@property (nonatomic, readonly) TTButton* closeButton; -@property (nonatomic) BOOL dragging; -@property (nonatomic) BOOL editing; - -- (id)initWithItem:(TTLauncherItem*)item; - -@end diff --git a/src/Three20UI/Headers/TTLauncherHighlightView.h b/src/Three20UI/Headers/TTLauncherHighlightView.h deleted file mode 100644 index 13344ed896..0000000000 --- a/src/Three20UI/Headers/TTLauncherHighlightView.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTLauncherView; - -@interface TTLauncherHighlightView : UIView { - TTLauncherView* _parentView; - CGRect _highlightRect; - CGFloat _highlightScale; - UIWindow* _statusBarCover; - UILabel* _textLabel; -} - -@property (nonatomic, assign) CGRect highlightRect; -@property (nonatomic, retain) TTLauncherView* parentView; -@property (nonatomic, copy) NSString* text; - -- (void)appear:(BOOL)animated; - -@end diff --git a/src/Three20UI/Headers/TTLauncherItem.h b/src/Three20UI/Headers/TTLauncherItem.h deleted file mode 100644 index f17e508238..0000000000 --- a/src/Three20UI/Headers/TTLauncherItem.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTLauncherView; - -@interface TTLauncherItem : NSObject { - TTLauncherView* _launcher; - - NSString* _title; - NSString* _image; - NSString* _URL; - - NSString* _style; - NSString* _badgeValue; - - BOOL _canDelete; -} - -@property (nonatomic, assign) TTLauncherView* launcher; -@property (nonatomic, copy) NSString* title; -@property (nonatomic, copy) NSString* image; -@property (nonatomic, copy) NSString* URL; -@property (nonatomic, copy) NSString* style; -@property (nonatomic) NSInteger badgeNumber; -@property (nonatomic, copy) NSString* badgeValue; -@property (nonatomic) BOOL canDelete; - -- (id)initWithTitle:(NSString*)title image:(NSString*)image URL:(NSString*)URL; -- (id)initWithTitle:(NSString*)title image:(NSString*)image URL:(NSString*)URL - canDelete:(BOOL)canDelete; - -@end diff --git a/src/Three20UI/Headers/TTLauncherScrollView.h b/src/Three20UI/Headers/TTLauncherScrollView.h deleted file mode 100644 index be9f7dd609..0000000000 --- a/src/Three20UI/Headers/TTLauncherScrollView.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTLauncherScrollView : UIScrollView -@end diff --git a/src/Three20UI/Headers/TTLauncherView.h b/src/Three20UI/Headers/TTLauncherView.h deleted file mode 100644 index 6b6774afe2..0000000000 --- a/src/Three20UI/Headers/TTLauncherView.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@protocol TTLauncherViewDelegate; -@class TTPageControl; -@class TTLauncherButton; -@class TTLauncherItem; -@class TTLauncherHighlightView; - -@interface TTLauncherView : UIView { - NSMutableArray* _pages; - - NSInteger _columnCount; - NSInteger _rowCount; - - NSString* _prompt; - - NSMutableArray* _buttons; - UIScrollView* _scrollView; - - TTPageControl* _pager; - - NSTimer* _editHoldTimer; - NSTimer* _springLoadTimer; - - TTLauncherButton* _dragButton; - UITouch* _dragTouch; - NSInteger _positionOrigin; - CGPoint _dragOrigin; - CGPoint _touchOrigin; - - TTLauncherHighlightView* _highlightView; - - BOOL _editing; - BOOL _springing; - - id _delegate; -} - -@property (nonatomic, assign) id delegate; - -@property (nonatomic, copy) NSArray* pages; - -@property (nonatomic) NSInteger columnCount; - -@property (nonatomic, readonly) NSInteger rowCount; - -@property (nonatomic, readonly) TTPageControl* pager; - -@property (nonatomic) NSInteger currentPageIndex; - -@property (nonatomic, copy) NSString* prompt; - -@property (nonatomic, readonly) BOOL editing; - -- (void)addItem:(TTLauncherItem*)item animated:(BOOL)animated; - -- (void)removeItem:(TTLauncherItem*)item animated:(BOOL)animated; - -- (TTLauncherItem*)itemWithURL:(NSString*)URL; - -- (NSIndexPath*)indexPathOfItem:(TTLauncherItem*)item; - -- (void)scrollToItem:(TTLauncherItem*)item animated:(BOOL)animated; - -- (void)beginEditing; - -- (void)endEditing; - -/** - * Dims the launcher view except for a transparent circle around the given item. The given text - * will also be shown center-aligned below or above the circle, as appropriate. The item can be - * tapped while the overlay is up; tapping anywhere else on the overlay simply dismisses the - * overlay and does not pass the event through. - */ -- (void)beginHighlightItem:(TTLauncherItem*)item withText:(NSString*)text; - -/** - * Removes the highlighting overlay introduced by -beginHighlightItem:withText:. This will be done - * automatically if the user taps anywhere on the overlay except the transparent circle. - */ -- (void)endHighlightItem:(TTLauncherItem*)item; - -@end diff --git a/src/Three20UI/Headers/TTLauncherViewDelegate.h b/src/Three20UI/Headers/TTLauncherViewDelegate.h deleted file mode 100644 index 116f09d5b0..0000000000 --- a/src/Three20UI/Headers/TTLauncherViewDelegate.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@class TTLauncherView; -@class TTLauncherItem; - -@protocol TTLauncherViewDelegate - -@optional - -- (void)launcherView:(TTLauncherView*)launcher didAddItem:(TTLauncherItem*)item; - -- (void)launcherView:(TTLauncherView*)launcher didRemoveItem:(TTLauncherItem*)item; - -- (void)launcherView:(TTLauncherView*)launcher didMoveItem:(TTLauncherItem*)item; - -- (void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item; - -- (void)launcherViewDidEndDragging:(TTLauncherView*)launcher; - -- (void)launcherViewDidBeginEditing:(TTLauncherView*)launcher; - -- (void)launcherViewDidEndEditing:(TTLauncherView*)launcher; - -@end - diff --git a/src/Three20UI/Headers/TTLink.h b/src/Three20UI/Headers/TTLink.h deleted file mode 100644 index d5375bf29a..0000000000 --- a/src/Three20UI/Headers/TTLink.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTView; -@class TTURLAction; - -@interface TTLink : UIControl { - TTURLAction* _URLAction; - TTView* _screenView; -} - -/** - * The URL that will be loaded when the control is touched. This is a wrapper around URLAction; - * setting this property is equivalent to setting a URLAction with animated set to YES. - */ -@property (nonatomic, copy) id URL; - -/** - * The TTURLAction that will be opened. - */ -@property (nonatomic, retain) TTURLAction* URLAction; - -@end diff --git a/src/Three20UI/Headers/TTListDataSource.h b/src/Three20UI/Headers/TTListDataSource.h deleted file mode 100644 index a8aa106e7a..0000000000 --- a/src/Three20UI/Headers/TTListDataSource.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewDataSource.h" - -@interface TTListDataSource : TTTableViewDataSource { - NSMutableArray* _items; -} - -@property (nonatomic, retain) NSMutableArray* items; - -+ (TTListDataSource*)dataSourceWithObjects:(id)object,...; -+ (TTListDataSource*)dataSourceWithItems:(NSMutableArray*)items; - -- (id)initWithItems:(NSArray*)items; - -- (NSIndexPath*)indexPathOfItemWithUserInfo:(id)userInfo; - -@end diff --git a/src/Three20UI/Headers/TTMessageController.h b/src/Three20UI/Headers/TTMessageController.h deleted file mode 100644 index 8c2ff4402d..0000000000 --- a/src/Three20UI/Headers/TTMessageController.h +++ /dev/null @@ -1,215 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTViewController.h" -#import "Three20UI/TTTextEditorDelegate.h" - -@protocol TTTableViewDataSource; -@protocol TTMessageControllerDelegate; -@class TTPickerTextField; -@class TTActivityLabel; -@class TTTextEditor; - -/** - * A view controller for composing email like messages, which is visually - * similar to Apple's in-app mail composer. - * - * This class was originally implemented before iPhone OS 3.0, which - * introduced the MFMailComposeViewController. It's original purpose - * was to fill that gap in the SDK. If you want to allow users to send - * an email via their existing Mail.app accounts, you should use - * MFMailComposeViewController. - * - * You may find this class useful if you need to present a visually similar - * view, but handle the delivery of the message yourself. This class is also - * useful when you want to customize the fields presented to the user. - */ -@interface TTMessageController : TTViewController { -@protected - NSArray* _fields; - NSMutableArray* _fieldViews; - UIScrollView* _scrollView; - TTTextEditor* _textEditor; - TTActivityLabel* _activityView; - NSArray* _initialRecipients; - - BOOL _showsRecipientPicker; - BOOL _isModified; - BOOL _requireNonEmptyMessageBody; - - id _dataSource; - id _delegate; -} - -/** - * The delegate that will receive messages from the TTMessageControllerDelegate - * protocol. - */ -@property (nonatomic, assign) id delegate; - -/** - * The datasource used to autocomplete TTMessageRecipientFields. This class is - * also responsible for determining how cells representing recipients are - * labeled. - */ -@property (nonatomic, retain) id dataSource; - -/** - * An array of TTMessageField instances representing the editable fields. These - * fields are rendered in order using appropriate views for each field type. - */ -@property (nonatomic, copy) NSArray* fields; - -/** - * A convenience property for editing the text value of the - * TTMessageSubjectField. If no TTMessageSubjectField is found in the fields - * array, nil will be returned from the getter and the setter will be a no-op. - */ -@property (nonatomic, copy) NSString* subject; - -/** - * The body of the message. The body is not required for the user to send a - * message. - */ -@property (nonatomic, copy) NSString* body; - -/** - * Controls whether a contact add button is shown in the views for - * TTMessageRecipientField instances. - */ -@property (nonatomic) BOOL showsRecipientPicker; - -/** - * Indicates if this message has been modified since it was originally - * shown. If the message has been modified, the user will be asked for - * confirmation before their cancel request is enacted. - */ -@property (nonatomic, readonly) BOOL isModified; - -/** - * Indicates if the user must enter text in the editor field to be allowed to - * send the message. - * - * @default NO - */ -@property (nonatomic) BOOL requireNonEmptyMessageBody; - -/** - * Initializes the class with an array of recipients. These recipients will - * be pre-filled in the TTMessageRecipientField's view. - * - * If a non-empty recipients array is provided, TTMessageController expects - * the first field to be an instance of TTMessageRecipientField. You may pass - * nil if you do not wish to supply initial recipients. - */ -- (id)initWithRecipients:(NSArray*)recipients; - -/** - * Adds the supplied recipient to the field at the index provided. That - * recipient will be rendered as a cell within that field's view. The cell's - * label will be determined by asking the datasource for a string label for - * the recipient object provided. - * - * This method is a no-op if the datasource fails to provide a label for the - * cell, or if the fieldIndex provided does not refer to a - * TTPickerTextField. - */ -- (void)addRecipient:(id)recipient forFieldAtIndex:(NSUInteger)fieldIndex; - -/** - * Returns the text value of the field at the supplied index. Passing - * fields.count returns the body contents. - * - * Whitespace has been trimmed from the returned value. - */ -- (NSString*)textForFieldAtIndex:(NSUInteger)fieldIndex; - -/** - * Sets the text value for the field at fieldIndex. Passing fields.count - * sets the body text. - */ -- (void)setText:(NSString*)text forFieldAtIndex:(NSUInteger)fieldIndex; - -/** - * Returns true if the field at the supplied index is not empty or has - * only whitespace. Passing fields.count returns true if the body has any - * text, whitespace included. - */ -- (BOOL)fieldHasValueAtIndex:(NSUInteger)fieldIndex; - -/** - * Returns the UIView instance representing the field at fieldIndex. Passing - * fields.count returns the view representing the body contents. - */ -- (UIView*)viewForFieldAtIndex:(NSUInteger)fieldIndex; - -/** - * Causes a view used to indicate message activity to be shown or dismissed - * depending on the value of show. This view obscures the editable field views. - * It is usually shown while the message is being sent. - */ -- (void)showActivityView:(BOOL)show; - -/** - * Returns the title for the activity view that is shown by showActivityView. - * By default, the title is "Sending...", but subclasses may override this - * method to show a different title. The default title has been localized. - */ -- (NSString*)titleForSending; - -/** - * Tells the delegate to send the message. - */ -- (void)send; - -/** - * Cancel the message, but confirm first with the user if necessary. - */ -- (void)cancel:(BOOL)confirmIfNecessary; - -/** - * Confirms with the user that it is ok to cancel. - */ -- (void)confirmCancellation; - -/** - * Sent before the delegate is informed that it should send the message. - * Subclasses can override this method to implement custom logic. - */ -- (void)messageWillSend:(NSArray*)fields; - -/** - * The user touched the recipient picker button. Subclasses can override - * this method to implement custom logic. - */ -- (void)messageWillShowRecipientPicker; - -/** - * Sent after the delegate has been informed that it should send the message. - * Subclasses can override this method to implement custom logic. - */ -- (void)messageDidSend; - -/** - * Determines if the message should cancel without confirming with the user. - * The default implementation is to allow the user to cancel without - * confirmation if no required fields have been modified and they have not - * entered any subject or body text. - */ -- (BOOL)messageShouldCancel; - -@end diff --git a/src/Three20UI/Headers/TTMessageControllerDelegate.h b/src/Three20UI/Headers/TTMessageControllerDelegate.h deleted file mode 100644 index 608a438ba6..0000000000 --- a/src/Three20UI/Headers/TTMessageControllerDelegate.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -/** - * A protocol for the object that implements the backend logic for the - * TTMessageController. This object is responsible for delivering the message - * that was composed in the view controller when the user chooses the send option. - * It receive a message when the user cancels the creation of a message or when - * they press the plus icon in a recipient field. - */ -@protocol TTMessageControllerDelegate - -@optional - -/** - * Received when the user touches the send button, indicating they wish to send - * their message. Implementations should send the message represented by the - * supplied fields. The fields array contains subclasses of TTMessageField. Its - * last object is the body of the message, contained within a TTMessageTextField. - */ -- (void)composeController:(TTMessageController*)controller didSendFields:(NSArray*)fields; - -/** - * Received when the user has chosen to cancel creating their message. Upon - * returning, the TTMessageController will be dismissed. Implementations - * can use this callback to cleanup any resources. - */ -- (void)composeControllerWillCancel:(TTMessageController*)controller; - -/** - * Received in response to the user touching a contact add button. This method - * should prepare and present a view for the user to choose a contact. Upon - * choosing a contact, that contact should be added to the field. - */ -- (void)composeControllerShowRecipientPicker:(TTMessageController*)controller; - -@end diff --git a/src/Three20UI/Headers/TTMessageField.h b/src/Three20UI/Headers/TTMessageField.h deleted file mode 100644 index 9ae3db7be6..0000000000 --- a/src/Three20UI/Headers/TTMessageField.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTPickerTextField; -@class TTMessageController; - -/** - * The base class for all fields used by the TTMessageController. - */ -@interface TTMessageField : NSObject { - NSString* _title; - BOOL _required; -} - -/** - * The title of this field, which will be rendered along with the field's - * contents. - */ -@property (nonatomic, copy) NSString* title; - -/** - * If true, the user must supply a value for this field before they will be - * able to send their message. - */ -@property (nonatomic) BOOL required; - -- (id)initWithTitle:(NSString*)title required:(BOOL)required; - -- (TTPickerTextField*)createViewForController:(TTMessageController*)controller; - -- (id)persistField:(UITextField*)textField; - -- (void)restoreField:(UITextField*)textField withData:(id)data; - -@end diff --git a/src/Three20UI/Headers/TTMessageRecipientField.h b/src/Three20UI/Headers/TTMessageRecipientField.h deleted file mode 100644 index 15fd64e668..0000000000 --- a/src/Three20UI/Headers/TTMessageRecipientField.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTMessageField.h" - -/** - * A field for holding recipients, typically found in an address book. - * Distinct values are rendered as individual cells. Once a cell has been - * inserted, it is deleted as a whole. - */ -@interface TTMessageRecipientField : TTMessageField { - NSArray* _recipients; -} - -@property (nonatomic, copy) NSArray* recipients; - -@end diff --git a/src/Three20UI/Headers/TTMessageSubjectField.h b/src/Three20UI/Headers/TTMessageSubjectField.h deleted file mode 100644 index b931591795..0000000000 --- a/src/Three20UI/Headers/TTMessageSubjectField.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTMessageTextField.h" - -/** - * A field for the subject of the message. This field's value is used to set - * the title in the navigation bar. You should only have one of these fields - * in your fields array. - */ -@interface TTMessageSubjectField : TTMessageTextField - -@end diff --git a/src/Three20UI/Headers/TTMessageTextField.h b/src/Three20UI/Headers/TTMessageTextField.h deleted file mode 100644 index 9a27df253b..0000000000 --- a/src/Three20UI/Headers/TTMessageTextField.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTMessageField.h" - -/** - * A field for holding variable free form text. - */ -@interface TTMessageTextField : TTMessageField { - NSString* _text; -} - -@property (nonatomic, copy) NSString* text; - -@end diff --git a/src/Three20UI/Headers/TTModelViewController.h b/src/Three20UI/Headers/TTModelViewController.h deleted file mode 100644 index 65ce8cd6cc..0000000000 --- a/src/Three20UI/Headers/TTModelViewController.h +++ /dev/null @@ -1,212 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTViewController.h" - -// Network -#import "Three20Network/TTModelDelegate.h" - -@protocol TTModel; - -/** - * A view controller that manages a model in addition to a view. - */ -@interface TTModelViewController : TTViewController { - id _model; - NSError* _modelError; - - struct { - unsigned int isModelDidRefreshInvalid:1; - unsigned int isModelWillLoadInvalid:1; - unsigned int isModelDidLoadInvalid:1; - unsigned int isModelDidLoadFirstTimeInvalid:1; - unsigned int isModelDidShowFirstTimeInvalid:1; - unsigned int isViewInvalid:1; - unsigned int isViewSuspended:1; - unsigned int isUpdatingView:1; - unsigned int isShowingEmpty:1; - unsigned int isShowingLoading:1; - unsigned int isShowingModel:1; - unsigned int isShowingError:1; - } _flags; -} - -@property (nonatomic, retain) id model; - -/** - * An error that occurred while trying to load content. - */ -@property (nonatomic, retain) NSError* modelError; - -/** - * Creates the model that the controller manages. - */ -- (void)createModel; - -/** - * Releases the current model and forces the creation of a new model. - */ -- (void)invalidateModel; - -/** - * Indicates whether the model has been created. - */ -- (BOOL)isModelCreated; - -/** - * Indicates that data should be loaded from the model. - * - * Do not call this directly. Subclasses should implement this method. - */ -- (BOOL)shouldLoad; - -/** - * Indicates that data should be reloaded from the model. - * - * Do not call this directly. Subclasses should implement this method. - */ -- (BOOL)shouldReload; - -/** - * Indicates that more data should be loaded from the model. - * - * Do not call this directly. Subclasses should implement this method. - */ -- (BOOL)shouldLoadMore; - -/** - * Tests if it is possible to show the model. - * - * After a model has loaded, this method is called to test whether or not to set the model - * has content that can be shown. If you return NO, showEmpty: will be called, and if you - * return YES, showModel: will be called. - */ -- (BOOL)canShowModel; - -/** - * Reloads data from the model. - */ -- (void)reload; - -/** - * Reloads data from the model if it has become out of date. - */ -- (void)reloadIfNeeded; - -/** - * Refreshes the model state and loads new data if necessary. - */ -- (void)refresh; - -/** - * Begins a multi-stage update. - * - * You can call this method to make complicated updates more efficient, and to condense - * multiple changes to your model into a single visual change. Call endUpdate when you are done - * to update the view with all of your changes. - */ -- (void)beginUpdates; - -/** - * Ends a multi-stage model update and updates the view to reflect the model. - * - * You can call this method to make complicated updates more efficient, and to condense - * multiple changes to your model into a single visual change. - */ -- (void)endUpdates; - -/** - * Indicates that the model has changed and schedules the view to be updated to reflect it. - */ -- (void)invalidateView; - -/** - * Immediately creates, loads, and displays the model (if it was not already). - */ -- (void)updateView; - -/** - * Called when the model is refreshed. - * - * Subclasses should override this function update parts of the view that may need to changed - * when there is a new model, or something about the existing model changes. - */ -- (void)didRefreshModel; - -/** - * Called before the model is asked to load itself. - * - * This is not called until after the view has loaded. If your model starts loading before - * the view is loaded, this will still be called, but not until after the view is loaded. - * - * The default implementation of this method does nothing. Subclasses may override this method - * to take an appropriate action. - */ -- (void)willLoadModel; - -/** - * Called after the model has loaded, just before it is to be displayed. - * - * This is not called until after the view has loaded. If your model finishes loading before - * the view is loaded, this will still be called, but not until after the view is loaded. - * - * If you refresh a model which is already loaded, this will be called, but the firstTime - * argument will be false. - * - * The default implementation of this method does nothing. Subclasses may override this method - * to take an appropriate action. - */ -- (void)didLoadModel:(BOOL)firstTime; - -/** - * Called just after a model has been loaded and displayed. - * - * The default implementation of this method does nothing. Subclasses may override this method - * to take an appropriate action. - */ -- (void)didShowModel:(BOOL)firstTime; - -/** - * Shows views to represent the loaded model's content. - * - * The default implementation of this method does nothing. Subclasses may override this method - * to take an appropriate action. - */ -- (void)showModel:(BOOL)show; - -/** - * Shows views to represent the model loading. - * - * The default implementation of this method does nothing. Subclasses may override this method - * to take an appropriate action. - */ -- (void)showLoading:(BOOL)show; - -/** - * Shows views to represent an empty model. - * - * The default implementation of this method does nothing. Subclasses may override this method - * to take an appropriate action. - */ -- (void)showEmpty:(BOOL)show; - -/** - * Shows views to represent an error that occurred while loading the model. - */ -- (void)showError:(BOOL)show; - -@end diff --git a/src/Three20UI/Headers/TTNavigationController.h b/src/Three20UI/Headers/TTNavigationController.h deleted file mode 100644 index 1b8e24adc7..0000000000 --- a/src/Three20UI/Headers/TTNavigationController.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTBaseNavigationController.h" - -@interface TTNavigationController : TTBaseNavigationController { - -} - -/** - * Pushes a view controller with a transition other than the standard sliding animation. - */ -- (void)pushViewController: (UIViewController*)controller - animatedWithTransition: (UIViewAnimationTransition)transition; - -/** - * Pops a view controller with a transition other than the standard sliding animation. - */ -- (UIViewController*)popViewControllerAnimatedWithTransition:(UIViewAnimationTransition)transition; - - -@end diff --git a/src/Three20UI/Headers/TTNavigator.h b/src/Three20UI/Headers/TTNavigator.h deleted file mode 100644 index f9476855f2..0000000000 --- a/src/Three20UI/Headers/TTNavigator.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTBaseNavigator.h" - -/** - * Shortcut for calling [[TTNavigator navigator] openURL:] - */ -UIViewController* TTOpenURL(NSString* URL); - -/** - * Shortcut for calling [[TTBaseNavigator navigatorForView:view] openURL:] - */ -UIViewController* TTOpenURLFromView(NSString* URL, UIView* view); - -/** - * A URL-based navigation system with built-in persistence. - * Add support for model-based controllers and implement the legacy global instance accessor. - */ -@interface TTNavigator : TTBaseNavigator { -} - -+ (TTNavigator*)navigator; - -/** - * Reloads the content in the visible view controller. - */ -- (void)reload; - -@end diff --git a/src/Three20UI/Headers/TTNavigatorWindow.h b/src/Three20UI/Headers/TTNavigatorWindow.h deleted file mode 100644 index 6c0785a6f2..0000000000 --- a/src/Three20UI/Headers/TTNavigatorWindow.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * Provides support for shake gestures. Sends off a reload request to the global navigator - * when the user shakes their device. - */ -@interface TTNavigatorWindow : UIWindow -@end diff --git a/src/Three20UI/Headers/TTPageControl.h b/src/Three20UI/Headers/TTPageControl.h deleted file mode 100644 index 907ad320a9..0000000000 --- a/src/Three20UI/Headers/TTPageControl.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTStyle; - -/** - * TTPageControl is a version of UIPageControl which allows you to style the dots. - */ -@interface TTPageControl : UIControl { - NSInteger _numberOfPages; - NSInteger _currentPage; - - NSString* _dotStyle; - TTStyle* _normalDotStyle; - TTStyle* _currentDotStyle; - - BOOL _hidesForSinglePage; -} - -@property (nonatomic) NSInteger numberOfPages; -@property (nonatomic) NSInteger currentPage; -@property (nonatomic, copy) NSString* dotStyle; - -/** - * Set to YES to hide the pagecontrol if only one page is present - * - * @default NO - */ -@property (nonatomic) BOOL hidesForSinglePage; - -@end diff --git a/src/Three20UI/Headers/TTPhoto.h b/src/Three20UI/Headers/TTPhoto.h deleted file mode 100644 index bb9f3f2d80..0000000000 --- a/src/Three20UI/Headers/TTPhoto.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTPhotoVersion.h" - -// UINavigator -#import "Three20UINavigator/TTURLObject.h" - -@protocol TTPhotoSource; - -@protocol TTPhoto - -/** - * The photo source that the photo belongs to. - */ -@property (nonatomic, assign) id photoSource; - -/** - * The size of the photo. - */ -@property (nonatomic) CGSize size; - -/** - * The index of the photo within its photo source. - */ -@property (nonatomic) NSInteger index; - -/** - * The caption of the photo. - */ -@property (nonatomic, copy) NSString* caption; - -/** - * Gets the URL of one of the differently sized versions of the photo. - */ -- (NSString*)URLForVersion:(TTPhotoVersion)version; - -@end diff --git a/src/Three20UI/Headers/TTPhotoSource.h b/src/Three20UI/Headers/TTPhotoSource.h deleted file mode 100644 index 749ed229f7..0000000000 --- a/src/Three20UI/Headers/TTPhotoSource.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Network -#import "Three20Network/TTModel.h" - -// UINavigator -#import "Three20UINavigator/TTURLObject.h" - -#define TT_NULL_PHOTO_INDEX NSIntegerMax - -@protocol TTPhoto; -@class TTURLRequest; - -@protocol TTPhotoSource - -/** - * The title of this collection of photos. - */ -@property (nonatomic, copy) NSString* title; - -/** - * The total number of photos in the source, independent of the number that have been loaded. - */ -@property (nonatomic, readonly) NSInteger numberOfPhotos; - -/** - * The maximum index of photos that have already been loaded. - */ -@property (nonatomic, readonly) NSInteger maxPhotoIndex; - -- (id)photoAtIndex:(NSInteger)index; - -@end diff --git a/src/Three20UI/Headers/TTPhotoVersion.h b/src/Three20UI/Headers/TTPhotoVersion.h deleted file mode 100644 index 19cd126895..0000000000 --- a/src/Three20UI/Headers/TTPhotoVersion.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -typedef enum { - TTPhotoVersionNone, - TTPhotoVersionLarge, - TTPhotoVersionMedium, - TTPhotoVersionSmall, - TTPhotoVersionThumbnail -} TTPhotoVersion; diff --git a/src/Three20UI/Headers/TTPhotoView.h b/src/Three20UI/Headers/TTPhotoView.h deleted file mode 100644 index 7618d84b96..0000000000 --- a/src/Three20UI/Headers/TTPhotoView.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTImageView.h" -#import "Three20UI/TTPhotoVersion.h" -#import "Three20UI/TTImageViewDelegate.h" - -@protocol TTPhoto; -@class TTLabel; - -@interface TTPhotoView : TTImageView { - id _photo; - UIActivityIndicatorView* _statusSpinner; - - TTLabel* _statusLabel; - TTLabel* _captionLabel; - TTStyle* _captionStyle; - - TTPhotoVersion _photoVersion; - - BOOL _hidesExtras; - BOOL _hidesCaption; -} - -@property (nonatomic, retain) id photo; -@property (nonatomic, retain) TTStyle* captionStyle; -@property (nonatomic) BOOL hidesExtras; -@property (nonatomic) BOOL hidesCaption; - -- (BOOL)loadPreview:(BOOL)fromNetwork; -- (void)loadImage; - -- (void)showProgress:(CGFloat)progress; -- (void)showStatus:(NSString*)text; - -@end diff --git a/src/Three20UI/Headers/TTPhotoViewController.h b/src/Three20UI/Headers/TTPhotoViewController.h deleted file mode 100644 index c59b652fd0..0000000000 --- a/src/Three20UI/Headers/TTPhotoViewController.h +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTModelViewController.h" -#import "Three20UI/TTScrollViewDelegate.h" -#import "Three20UI/TTScrollViewDataSource.h" -#import "Three20UI/TTThumbsViewControllerDelegate.h" - -@protocol TTPhotoSource; -@class TTScrollView; -@class TTPhotoView; -@class TTStyle; - -@interface TTPhotoViewController : TTModelViewController < - TTScrollViewDelegate, - TTScrollViewDataSource, - TTThumbsViewControllerDelegate -> { - id _centerPhoto; - NSInteger _centerPhotoIndex; - - UIView* _innerView; - TTScrollView* _scrollView; - TTPhotoView* _photoStatusView; - - UIToolbar* _toolbar; - UIBarButtonItem* _nextButton; - UIBarButtonItem* _previousButton; - - TTStyle* _captionStyle; - - UIImage* _defaultImage; - - NSString* _statusText; - - NSTimer* _slideshowTimer; - NSTimer* _loadTimer; - - BOOL _delayLoad; - - TTThumbsViewController* _thumbsController; - - id _photoSource; -} - -/** - * The source of a sequential photo collection that will be displayed. - */ -@property (nonatomic, retain) id photoSource; - -/** - * The photo that is currently visible and centered. - * - * You can assign this directly to change the photoSource to the one that contains the photo. - */ -@property (nonatomic, retain) id centerPhoto; - -/** - * The index of the currently visible photo. - * - * Because centerPhoto can be nil while waiting for the source to load the photo, this property - * must be maintained even though centerPhoto has its own index property. - */ -@property (nonatomic, readonly) NSInteger centerPhotoIndex; - -/** - * The default image to show before a photo has been loaded. - */ -@property (nonatomic, retain) UIImage* defaultImage; - -/** - * The style to use for the caption label. - */ -@property (nonatomic, retain) TTStyle* captionStyle; - -- (id)initWithPhoto:(id)photo; -- (id)initWithPhotoSource:(id)photoSource; - -/** - * Creates a photo view for a new page. - * - * Do not call this directly. It is meant to be overriden by subclasses. - */ -- (TTPhotoView*)createPhotoView; - -/** - * Creates the thumbnail controller used by the "See All" button. - * - * Do not call this directly. It is meant to be overriden by subclasses. - */ -- (TTThumbsViewController*)createThumbsViewController; - -/** - * Sent to the controller after it moves from one photo to another. - */ -- (void)didMoveToPhoto:(id)photo fromPhoto:(id)fromPhoto; - -/** - * Shows or hides an activity label on top of the photo. - */ -- (void)showActivity:(NSString*)title; - -@end diff --git a/src/Three20UI/Headers/TTPickerTextField.h b/src/Three20UI/Headers/TTPickerTextField.h deleted file mode 100644 index 7442f8abc0..0000000000 --- a/src/Three20UI/Headers/TTPickerTextField.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTSearchTextField.h" - -@class TTPickerViewCell; - -@interface TTPickerTextField : TTSearchTextField { - NSMutableArray* _cellViews; - TTPickerViewCell* _selectedCell; - int _lineCount; - CGPoint _cursorOrigin; -} - -@property (nonatomic, readonly) NSArray* cellViews; -@property (nonatomic, readonly) NSArray* cells; -@property (nonatomic, assign) TTPickerViewCell* selectedCell; -@property (nonatomic, readonly) int lineCount; - -- (void)addCellWithObject:(id)object; - -- (void)removeCellWithObject:(id)object; - -- (void)removeAllCells; - -- (void)removeSelectedCell; - -- (void)scrollToVisibleLine:(BOOL)animated; - -- (void)scrollToEditingLine:(BOOL)animated; - -@end diff --git a/src/Three20UI/Headers/TTPickerTextFieldDelegate.h b/src/Three20UI/Headers/TTPickerTextFieldDelegate.h deleted file mode 100644 index 5377a8a4a6..0000000000 --- a/src/Three20UI/Headers/TTPickerTextFieldDelegate.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTSearchTextFieldDelegate.h" - -@class TTPickerTextField; - -@protocol TTPickerTextFieldDelegate -@optional - -- (void)textField:(TTPickerTextField*)textField didAddCellAtIndex:(NSInteger)index; - -- (void)textField:(TTPickerTextField*)textField didRemoveCellAtIndex:(NSInteger)index; - -- (void)textFieldDidResize:(TTPickerTextField*)textField; - -@end diff --git a/src/Three20UI/Headers/TTPickerViewCell.h b/src/Three20UI/Headers/TTPickerViewCell.h deleted file mode 100644 index c229bd730e..0000000000 --- a/src/Three20UI/Headers/TTPickerViewCell.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTView.h" - -@interface TTPickerViewCell : TTView { - id _object; - UILabel* _labelView; - BOOL _selected; -} - -@property (nonatomic, retain) id object; -@property (nonatomic, copy) NSString* label; -@property (nonatomic, retain) UIFont* font; -@property (nonatomic) BOOL selected; - -@end diff --git a/src/Three20UI/Headers/TTPopupViewController.h b/src/Three20UI/Headers/TTPopupViewController.h deleted file mode 100644 index 23d6a388a7..0000000000 --- a/src/Three20UI/Headers/TTPopupViewController.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTModelViewController.h" - -/** - * A view controller which, when displayed modally, inserts its view over the parent controller. - * - * Normally, displaying a modal view controller will completely hide the underlying view - * controller, and even remove its view from the view hierarchy. Popup view controllers allow - * you to present a "modal" view which overlaps the parent view controller but does not - * necessarily hide it. - * - * This class is meant to be subclassed, not used directly. - */ -@interface TTPopupViewController : TTModelViewController { -} - -- (void)showInView:(UIView*)view animated:(BOOL)animated; -- (void)dismissPopupViewControllerAnimated:(BOOL)animated; -- (void)showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated; -- (void)showFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated; - -@end diff --git a/src/Three20UI/Headers/TTPostController.h b/src/Three20UI/Headers/TTPostController.h deleted file mode 100644 index 4bf4b750ac..0000000000 --- a/src/Three20UI/Headers/TTPostController.h +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTPopupViewController.h" - -@protocol TTPostControllerDelegate; -@class TTActivityLabel; -@class TTView; - -@interface TTPostController : TTPopupViewController { -@protected - id _result; - - NSString* _defaultText; - - CGRect _originRect; - - UIView* _originView; - UIView* _innerView; - - UINavigationBar* _navigationBar; - - TTView* _screenView; - UITextView* _textView; - TTActivityLabel* _activityView; - - BOOL _originalStatusBarHidden; - UIStatusBarStyle _originalStatusBarStyle; - - id _delegate; -} - -@property (nonatomic, retain) id result; -@property (nonatomic, readonly) UITextView* textView; -@property (nonatomic, readonly) UINavigationBar* navigatorBar; -@property (nonatomic, retain) UIView* originView; - -@property (nonatomic, assign) id delegate; - -/** - * Posts the text to delegates, who have to actually do something with it. - */ -- (void)post; - -/** - * Cancels the controller, but confirms with the user if they have entered text. - */ -- (void)cancel; - -/** - * Dismisses the controller with a resulting that is sent to the delegate. - */ -- (void)dismissWithResult:(id)result animated:(BOOL)animated; - -/** - * Notifies the user of an error and resets the editor to normal. - */ -- (void)failWithError:(NSError*)error; - -/** - * The users has entered text and posted it. - * - * Subclasses can implement this to handle the text before it is sent to the delegate. The - * default returns NO. - * - * @return YES if the controller should be dismissed immediately. - */ -- (BOOL)willPostText:(NSString*)text; - -- (NSString*)titleForActivity; - -- (NSString*)titleForError:(NSError*)error; - -@end diff --git a/src/Three20UI/Headers/TTPostControllerDelegate.h b/src/Three20UI/Headers/TTPostControllerDelegate.h deleted file mode 100644 index 68d408afa9..0000000000 --- a/src/Three20UI/Headers/TTPostControllerDelegate.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@class TTPostController; - -@protocol TTPostControllerDelegate -@optional - -/** - * The user has posted text and an animation is about to show the text return to its origin. - * - * @return whether to dismiss the controller or wait for the user to call dismiss. - */ -- (BOOL)postController:(TTPostController*)postController willPostText:(NSString*)text; - -/** - * The text will animate towards a rectangle. - * - * @return the rect in screen coordinates where the text should animate towards. - */ -- (CGRect)postController:(TTPostController*)postController willAnimateTowards:(CGRect)rect; - -/** - * The text has been posted. - */ -- (void)postController: (TTPostController*)postController - didPostText: (NSString*)text - withResult: (id)result; - -/** - * The controller was cancelled before posting. - */ -- (void)postControllerDidCancel:(TTPostController*)postController; - -@end diff --git a/src/Three20UI/Headers/TTRecursiveProgress.h b/src/Three20UI/Headers/TTRecursiveProgress.h deleted file mode 100644 index 1092c174bc..0000000000 --- a/src/Three20UI/Headers/TTRecursiveProgress.h +++ /dev/null @@ -1,110 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@protocol TTRecursiveProgressDelegate -@required -/** - * @param progress The progress percentage within [0...1]. - */ -- (void)didSetProgress:(CGFloat)progress; - -@end - - -/** - * A generic recursive progress object. This object makes it possible to split progress into - * recursive chunks. Here's an example: - * - * 0 Standard progress bar 1 - * |-----------------------------------| - * - * It's possible to split this into recursive chunks like so: - * - * 0 Recursive progress bar 1 - * |-----------------------------------| - * 0 1 0 1 0 1 - * |-------|-------|-------------------| - * 0 1 0 1 - * |-------|-----------| - * - * Each progress object only knows about progress from 0...1. Setting the progress on any - * object propagates the number up the tree until it's at the root node, at which point we - * notify the delegate. - * - * An example: You write a method that displays progress. This method has submethods. Each - * submethod also needs to display progress, but they need to do so in sub units. - * - * Coding example: - * - * TTRecursiveProgress* progress = [TTRecursiveProgress progressWithDelegate:self]; - * progress.percent = 0.5; // didSetProgress:0.5 - * - * TTRecursiveProgress* subProgress = [TTRecursiveProgress - * progressWithParent: progress firstPercent: 0.2 lastPercent: 0.6]; - * subProgress.percent = 0.5; // didSetProgress:0.4 - */ -@interface TTRecursiveProgress : NSObject { - id _delegate; // Only valid in the topmost node. - TTRecursiveProgress* _parent; // Only valid in child nodes. - - CGFloat _firstPercent; - CGFloat _lastPercent; -} - -/** - * The initial percentage within the range of [0...1] - */ -@property (nonatomic) CGFloat firstPercent; - -/** - * The final percentage within the range of [0...1]. - * Should be >= firstPercent. - */ -@property (nonatomic) CGFloat lastPercent; - -/** - * Set the progress at this level and propagate it to the root node. - * Eventually calls didSetProgress: on the delegate with a value from 0...1. - */ -@property (nonatomic) CGFloat percent; - -/** - * The root level delegate. - */ -@property (nonatomic, assign) id delegate; - - -+ (id)progressWithDelegate:(id)delegate; - -+ (id)progressWithParent: (TTRecursiveProgress*)parent - firstPercent: (CGFloat)firstPercent - lastPercent: (CGFloat)lastPercent; - -// Designated initializer for root nodes -- (id)initWithDelegate:(id )delegate; - -// Designated initializer for child nodes -- (id)initWithParent:(TTRecursiveProgress*)parent - firstPercent: (CGFloat)firstPercent - lastPercent: (CGFloat)lastPercent; - -@end diff --git a/src/Three20UI/Headers/TTScrollView.h b/src/Three20UI/Headers/TTScrollView.h deleted file mode 100755 index 4fb55b532c..0000000000 --- a/src/Three20UI/Headers/TTScrollView.h +++ /dev/null @@ -1,222 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@protocol TTScrollViewDelegate; -@protocol TTScrollViewDataSource; - -@interface TTScrollView : UIView { - NSInteger _centerPageIndex; - NSInteger _visiblePageIndex; - BOOL _scrollEnabled; - BOOL _zoomEnabled; - BOOL _rotateEnabled; - CGFloat _pageSpacing; - NSTimeInterval _holdsAfterTouchingForInterval; - - UIInterfaceOrientation _orientation; - - id _delegate; - id _dataSource; - - NSMutableArray* _pages; - NSMutableArray* _pageQueue; - NSInteger _maxPages; - NSInteger _pageArrayIndex; - NSTimer* _tapTimer; - NSTimer* _holdingTimer; - NSTimer* _animationTimer; - NSDate* _animationStartTime; - NSTimeInterval _animationDuration; - UIEdgeInsets _animateEdges; - - // Speed for Inertia. - CGPoint _inertiaSpeed; - CGPoint _renewPosition; - - // A floating-point value that specifies the maximum scale factor that can be applied to - // the scroll view's content. - CGFloat _maximumZoomScale; - CGFloat _zoomScale; - - // Middle point bewteen fingers, is used to zoom using fingers positon and not the center - // of the image. - CGPoint centerOfFingers; - - // Distance between fingers, used to calculate zoom scale and zoom speed rate. - CGFloat actualDistanceBetweenFingers; - CGFloat distanceBetweenFingers; - - // A floating-point value that determines the rate of deceleration after the user lifts - // their finger. - CGFloat _decelerationRate; - - // The offset of the page edges from the edge of the screen. - UIEdgeInsets _pageEdges; - - // At the beginning of an animation, the page edges are cached within this member. - UIEdgeInsets _pageStartEdges; - - UIEdgeInsets _touchEdges; - UIEdgeInsets _touchStartEdges; - NSUInteger _touchCount; - CGFloat _overshoot; - - // The first touch in this view. - UITouch* _touch1; - - // The second touch in this view. - UITouch* _touch2; - - BOOL _dragging; - BOOL _decelerating; - BOOL _zooming; - BOOL _executingZoomGesture; - BOOL _holding; -} - -/** - * The current page index. - */ -@property (nonatomic) NSInteger centerPageIndex; - -/** - * Whether or not the current page is zoomed. - */ -@property (nonatomic, readonly) BOOL zoomed; - -/** - * A Boolean value that indicates whether the content view is currently zooming in or - * out. (read-only) - * - * The value of this property is YES if user is making a zoom gesture, otherwise it is NO - * - */ -@property (nonatomic, readonly) BOOL zooming; - -@property (nonatomic, readonly) BOOL holding; - -/** - * Returns whether the content is moving in the scroll view after the user lifted their - * finger. (read-only) - */ -@property (nonatomic,readonly,getter=isDecelerating) BOOL decelerating; - -/** - * @default YES - */ -@property (nonatomic) BOOL scrollEnabled; - -/** - * @default YES - */ -@property (nonatomic) BOOL zoomEnabled; - -/** - * @default YES - */ -@property (nonatomic) BOOL rotateEnabled; - -/** - * @default 40 - */ -@property (nonatomic) CGFloat pageSpacing; - -@property (nonatomic) UIInterfaceOrientation orientation; -@property (nonatomic, readonly) NSInteger numberOfPages; -@property (nonatomic, readonly) UIView* centerPage; - -/** - * The number of seconds to wait before initiating the "hold" action. - * - * @default 0 - */ -@property (nonatomic) NSTimeInterval holdsAfterTouchingForInterval; - -/** - * A floating-point value that determines the rate of deceleration after the user lifts - * their finger. - * - * @default 0.9 - */ -@property CGFloat decelerationRate; - -/** - * A floating-point value that specifies the current scale factor applied to the scroll - * view's content. - * - * The scale is animated by Default, use setZoomScale:animated: to control when is - * animated or not. - * - * @default 1.0 - */ -@property (nonatomic,assign) CGFloat zoomScale; - -/** - * A floating-point value that specifies the maximum scale factor that - * can be applied to the scroll view's content. - * - * @default 4.0 - */ -@property (nonatomic) CGFloat maximumZoomScale; - -@property (nonatomic, assign) id delegate; -@property (nonatomic, assign) id dataSource; - -/** - * A dictionary of visible pages keyed by the index of the page. - */ -@property (nonatomic, readonly) NSDictionary* visiblePages; - -- (void)setOrientation:(UIInterfaceOrientation)orientation animated:(BOOL)animated; - -/** - * A floating-point value that specifies the current zoom scale. - * - * YES to animate the transition to the new scale, NO to make the transition immediate. - */ -- (void)setZoomScale:(CGFloat)newScale animated:(BOOL)animated; - -/** - * A floating-point value that specifies the current zoom scale. - * - * Specify one point to scale centering to him. - * - * YES to animate the transition to the new scale, NO to make the transition immediate. - */ -- (void)setZoomScale:(CGFloat)newScale withPoint:(CGPoint)withPoint animated:(BOOL)animated; - -/** - * Gets a previously created page view that has been moved off screen and recycled. - */ -- (UIView*)dequeueReusablePage; - -- (void)reloadData; - -- (UIView*)pageAtIndex:(NSInteger)pageIndex; - -- (void)zoomToFit; - -- (void)zoomToDistance:(CGFloat)distance; - -/** - * Cancels any active touches and resets everything to an untouched state. - */ -- (void)cancelTouches; - -@end diff --git a/src/Three20UI/Headers/TTScrollViewDataSource.h b/src/Three20UI/Headers/TTScrollViewDataSource.h deleted file mode 100644 index 1e7bbecfcb..0000000000 --- a/src/Three20UI/Headers/TTScrollViewDataSource.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTScrollView; - -@protocol TTScrollViewDataSource - -- (NSInteger)numberOfPagesInScrollView:(TTScrollView*)scrollView; - -/** - * Gets a view to display for the page at the given index. - * - * You do not need to position or size the view as that is done for you later. You should - * call dequeueReusablePage first, and only create a new view if it returns nil. - */ -- (UIView*)scrollView:(TTScrollView*)scrollView pageAtIndex:(NSInteger)pageIndex; - -/** - * Gets the natural size of the page. - * - * The actual width and height are not as important as the ratio between width and height. - * - * If the size is not specified, then the size of the page is used. - */ -- (CGSize)scrollView:(TTScrollView*)scrollView sizeOfPageAtIndex:(NSInteger)pageIndex; - -@end diff --git a/src/Three20UI/Headers/TTScrollViewDelegate.h b/src/Three20UI/Headers/TTScrollViewDelegate.h deleted file mode 100644 index 33c4631a0c..0000000000 --- a/src/Three20UI/Headers/TTScrollViewDelegate.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTScrollView; - -@protocol TTScrollViewDelegate - -@required - -- (void)scrollView:(TTScrollView*)scrollView didMoveToPageAtIndex:(NSInteger)pageIndex; - -@optional - -- (void)scrollViewWillRotate: (TTScrollView*)scrollView - toOrientation: (UIInterfaceOrientation)orientation; - -- (void)scrollViewDidRotate:(TTScrollView*)scrollView; - -- (void)scrollViewWillBeginDragging:(TTScrollView*)scrollView; - -- (void)scrollViewDidEndDragging:(TTScrollView*)scrollView willDecelerate:(BOOL)willDecelerate; - -- (void)scrollViewWillBeginDecelerating:(TTScrollView*)scrollView; - -- (void)scrollViewDidEndDecelerating:(TTScrollView*)scrollView; - -- (BOOL)scrollViewShouldZoom:(TTScrollView*)scrollView; - -- (void)scrollViewDidBeginZooming:(TTScrollView*)scrollView; - -- (void)scrollViewDidEndZooming:(TTScrollView*)scrollView; - -- (void)scrollView:(TTScrollView*)scrollView touchedDown:(UITouch*)touch; - -- (void)scrollView:(TTScrollView*)scrollView touchedUpInside:(UITouch*)touch; - -- (void)scrollView:(TTScrollView*)scrollView tapped:(UITouch*)touch; - -- (void)scrollViewDidBeginHolding:(TTScrollView*)scrollView; - -- (void)scrollViewDidEndHolding:(TTScrollView*)scrollView; - -- (BOOL)scrollView:(TTScrollView*)scrollView - shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation; - -@end diff --git a/src/Three20UI/Headers/TTSearchBar.h b/src/Three20UI/Headers/TTSearchBar.h deleted file mode 100644 index 5243f14fc5..0000000000 --- a/src/Three20UI/Headers/TTSearchBar.h +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTView.h" - -@protocol TTTableViewDataSource; -@protocol TTSearchTextFieldDelegate; - -@class TTSearchTextField; -@class TTButton; - -@interface TTSearchBar : TTView { - TTSearchTextField* _searchField; - TTView* _boxView; - TTButton* _cancelButton; - - UIColor* _tintColor; - TTStyle* _textFieldStyle; - - BOOL _showsCancelButton; - BOOL _showsSearchIcon; -} - -@property (nonatomic, copy) NSString* text; -@property (nonatomic, copy) NSString* placeholder; -@property (nonatomic, readonly) UITableView* tableView; -@property (nonatomic, readonly) TTView* boxView; -@property (nonatomic, retain) UIColor* tintColor; -@property (nonatomic, retain) UIColor* textColor; -@property (nonatomic, retain) UIFont* font; -@property (nonatomic, retain) TTStyle* textFieldStyle; -@property (nonatomic) UIReturnKeyType returnKeyType; -@property (nonatomic) CGFloat rowHeight; -@property (nonatomic, readonly) BOOL editing; - -@property (nonatomic) BOOL searchesAutomatically; -@property (nonatomic) BOOL showsCancelButton; -@property (nonatomic) BOOL showsDoneButton; -@property (nonatomic) BOOL showsDarkScreen; -@property (nonatomic) BOOL showsSearchIcon; - -@property (nonatomic, retain) id dataSource; -@property (nonatomic, assign) id delegate; - -- (void)search; - -- (void)showSearchResults:(BOOL)show; - -@end diff --git a/src/Three20UI/Headers/TTSearchDisplayController.h b/src/Three20UI/Headers/TTSearchDisplayController.h deleted file mode 100644 index 5cbe136237..0000000000 --- a/src/Three20UI/Headers/TTSearchDisplayController.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@protocol TTTableViewDataSource; -@class TTTableViewController; - -extern const int kTTSearchBarBackgroundTag; - -/** - * Shows search results using a TTTableViewController. - * - * This extends the standard search display controller so that you can search a Three20 model. - * Searches that hit the internet and return asynchronously can provide feedback to the - * about the status of the remote search using TTModel's loading interface, and - * TTTableViewController's status views. - */ -@interface TTSearchDisplayController : UISearchDisplayController { - TTTableViewController* _searchResultsViewController; - NSTimer* _pauseTimer; - BOOL _pausesBeforeSearching; - - id _searchResultsDelegate2; -} - -@property (nonatomic, retain) TTTableViewController* searchResultsViewController; -@property (nonatomic) BOOL pausesBeforeSearching; - -@end diff --git a/src/Three20UI/Headers/TTSearchTextField.h b/src/Three20UI/Headers/TTSearchTextField.h deleted file mode 100644 index 3f2bf2ae25..0000000000 --- a/src/Three20UI/Headers/TTSearchTextField.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@protocol TTTableViewDataSource; -@class TTSearchTextFieldInternal; -@class TTView; - -@interface TTSearchTextField : UITextField { - TTSearchTextFieldInternal* _internal; - - UITableView* _tableView; - TTView* _shadowView; - UIButton* _screenView; - - UINavigationItem* _previousNavigationItem; - UIBarButtonItem* _previousRightBarButtonItem; - - NSTimer* _searchTimer; - CGFloat _rowHeight; - - BOOL _searchesAutomatically; - BOOL _showsDoneButton; - BOOL _showsDarkScreen; - - id _dataSource; -} - -@property (nonatomic, readonly) UITableView* tableView; -@property (nonatomic) CGFloat rowHeight; - -@property (nonatomic, readonly) BOOL hasText; -@property (nonatomic) BOOL searchesAutomatically; -@property (nonatomic) BOOL showsDoneButton; -@property (nonatomic) BOOL showsDarkScreen; - -@property (nonatomic, retain) id dataSource; - -- (void)search; - -- (void)showSearchResults:(BOOL)show; - -- (UIView*)superviewForSearchResults; - -- (CGRect)rectForSearchResults:(BOOL)withKeyboard; - -- (BOOL)shouldUpdate:(BOOL)emptyText; - -@end diff --git a/src/Three20UI/Headers/TTSearchTextFieldDelegate.h b/src/Three20UI/Headers/TTSearchTextFieldDelegate.h deleted file mode 100644 index 32527d4a2e..0000000000 --- a/src/Three20UI/Headers/TTSearchTextFieldDelegate.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTSearchTextField; - -@protocol TTSearchTextFieldDelegate -@optional - -- (void)textField:(TTSearchTextField*)textField didSelectObject:(id)object; - -@end diff --git a/src/Three20UI/Headers/TTSearchTextFieldInternal.h b/src/Three20UI/Headers/TTSearchTextFieldInternal.h deleted file mode 100644 index e19bdfe2fd..0000000000 --- a/src/Three20UI/Headers/TTSearchTextFieldInternal.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTSearchTextField; - -@interface TTSearchTextFieldInternal : NSObject { - TTSearchTextField* _textField; - - id _delegate; -} - -@property (nonatomic, assign) id delegate; - - -- (id)initWithTextField:(TTSearchTextField*)textField; - -@end diff --git a/src/Three20UI/Headers/TTSearchlightLabel.h b/src/Three20UI/Headers/TTSearchlightLabel.h deleted file mode 100644 index 812b960726..0000000000 --- a/src/Three20UI/Headers/TTSearchlightLabel.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTSearchlightLabel : UIView { - NSString* _text; - - UIFont* _font; - UIColor* _textColor; - UIColor* _spotlightColor; - UITextAlignment _textAlignment; - - NSTimer* _timer; - CGFloat _spotlightPoint; - - CGContextRef _maskContext; - void* _maskData; -} - -@property (nonatomic, copy) NSString* text; - -@property (nonatomic, retain) UIFont* font; -@property (nonatomic, retain) UIColor* textColor; -@property (nonatomic, retain) UIColor* spotlightColor; -@property (nonatomic) UITextAlignment textAlignment; - -- (void)startAnimating; -- (void)stopAnimating; - -@end diff --git a/src/Three20UI/Headers/TTSectionedDataSource.h b/src/Three20UI/Headers/TTSectionedDataSource.h deleted file mode 100644 index 30e20cc56d..0000000000 --- a/src/Three20UI/Headers/TTSectionedDataSource.h +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewDataSource.h" - -@interface TTSectionedDataSource : TTTableViewDataSource { - NSMutableArray* _sections; - NSMutableArray* _items; -} - -@property (nonatomic, retain) NSMutableArray* items; -@property (nonatomic, retain) NSMutableArray* sections; - -/** - * Objects should be in this format: - * - * @"section title", item, item, @"section title", item, item, ... - * - * Where item is generally a type of TTTableItem. - */ -+ (TTSectionedDataSource*)dataSourceWithObjects:(id)object,...; - -/** - * Objects should be in this format: - * - * @"section title", arrayOfItems, @"section title", arrayOfItems, ... - * - * Where arrayOfItems is generally an array of items of type TTTableItem. - */ -+ (TTSectionedDataSource*)dataSourceWithArrays:(id)object,...; - -/** - * @param items - * - * An array of arrays, where each array is the contents of a - * section, to be listed under the section title held in the - * corresponding index of the `section` array. - * - * @param sections - * - * An array of strings, where each string is the title - * of a section. - * - * The items and sections arrays should be of equal length. - */ -+ (TTSectionedDataSource*)dataSourceWithItems:(NSArray*)items sections:(NSArray*)sections; - -- (id)initWithItems:(NSArray*)items sections:(NSArray*)sections; - -- (NSIndexPath*)indexPathOfItemWithUserInfo:(id)userInfo; - -- (void)removeItemAtIndexPath:(NSIndexPath*)indexPath; -- (BOOL)removeItemAtIndexPath:(NSIndexPath*)indexPath andSectionIfEmpty:(BOOL)andSection; - -@end diff --git a/src/Three20UI/Headers/TTSplitViewController.h b/src/Three20UI/Headers/TTSplitViewController.h deleted file mode 100644 index 16a2b7f3e0..0000000000 --- a/src/Three20UI/Headers/TTSplitViewController.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTNavigatorRootContainer.h" - -@class TTNavigator; - -/** - * A split view controller that implements the navigator root protocol. - * - * See the TTCatalog sample app for an example of this controller in action. - */ -@interface TTSplitViewController : UISplitViewController < - UISplitViewControllerDelegate, - TTNavigatorRootContainer -> { -@private - TTNavigator* _leftNavigator; - TTNavigator* _rightNavigator; - - UIBarButtonItem* _splitViewButton; - UIPopoverController* _popoverSplitController; -} - -@property (nonatomic, readonly) TTNavigator* leftNavigator; -@property (nonatomic, readonly) TTNavigator* rightNavigator; -@property (nonatomic, retain) UIBarButtonItem* splitViewButton; -@property (nonatomic, retain) UIPopoverController* popoverSplitController; - - -/** - * Show/hide the button as the right-side navigator's root navigation item's left button. - */ -- (void)updateSplitViewButton; - -@end diff --git a/src/Three20UI/Headers/TTStyledTextLabel.h b/src/Three20UI/Headers/TTStyledTextLabel.h deleted file mode 100644 index 78f3c1da62..0000000000 --- a/src/Three20UI/Headers/TTStyledTextLabel.h +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyledTextDelegate.h" - -@class TTStyledText; -@class TTStyledElement; -@class TTStyledBoxFrame; -@class TTStyle; - -/** - * A view that can display styled text. - */ -@interface TTStyledTextLabel : UIView { - TTStyledText* _text; - - UIColor* _textColor; - UIColor* _highlightedTextColor; - UIFont* _font; - UITextAlignment _textAlignment; - - UIEdgeInsets _contentInset; - - BOOL _highlighted; - TTStyledElement* _highlightedNode; - TTStyledBoxFrame* _highlightedFrame; - - NSMutableArray* _accessibilityElements; -} - -/** - * The styled text displayed by the label. - */ -@property (nonatomic, retain) TTStyledText* text; - -/** - * A shortcut for setting the text property to an HTML string. - */ -@property (nonatomic, copy) NSString* html; - -/** - * The font of the text. - */ -@property (nonatomic, retain) UIFont* font; - -/** - * The color of the text. - */ -@property (nonatomic, retain) UIColor* textColor; - -/** - * The highlight color applied to the text. - */ -@property (nonatomic, retain) UIColor* highlightedTextColor; - -/** - * The alignment of the text. (NOT YET IMPLEMENTED) - */ -@property (nonatomic) UITextAlignment textAlignment; - -/** - * The inset of the edges around the text. - * - * This will increase the size of the label when sizeToFit is called. - */ -@property (nonatomic) UIEdgeInsets contentInset; - -/** - * A Boolean value indicating whether the receiver should be drawn with a highlight. - */ -@property (nonatomic) BOOL highlighted; - -/** - * The link node which is being touched and highlighted by the user. - */ -@property (nonatomic, retain) TTStyledElement* highlightedNode; - -@end diff --git a/src/Three20UI/Headers/TTStyledTextTableCell.h b/src/Three20UI/Headers/TTStyledTextTableCell.h deleted file mode 100644 index 34d1c8dd13..0000000000 --- a/src/Three20UI/Headers/TTStyledTextTableCell.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewCell.h" - -@class TTStyledTextLabel; - -@interface TTStyledTextTableCell : TTTableViewCell { - TTStyledTextLabel* _label; -} - -@property (nonatomic, readonly) TTStyledTextLabel* label; - -@end diff --git a/src/Three20UI/Headers/TTStyledTextTableItemCell.h b/src/Three20UI/Headers/TTStyledTextTableItemCell.h deleted file mode 100644 index 30884d978b..0000000000 --- a/src/Three20UI/Headers/TTStyledTextTableItemCell.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItemCell.h" - -@class TTStyledTextLabel; - -@interface TTStyledTextTableItemCell : TTTableLinkedItemCell { - TTStyledTextLabel* _label; -} - -@property (nonatomic, readonly) TTStyledTextLabel* label; - -@end diff --git a/src/Three20UI/Headers/TTTab.h b/src/Three20UI/Headers/TTTab.h deleted file mode 100644 index 5cfa39cea8..0000000000 --- a/src/Three20UI/Headers/TTTab.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTButton.h" - -@class TTTabItem; -@class TTLabel; -@class TTTabBar; - -@interface TTTab : TTButton { - TTTabItem* _tabItem; - TTLabel* _badge; -} - -@property (nonatomic, retain) TTTabItem* tabItem; - -- (id)initWithItem:(TTTabItem*)item tabBar:(TTTabBar*)tabBar; - -@end diff --git a/src/Three20UI/Headers/TTTabBar.h b/src/Three20UI/Headers/TTTabBar.h deleted file mode 100644 index de6eb48869..0000000000 --- a/src/Three20UI/Headers/TTTabBar.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTView.h" - -@class TTTabItem; -@class TTTab; -@class TTImageView; -@class TTLabel; - -@protocol TTTabDelegate; - -@interface TTTabBar : TTView { - NSString* _tabStyle; - - NSInteger _selectedTabIndex; - NSArray* _tabItems; - NSMutableArray* _tabViews; - - id _delegate; -} - -@property (nonatomic, copy) NSString* tabStyle; - -@property (nonatomic, assign) TTTabItem* selectedTabItem; -@property (nonatomic, assign) TTTab* selectedTabView; -@property (nonatomic) NSInteger selectedTabIndex; - -@property (nonatomic, copy) NSArray* tabItems; -@property (nonatomic, readonly) NSArray* tabViews; - -@property (nonatomic, assign) id delegate; - -- (id)initWithFrame:(CGRect)frame; - -- (void)showTabAtIndex:(NSInteger)tabIndex; -- (void)hideTabAtIndex:(NSInteger)tabIndex; - -@end diff --git a/src/Three20UI/Headers/TTTabBarInternal.h b/src/Three20UI/Headers/TTTabBarInternal.h deleted file mode 100644 index 9fac32a001..0000000000 --- a/src/Three20UI/Headers/TTTabBarInternal.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTabBar.h" - -extern CGFloat kTabMargin; -extern const NSInteger kMaxBadgeNumber; - -@interface TTTabBar (TTInternal) - -- (CGSize)layoutTabs; - -@end diff --git a/src/Three20UI/Headers/TTTabDelegate.h b/src/Three20UI/Headers/TTTabDelegate.h deleted file mode 100644 index 9df290d673..0000000000 --- a/src/Three20UI/Headers/TTTabDelegate.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@class TTTabBar; - -@protocol TTTabDelegate - -- (void)tabBar:(TTTabBar*)tabBar tabSelected:(NSInteger)selectedIndex; - -@end diff --git a/src/Three20UI/Headers/TTTabGrid.h b/src/Three20UI/Headers/TTTabGrid.h deleted file mode 100644 index b687fba15f..0000000000 --- a/src/Three20UI/Headers/TTTabGrid.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTabBar.h" - -@interface TTTabGrid : TTTabBar { - NSInteger _columnCount; -} - -@property (nonatomic) NSInteger columnCount; - -@end diff --git a/src/Three20UI/Headers/TTTabItem.h b/src/Three20UI/Headers/TTTabItem.h deleted file mode 100644 index 65ab449277..0000000000 --- a/src/Three20UI/Headers/TTTabItem.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@class TTTabBar; - -@interface TTTabItem : NSObject { - NSString* _title; - NSString* _icon; - id _object; - int _badgeNumber; - TTTabBar* _tabBar; -} - -@property (nonatomic, copy) NSString* title; -@property (nonatomic, copy) NSString* icon; -@property (nonatomic, retain) id object; -@property (nonatomic) int badgeNumber; - -- (id)initWithTitle:(NSString*)title; - -@end - diff --git a/src/Three20UI/Headers/TTTabStrip.h b/src/Three20UI/Headers/TTTabStrip.h deleted file mode 100644 index eb48413c71..0000000000 --- a/src/Three20UI/Headers/TTTabStrip.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTabBar.h" - -@interface TTTabStrip : TTTabBar { -@private - TTView* _overflowLeft; - TTView* _overflowRight; - UIScrollView* _scrollView; - - BOOL _contentSizeCached; - CGSize _contentSize; - -} - -@end diff --git a/src/Three20UI/Headers/TTTableActivityItem.h b/src/Three20UI/Headers/TTTableActivityItem.h deleted file mode 100644 index 2fecd341ad..0000000000 --- a/src/Three20UI/Headers/TTTableActivityItem.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableItem.h" - -@interface TTTableActivityItem : TTTableItem { - NSString* _text; -} - -@property (nonatomic, copy) NSString* text; - -+ (id)itemWithText:(NSString*)text; - -@end diff --git a/src/Three20UI/Headers/TTTableActivityItemCell.h b/src/Three20UI/Headers/TTTableActivityItemCell.h deleted file mode 100644 index 5e769750fc..0000000000 --- a/src/Three20UI/Headers/TTTableActivityItemCell.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewCell.h" - -@class TTTableActivityItem; -@class TTActivityLabel; - -@interface TTTableActivityItemCell : TTTableViewCell { - TTTableActivityItem* _item; - TTActivityLabel* _activityLabel; -} - -@property (nonatomic, readonly, retain) TTActivityLabel* activityLabel; - -@end diff --git a/src/Three20UI/Headers/TTTableButton.h b/src/Three20UI/Headers/TTTableButton.h deleted file mode 100644 index 64191e4806..0000000000 --- a/src/Three20UI/Headers/TTTableButton.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@interface TTTableButton : TTTableTextItem -@end diff --git a/src/Three20UI/Headers/TTTableCaptionItem.h b/src/Three20UI/Headers/TTTableCaptionItem.h deleted file mode 100644 index b990db9ebb..0000000000 --- a/src/Three20UI/Headers/TTTableCaptionItem.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@interface TTTableCaptionItem : TTTableTextItem { - NSString* _caption; -} - -@property (nonatomic, copy) NSString* caption; - -+ (id)itemWithText:(NSString*)text caption:(NSString*)caption; -+ (id)itemWithText:(NSString*)text caption:(NSString*)caption URL:(NSString*)URL; -+ (id)itemWithText:(NSString*)text caption:(NSString*)caption URL:(NSString*)URL - accessoryURL:(NSString*)accessoryURL; - -@end diff --git a/src/Three20UI/Headers/TTTableCaptionItemCell.h b/src/Three20UI/Headers/TTTableCaptionItemCell.h deleted file mode 100644 index af57673e02..0000000000 --- a/src/Three20UI/Headers/TTTableCaptionItemCell.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItemCell.h" - -@interface TTTableCaptionItemCell : TTTableLinkedItemCell - -@property (nonatomic, readonly) UILabel* captionLabel; - -@end diff --git a/src/Three20UI/Headers/TTTableControlCell.h b/src/Three20UI/Headers/TTTableControlCell.h deleted file mode 100644 index 2d10eebe7c..0000000000 --- a/src/Three20UI/Headers/TTTableControlCell.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewCell.h" - -@class TTTableControlItem; - -@interface TTTableControlCell : TTTableViewCell { - TTTableControlItem* _item; - UIControl* _control; -} - -@property (nonatomic, readonly, retain) TTTableControlItem* item; -@property (nonatomic, readonly, retain) UIControl* control; - -@end diff --git a/src/Three20UI/Headers/TTTableControlItem.h b/src/Three20UI/Headers/TTTableControlItem.h deleted file mode 100644 index 7247883667..0000000000 --- a/src/Three20UI/Headers/TTTableControlItem.h +++ /dev/null @@ -1,31 +0,0 @@ - -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableItem.h" - -@interface TTTableControlItem : TTTableItem { - NSString* _caption; - UIControl* _control; -} - -@property (nonatomic, copy) NSString* caption; -@property (nonatomic, retain) UIControl* control; - -+ (id)itemWithCaption:(NSString*)caption control:(UIControl*)control; - -@end diff --git a/src/Three20UI/Headers/TTTableFlushViewCell.h b/src/Three20UI/Headers/TTTableFlushViewCell.h deleted file mode 100644 index cf8e27a1a8..0000000000 --- a/src/Three20UI/Headers/TTTableFlushViewCell.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewCell.h" - -@class TTTableViewItem; - -@interface TTTableFlushViewCell : TTTableViewCell { - TTTableViewItem* _item; - UIView* _view; -} - -@property (nonatomic, readonly, retain) TTTableViewItem* item; -@property (nonatomic, readonly, retain) UIView* view; - -@end diff --git a/src/Three20UI/Headers/TTTableFooterInfiniteScrollView.h b/src/Three20UI/Headers/TTTableFooterInfiniteScrollView.h deleted file mode 100644 index 62aff396a8..0000000000 --- a/src/Three20UI/Headers/TTTableFooterInfiniteScrollView.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTTableFooterInfiniteScrollView : UIView { - UIActivityIndicatorView* _indicator; - BOOL _loading; -} - -@property (nonatomic, retain) UIActivityIndicatorView* indicator; - -- (void)setLoading:(BOOL)loading; - -@end diff --git a/src/Three20UI/Headers/TTTableGrayTextItem.h b/src/Three20UI/Headers/TTTableGrayTextItem.h deleted file mode 100644 index e79c65eaef..0000000000 --- a/src/Three20UI/Headers/TTTableGrayTextItem.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@interface TTTableGrayTextItem : TTTableTextItem -@end diff --git a/src/Three20UI/Headers/TTTableHeaderDragRefreshView.h b/src/Three20UI/Headers/TTTableHeaderDragRefreshView.h deleted file mode 100644 index 341bc7364b..0000000000 --- a/src/Three20UI/Headers/TTTableHeaderDragRefreshView.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// Created by Devin Doty on 10/14/09. -// http://github.com/enormego/EGOTableViewPullRefresh -// Copyright 2009 enormego. All rights reserved. -// -// Modifications copyright 2010 Facebook. -// -// 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. -// - -#import -#import - -typedef enum { - TTTableHeaderDragRefreshReleaseToReload, - TTTableHeaderDragRefreshPullToReload, - TTTableHeaderDragRefreshLoading -} TTTableHeaderDragRefreshStatus; - -/** - * Pulled from the uprise78/three20-P31 fork with consent of uprise78. - */ -@interface TTTableHeaderDragRefreshView : UIView { - NSDate* _lastUpdatedDate; - UILabel* _lastUpdatedLabel; - UILabel* _statusLabel; - UIImageView* _arrowImage; - UIActivityIndicatorView* _activityView; -} - -- (void)setCurrentDate; -- (void)setUpdateDate:(NSDate*)date; -- (void)setStatus:(TTTableHeaderDragRefreshStatus)status; - -@end diff --git a/src/Three20UI/Headers/TTTableHeaderView.h b/src/Three20UI/Headers/TTTableHeaderView.h deleted file mode 100644 index b2443e84b6..0000000000 --- a/src/Three20UI/Headers/TTTableHeaderView.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTView.h" - -@interface TTTableHeaderView : TTView { - UILabel* _label; -} - -- (id)initWithTitle:(NSString*)title; - -@end diff --git a/src/Three20UI/Headers/TTTableImageItem.h b/src/Three20UI/Headers/TTTableImageItem.h deleted file mode 100644 index 4a1964f5eb..0000000000 --- a/src/Three20UI/Headers/TTTableImageItem.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@class TTStyle; - -@interface TTTableImageItem : TTTableTextItem { - NSString* _imageURL; - UIImage* _defaultImage; - TTStyle* _imageStyle; -} - -@property (nonatomic, copy) NSString* imageURL; -@property (nonatomic, retain) UIImage* defaultImage; -@property (nonatomic, retain) TTStyle* imageStyle; - -+ (id)itemWithText:(NSString*)text imageURL:(NSString*)imageURL; -+ (id)itemWithText:(NSString*)text imageURL:(NSString*)imageURL URL:(NSString*)URL; -+ (id)itemWithText:(NSString*)text imageURL:(NSString*)imageURL - defaultImage:(UIImage*)defaultImage URL:(NSString*)URL; -+ (id)itemWithText:(NSString*)text imageURL:(NSString*)imageURL - defaultImage:(UIImage*)defaultImage imageStyle:(TTStyle*)imageStyle URL:(NSString*)URL; - -@end diff --git a/src/Three20UI/Headers/TTTableImageItemCell.h b/src/Three20UI/Headers/TTTableImageItemCell.h deleted file mode 100644 index 81db620e97..0000000000 --- a/src/Three20UI/Headers/TTTableImageItemCell.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItemCell.h" - -@class TTImageView; - -@interface TTTableImageItemCell : TTTableTextItemCell { - TTImageView* _imageView2; -} - -@property (nonatomic, readonly, retain) TTImageView* imageView2; - -@end diff --git a/src/Three20UI/Headers/TTTableItem.h b/src/Three20UI/Headers/TTTableItem.h deleted file mode 100644 index 260ee0c0bd..0000000000 --- a/src/Three20UI/Headers/TTTableItem.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTTableItem : NSObject { - id _userInfo; -} - -@property (nonatomic, retain) id userInfo; - -@end diff --git a/src/Three20UI/Headers/TTTableLink.h b/src/Three20UI/Headers/TTTableLink.h deleted file mode 100644 index 0b6772b940..0000000000 --- a/src/Three20UI/Headers/TTTableLink.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@interface TTTableLink : TTTableTextItem -@end diff --git a/src/Three20UI/Headers/TTTableLinkedItem.h b/src/Three20UI/Headers/TTTableLinkedItem.h deleted file mode 100644 index cdb36cf257..0000000000 --- a/src/Three20UI/Headers/TTTableLinkedItem.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableItem.h" - -@interface TTTableLinkedItem : TTTableItem { - // If a URL is specified, TTNavigator will be used. Otherwise, the delegate+selector will - // be invoked. - NSString* _URL; - NSString* _accessoryURL; - - id _delegate; - SEL _selector; -} - -@property (nonatomic, copy) NSString* URL; -@property (nonatomic, copy) NSString* accessoryURL; -@property (nonatomic, assign) id delegate; -@property (nonatomic, assign) SEL selector; - -@end diff --git a/src/Three20UI/Headers/TTTableLinkedItemCell.h b/src/Three20UI/Headers/TTTableLinkedItemCell.h deleted file mode 100644 index 297a9c9c74..0000000000 --- a/src/Three20UI/Headers/TTTableLinkedItemCell.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewCell.h" - -@class TTTableLinkedItem; - -@interface TTTableLinkedItemCell : TTTableViewCell { - TTTableLinkedItem* _item; -} - -@end diff --git a/src/Three20UI/Headers/TTTableLongTextItem.h b/src/Three20UI/Headers/TTTableLongTextItem.h deleted file mode 100644 index dcdd565a97..0000000000 --- a/src/Three20UI/Headers/TTTableLongTextItem.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@interface TTTableLongTextItem : TTTableTextItem -@end diff --git a/src/Three20UI/Headers/TTTableMessageItem.h b/src/Three20UI/Headers/TTTableMessageItem.h deleted file mode 100644 index 08af588370..0000000000 --- a/src/Three20UI/Headers/TTTableMessageItem.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@interface TTTableMessageItem : TTTableTextItem { - NSString* _title; - NSString* _caption; - NSDate* _timestamp; - NSString* _imageURL; -} - -@property (nonatomic, copy) NSString* title; -@property (nonatomic, copy) NSString* caption; -@property (nonatomic, retain) NSDate* timestamp; -@property (nonatomic, copy) NSString* imageURL; - -+ (id)itemWithTitle:(NSString*)title caption:(NSString*)caption text:(NSString*)text - timestamp:(NSDate*)timestamp URL:(NSString*)URL; -+ (id)itemWithTitle:(NSString*)title caption:(NSString*)caption text:(NSString*)text - timestamp:(NSDate*)timestamp imageURL:(NSString*)imageURL URL:(NSString*)URL; - -@end diff --git a/src/Three20UI/Headers/TTTableMessageItemCell.h b/src/Three20UI/Headers/TTTableMessageItemCell.h deleted file mode 100644 index 3c3d3d2922..0000000000 --- a/src/Three20UI/Headers/TTTableMessageItemCell.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItemCell.h" - -@class TTImageView; - -@interface TTTableMessageItemCell : TTTableLinkedItemCell { - UILabel* _titleLabel; - UILabel* _timestampLabel; - TTImageView* _imageView2; -} - -@property (nonatomic, readonly, retain) UILabel* titleLabel; -@property (nonatomic, readonly) UILabel* captionLabel; -@property (nonatomic, readonly, retain) UILabel* timestampLabel; -@property (nonatomic, readonly, retain) TTImageView* imageView2; - -@end diff --git a/src/Three20UI/Headers/TTTableMoreButton.h b/src/Three20UI/Headers/TTTableMoreButton.h deleted file mode 100644 index d99171456c..0000000000 --- a/src/Three20UI/Headers/TTTableMoreButton.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableSubtitleItem.h" - -@protocol TTModel; - -@interface TTTableMoreButton : TTTableSubtitleItem { - BOOL _isLoading; - id _model; -} - -@property (nonatomic) BOOL isLoading; -@property (nonatomic, retain) id model; - -@end diff --git a/src/Three20UI/Headers/TTTableMoreButtonCell.h b/src/Three20UI/Headers/TTTableMoreButtonCell.h deleted file mode 100644 index 109228cde9..0000000000 --- a/src/Three20UI/Headers/TTTableMoreButtonCell.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableSubtitleItemCell.h" - -@interface TTTableMoreButtonCell : TTTableSubtitleItemCell { - UIActivityIndicatorView* _activityIndicatorView; - BOOL _animating; -} - -@property (nonatomic, readonly, retain) UIActivityIndicatorView* activityIndicatorView; -@property (nonatomic) BOOL animating; - -@end diff --git a/src/Three20UI/Headers/TTTableRightCaptionItem.h b/src/Three20UI/Headers/TTTableRightCaptionItem.h deleted file mode 100644 index 168d9151de..0000000000 --- a/src/Three20UI/Headers/TTTableRightCaptionItem.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableCaptionItem.h" - -@interface TTTableRightCaptionItem : TTTableCaptionItem -@end diff --git a/src/Three20UI/Headers/TTTableRightCaptionItemCell.h b/src/Three20UI/Headers/TTTableRightCaptionItemCell.h deleted file mode 100644 index 98de6a4066..0000000000 --- a/src/Three20UI/Headers/TTTableRightCaptionItemCell.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItemCell.h" - -@interface TTTableRightCaptionItemCell : TTTableLinkedItemCell - -@property (nonatomic, readonly) UILabel* captionLabel; - -@end diff --git a/src/Three20UI/Headers/TTTableRightImageItem.h b/src/Three20UI/Headers/TTTableRightImageItem.h deleted file mode 100644 index 95064cabd4..0000000000 --- a/src/Three20UI/Headers/TTTableRightImageItem.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableImageItem.h" - -@interface TTTableRightImageItem : TTTableImageItem -@end diff --git a/src/Three20UI/Headers/TTTableStyledTextItem.h b/src/Three20UI/Headers/TTTableStyledTextItem.h deleted file mode 100644 index fab85cf3e2..0000000000 --- a/src/Three20UI/Headers/TTTableStyledTextItem.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItem.h" - -@class TTStyledText; - -@interface TTTableStyledTextItem : TTTableLinkedItem { - TTStyledText* _text; - UIEdgeInsets _margin; - UIEdgeInsets _padding; -} - -@property (nonatomic, retain) TTStyledText* text; -@property (nonatomic) UIEdgeInsets margin; -@property (nonatomic) UIEdgeInsets padding; - -+ (id)itemWithText:(TTStyledText*)text; -+ (id)itemWithText:(TTStyledText*)text URL:(NSString*)URL; -+ (id)itemWithText:(TTStyledText*)text URL:(NSString*)URL accessoryURL:(NSString*)accessoryURL; - -@end diff --git a/src/Three20UI/Headers/TTTableSubtextItem.h b/src/Three20UI/Headers/TTTableSubtextItem.h deleted file mode 100644 index 0d85ff6f63..0000000000 --- a/src/Three20UI/Headers/TTTableSubtextItem.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableCaptionItem.h" - -@interface TTTableSubtextItem : TTTableCaptionItem -@end diff --git a/src/Three20UI/Headers/TTTableSubtextItemCell.h b/src/Three20UI/Headers/TTTableSubtextItemCell.h deleted file mode 100644 index ed28497330..0000000000 --- a/src/Three20UI/Headers/TTTableSubtextItemCell.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItemCell.h" - -@interface TTTableSubtextItemCell : TTTableLinkedItemCell - -@property (nonatomic, readonly) UILabel* captionLabel; - -@end diff --git a/src/Three20UI/Headers/TTTableSubtitleItem.h b/src/Three20UI/Headers/TTTableSubtitleItem.h deleted file mode 100644 index 9a28cd9044..0000000000 --- a/src/Three20UI/Headers/TTTableSubtitleItem.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@interface TTTableSubtitleItem : TTTableTextItem { - NSString* _subtitle; - NSString* _imageURL; - UIImage* _defaultImage; -} - -@property (nonatomic, copy) NSString* subtitle; -@property (nonatomic, copy) NSString* imageURL; -@property (nonatomic, retain) UIImage* defaultImage; - -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle; -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle URL:(NSString*)URL; -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle URL:(NSString*)URL - accessoryURL:(NSString*)accessoryURL; -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle imageURL:(NSString*)imageURL - URL:(NSString*)URL; -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle imageURL:(NSString*)imageURL - defaultImage:(UIImage*)defaultImage URL:(NSString*)URL accessoryURL:(NSString*)accessoryURL; - -@end diff --git a/src/Three20UI/Headers/TTTableSubtitleItemCell.h b/src/Three20UI/Headers/TTTableSubtitleItemCell.h deleted file mode 100644 index e6988d722a..0000000000 --- a/src/Three20UI/Headers/TTTableSubtitleItemCell.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItemCell.h" - -@class TTImageView; - -@interface TTTableSubtitleItemCell : TTTableLinkedItemCell { - TTImageView* _imageView2; -} - -@property (nonatomic, readonly, retain) UILabel* subtitleLabel; -@property (nonatomic, readonly, retain) TTImageView* imageView2; - -@end diff --git a/src/Three20UI/Headers/TTTableSummaryItem.h b/src/Three20UI/Headers/TTTableSummaryItem.h deleted file mode 100644 index 1783f66396..0000000000 --- a/src/Three20UI/Headers/TTTableSummaryItem.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableTextItem.h" - -@interface TTTableSummaryItem : TTTableTextItem -@end diff --git a/src/Three20UI/Headers/TTTableTextItem.h b/src/Three20UI/Headers/TTTableTextItem.h deleted file mode 100644 index 6a893495e5..0000000000 --- a/src/Three20UI/Headers/TTTableTextItem.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItem.h" - -@interface TTTableTextItem : TTTableLinkedItem { - NSString* _text; -} - -@property (nonatomic, copy) NSString* text; - -+ (id)itemWithText:(NSString*)text; -+ (id)itemWithText:(NSString*)text URL:(NSString*)URL; -+ (id)itemWithText:(NSString*)text URL:(NSString*)URL accessoryURL:(NSString*)accessoryURL; - -+ (id)itemWithText:(NSString*)text delegate:(id)delegate selector:(SEL)selector; - -@end diff --git a/src/Three20UI/Headers/TTTableTextItemCell.h b/src/Three20UI/Headers/TTTableTextItemCell.h deleted file mode 100644 index ecdc92c6ce..0000000000 --- a/src/Three20UI/Headers/TTTableTextItemCell.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableLinkedItemCell.h" - -@interface TTTableTextItemCell : TTTableLinkedItemCell -@end diff --git a/src/Three20UI/Headers/TTTableView.h b/src/Three20UI/Headers/TTTableView.h deleted file mode 100644 index 0feebd2a1b..0000000000 --- a/src/Three20UI/Headers/TTTableView.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import -#import - -@class TTStyledTextLabel; - -/** - * TTTableView enhances UITableView to provide support for various Three20 services. - * - * If you are using TTStyledTextLabels in your table cells, you need to use TTTableView if - * you want links in your labels to be touchable. - */ -@interface TTTableView : UITableView { - TTStyledTextLabel* _highlightedLabel; - CGPoint _highlightStartPoint; - CGFloat _contentOrigin; - - BOOL _showShadows; - - CAGradientLayer* _originShadow; - CAGradientLayer* _topShadow; - CAGradientLayer* _bottomShadow; -} - -@property (nonatomic, retain) TTStyledTextLabel* highlightedLabel; -@property (nonatomic) CGFloat contentOrigin; -@property (nonatomic) BOOL showShadows; - -@end - -@protocol TTTableViewDelegate - -- (void)tableView:(UITableView*)tableView touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event; -- (void)tableView:(UITableView*)tableView touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event; - -@end diff --git a/src/Three20UI/Headers/TTTableViewCell.h b/src/Three20UI/Headers/TTTableViewCell.h deleted file mode 100644 index 373737b970..0000000000 --- a/src/Three20UI/Headers/TTTableViewCell.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -extern const CGFloat kTableCellSmallMargin; -extern const CGFloat kTableCellSpacing; -extern const CGFloat kTableCellMargin; -extern const CGFloat kTableCellHPadding; -extern const CGFloat kTableCellVPadding; -extern const NSInteger kTableMessageTextLineCount; - -/** - * The base class for table cells which are single-object based. - * - * TTTableViewDataSource initializes each cell that it creates by assigning it the object - * that the data source returned for the row. The responsibility for initializing the table cell - * is then shifted from the table data source to the setObject method on the cell itself, which - * this developer feels is a more appropriate delegation. The same goes for the cell height - * measurement, whose responsibility is transferred from the data source to the cell. - * - * Subclasses should implement the object getter and setter. The base implementations do - * nothing, allowing you to store the object yourself using the appropriate type. - */ -@interface TTTableViewCell : UITableViewCell - -@property (nonatomic, retain) id object; - -/** - * Measure the height of the row with the object that will be assigned to the cell. - */ -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object; - -@end diff --git a/src/Three20UI/Headers/TTTableViewController.h b/src/Three20UI/Headers/TTTableViewController.h deleted file mode 100644 index 0a0e819b8c..0000000000 --- a/src/Three20UI/Headers/TTTableViewController.h +++ /dev/null @@ -1,151 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTModelViewController.h" - -@protocol TTTableViewDataSource; -@class TTActivityLabel; - -@interface TTTableViewController : TTModelViewController { - UITableView* _tableView; - UIView* _tableBannerView; - UIView* _tableOverlayView; - UIView* _loadingView; - UIView* _errorView; - UIView* _emptyView; - - NSTimer* _bannerTimer; - - UIView* _menuView; - UITableViewCell* _menuCell; - - UITableViewStyle _tableViewStyle; - - UIInterfaceOrientation _lastInterfaceOrientation; - - BOOL _variableHeightRows; - BOOL _showTableShadows; - - id _dataSource; - id _tableDelegate; -} - -@property (nonatomic, retain) IBOutlet UITableView* tableView; - -/** - * A view that is displayed as a banner at the bottom of the table view. - */ -@property (nonatomic, retain) UIView* tableBannerView; - -/** - * A view that is displayed over the table view. - */ -@property (nonatomic, retain) UIView* tableOverlayView; - -@property (nonatomic, retain) UIView* loadingView; -@property (nonatomic, retain) UIView* errorView; -@property (nonatomic, retain) UIView* emptyView; - -@property (nonatomic, readonly) UIView* menuView; - -/** - * The data source used to populate the table view. - * - * Setting dataSource has the side effect of also setting model to the value of the - * dataSource's model property. - */ -@property (nonatomic, retain) id dataSource; - -/** - * The style of the table view. - */ -@property (nonatomic) UITableViewStyle tableViewStyle; - -/** - * Indicates if the table should support non-fixed row heights. - */ -@property (nonatomic) BOOL variableHeightRows; - -/** - * When enabled, draws gutter shadows above the first table item and below the last table item. - * - * Known issues: When there aren't enough cell items to fill the screen, the table view draws - * empty cells for the remaining space. This causes the bottom shadow to appear out of place. - */ -@property (nonatomic) BOOL showTableShadows; - -/** - * Initializes and returns a controller having the given style. - */ -- (id)initWithStyle:(UITableViewStyle)style; - -/** - * Creates an delegate for the table view. - * - * Subclasses can override this to provide their own table delegate implementation. - */ -- (id)createDelegate; - -/** - * Sets the view that is displayed at the bottom of the table view with an optional animation. - */ -- (void)setTableBannerView:(UIView*)tableBannerView animated:(BOOL)animated; - -/** - * Shows a menu over a table cell. - */ -- (void)showMenu:(UIView*)view forCell:(UITableViewCell*)cell animated:(BOOL)animated; - -/** - * Hides the currently visible table cell menu. - */ -- (void)hideMenu:(BOOL)animated; - -/** - * Tells the controller that the user selected an object in the table. - * - * By default, the object's URLValue will be opened in TTNavigator, if it has one. If you don't - * want this to be happen, be sure to override this method and be sure not to call super. - */ -- (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath; - -/** - * Asks if a URL from that user touched in the table should be opened. - */ -- (BOOL)shouldOpenURL:(NSString*)URL; - -/** - * Tells the controller that the user began dragging the table view. - */ -- (void)didBeginDragging; - -/** - * Tells the controller that the user stopped dragging the table view. - */ -- (void)didEndDragging; - -/** - * The rectangle where the overlay view should appear. - */ -- (CGRect)rectForOverlayView; - -/** - * The rectangle where the banner view should appear. - */ -- (CGRect)rectForBannerView; - -@end diff --git a/src/Three20UI/Headers/TTTableViewDataSource.h b/src/Three20UI/Headers/TTTableViewDataSource.h deleted file mode 100644 index 6b5b5f8c85..0000000000 --- a/src/Three20UI/Headers/TTTableViewDataSource.h +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -// Network -#import "Three20Network/TTModel.h" - -@protocol TTTableViewDataSource - -/** - * Optional method to return a model object to delegate the TTModel protocol to. - */ -@property (nonatomic, retain) id model; - -+ (NSArray*)lettersForSectionsWithSearch:(BOOL)search summary:(BOOL)summary; - -- (id)tableView:(UITableView*)tableView objectForRowAtIndexPath:(NSIndexPath*)indexPath; - -- (Class)tableView:(UITableView*)tableView cellClassForObject:(id)object; - -- (NSString*)tableView:(UITableView*)tableView labelForObject:(id)object; - -- (NSIndexPath*)tableView:(UITableView*)tableView indexPathForObject:(id)object; - -- (void)tableView:(UITableView*)tableView cell:(UITableViewCell*)cell - willAppearAtIndexPath:(NSIndexPath*)indexPath; - -/** - * Informs the data source that its model loaded. - * - * That would be a good time to prepare the freshly loaded data for use in the table view. - */ -- (void)tableViewDidLoadModel:(UITableView*)tableView; - -- (NSString*)titleForLoading:(BOOL)reloading; - -- (UIImage*)imageForEmpty; - -- (NSString*)titleForEmpty; - -- (NSString*)subtitleForEmpty; - -- (UIImage*)imageForError:(NSError*)error; - -- (NSString*)titleForError:(NSError*)error; - -- (NSString*)subtitleForError:(NSError*)error; - -@optional - -- (NSIndexPath*)tableView:(UITableView*)tableView willUpdateObject:(id)object - atIndexPath:(NSIndexPath*)indexPath; - -- (NSIndexPath*)tableView:(UITableView*)tableView willInsertObject:(id)object - atIndexPath:(NSIndexPath*)indexPath; - -- (NSIndexPath*)tableView:(UITableView*)tableView willRemoveObject:(id)object - atIndexPath:(NSIndexPath*)indexPath; - -- (void)search:(NSString*)text; - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -@interface TTTableViewDataSource : NSObject { - id _model; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * A datasource that is eternally loading. Useful when you are in between data sources and - * want to show the impression of loading until your actual data source is available. - */ -@interface TTTableViewInterstitialDataSource : TTTableViewDataSource -@end diff --git a/src/Three20UI/Headers/TTTableViewDelegate.h b/src/Three20UI/Headers/TTTableViewDelegate.h deleted file mode 100644 index ede17f014e..0000000000 --- a/src/Three20UI/Headers/TTTableViewDelegate.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTTableViewController; - -/** - * A default table view delegate implementation. - * - * This implementation takes care of measuring rows for you, opening URLs when the user - * selects a cell, and suspending image loading to increase performance while the user is - * scrolling the table. TTTableViewController automatically assigns an instance of this - * delegate class to your table, but you can override the createDelegate method there to provide - * a delegate implementation of your own. - * - * If you would like to change the background color of the section headers, specify the - * tableHeaderTintColor property in your global style sheet. - * - * This is also where the table view menu is hidden if the user starts scrolling. - * - * TODO(jverkoey 04/13/2010): Rename this object because it's not a protocol, and therefor - * shouldn't be affixed the "Delegate" title. - */ -@interface TTTableViewDelegate : NSObject { - TTTableViewController* _controller; - NSMutableDictionary* _headers; -} - -- (id)initWithController:(TTTableViewController*)controller; - -@property (nonatomic, readonly) TTTableViewController* controller; - -@end diff --git a/src/Three20UI/Headers/TTTableViewDragRefreshDelegate.h b/src/Three20UI/Headers/TTTableViewDragRefreshDelegate.h deleted file mode 100644 index 2bc18a2d72..0000000000 --- a/src/Three20UI/Headers/TTTableViewDragRefreshDelegate.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// Created by Devin Doty on 10/14/09. -// http://github.com/enormego/EGOTableViewPullRefresh -// Copyright 2009 enormego. All rights reserved. -// -// Modifications copyright 2010 Facebook. -// -// 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. -// - -// UI -#import "Three20UI/TTTableViewVarHeightDelegate.h" - -@class TTTableHeaderDragRefreshView; -@protocol TTModel; - -/** - * Pulled from the uprise78/three20-P31 fork with consent of uprise78. - */ -@interface TTTableViewDragRefreshDelegate : TTTableViewVarHeightDelegate { - TTTableHeaderDragRefreshView* _headerView; - id _model; -} - -@property (nonatomic, retain) TTTableHeaderDragRefreshView* headerView; - -@end diff --git a/src/Three20UI/Headers/TTTableViewGroupedVarHeightDelegate.h b/src/Three20UI/Headers/TTTableViewGroupedVarHeightDelegate.h deleted file mode 100644 index 01dc01e795..0000000000 --- a/src/Three20UI/Headers/TTTableViewGroupedVarHeightDelegate.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewVarHeightDelegate.h" - -/** - * A table view delegate for grouped table views that provides the header size. - */ -@interface TTTableViewGroupedVarHeightDelegate : TTTableViewVarHeightDelegate { - -} - -@end diff --git a/src/Three20UI/Headers/TTTableViewItem.h b/src/Three20UI/Headers/TTTableViewItem.h deleted file mode 100644 index d780480906..0000000000 --- a/src/Three20UI/Headers/TTTableViewItem.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableItem.h" - -@interface TTTableViewItem : TTTableItem { - NSString* _caption; - UIView* _view; -} - -@property (nonatomic, copy) NSString* caption; -@property (nonatomic, retain) UIView* view; - -+ (id)itemWithCaption:(NSString*)caption view:(UIView*)view; - -@end diff --git a/src/Three20UI/Headers/TTTableViewNetworkEnabledDelegate.h b/src/Three20UI/Headers/TTTableViewNetworkEnabledDelegate.h deleted file mode 100644 index c1c064134d..0000000000 --- a/src/Three20UI/Headers/TTTableViewNetworkEnabledDelegate.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewVarHeightDelegate.h" - -@class TTTableHeaderDragRefreshView, TTTableFooterInfiniteScrollView; -@protocol TTModel, TTTableNetworkEnabledTableViewController; - -@interface TTTableViewNetworkEnabledDelegate : TTTableViewVarHeightDelegate { - TTTableHeaderDragRefreshView* _headerView; - TTTableFooterInfiniteScrollView* _footerView; - id _model; - BOOL _dragRefreshEnabled; - BOOL _infiniteScrollEnabled; -} - -@property (nonatomic, retain) TTTableHeaderDragRefreshView* headerView; -@property (nonatomic, retain) TTTableFooterInfiniteScrollView* footerView; -@property (readonly) BOOL dragRefreshEnabled; -@property (readonly) BOOL infiniteScrollEnabled; - -- (id)initWithController:(TTTableViewController*)controller - withDragRefresh:(BOOL)enableDragRefresh - withInfiniteScroll:(BOOL)enableInfiniteScroll; - -@end - -@protocol TTTableNetworkEnabledTableViewController -@optional -- (BOOL)shouldLoadAtScrollRatio:(CGFloat)scrollRatio; -@end diff --git a/src/Three20UI/Headers/TTTableViewPlainDelegate.h b/src/Three20UI/Headers/TTTableViewPlainDelegate.h deleted file mode 100644 index bcb410bea2..0000000000 --- a/src/Three20UI/Headers/TTTableViewPlainDelegate.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewDelegate.h" - -/** - * The most basic delegate. No size calculations are made. - */ -@interface TTTableViewPlainDelegate : TTTableViewDelegate { - -} - -@end diff --git a/src/Three20UI/Headers/TTTableViewPlainVarHeightDelegate.h b/src/Three20UI/Headers/TTTableViewPlainVarHeightDelegate.h deleted file mode 100644 index 4eee064e31..0000000000 --- a/src/Three20UI/Headers/TTTableViewPlainVarHeightDelegate.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewVarHeightDelegate.h" - -@interface TTTableViewPlainVarHeightDelegate : TTTableViewVarHeightDelegate { - -} - -@end diff --git a/src/Three20UI/Headers/TTTableViewVarHeightDelegate.h b/src/Three20UI/Headers/TTTableViewVarHeightDelegate.h deleted file mode 100644 index b5e815b18e..0000000000 --- a/src/Three20UI/Headers/TTTableViewVarHeightDelegate.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewDelegate.h" - -/** - * A table view delegate that queries the cell items for their height. - */ -@interface TTTableViewVarHeightDelegate : TTTableViewDelegate { - -} - -@end diff --git a/src/Three20UI/Headers/TTTextBarController.h b/src/Three20UI/Headers/TTTextBarController.h deleted file mode 100644 index fd667f5fe3..0000000000 --- a/src/Three20UI/Headers/TTTextBarController.h +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTPopupViewController.h" -#import "Three20UI/TTTextEditorDelegate.h" - -@protocol TTTextBarDelegate; -@class TTButton; -@class TTView; - -@interface TTTextBarController : TTPopupViewController { -@protected - id _result; - NSString* _defaultText; - TTView* _textBar; - TTTextEditor* _textEditor; - TTButton* _postButton; - UIView* _footerBar; - CGFloat _originTop; - UIBarButtonItem* _previousRightBarButtonItem; - - id _delegate; -} - -@property (nonatomic, readonly) TTTextEditor* textEditor; -@property (nonatomic, readonly) TTButton* postButton; -@property (nonatomic, retain) UIView* footerBar; - -@property (nonatomic, assign) id delegate; - -/** - * Posts the text to delegates, who have to actually do something with it. - */ -- (void)post; - -/** - * Cancels the controller, but confirms with the user if they have entered text. - */ -- (void)cancel; - -/** - * Dismisses the controller with a resulting that is sent to the delegate. - */ -- (void)dismissWithResult:(id)result animated:(BOOL)animated; - -/** - * Notifies the user of an error and resets the editor to normal. - */ -- (void)failWithError:(NSError*)error; - -/** - * The users has entered text and posted it. - * - * Subclasses can implement this to handle the text before it is sent to the delegate. The - * default returns NO. - * - * @return YES if the controller should be dismissed immediately. - */ -- (BOOL)willPostText:(NSString*)text; - -- (NSString*)titleForActivity; - -- (NSString*)titleForError:(NSError*)error; - - -@end diff --git a/src/Three20UI/Headers/TTTextBarDelegate.h b/src/Three20UI/Headers/TTTextBarDelegate.h deleted file mode 100644 index 35b31ed74e..0000000000 --- a/src/Three20UI/Headers/TTTextBarDelegate.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTTextBarController; - -@protocol TTTextBarDelegate -@optional - -- (void)textBarDidBeginEditing:(TTTextBarController*)textBar; - -- (void)textBarDidEndEditing:(TTTextBarController*)textBar; - -/** - * The user has posted text and an animation is about to show the text return to its origin. - * - * @return whether to dismiss the controller or wait for the user to call dismiss. - */ -- (BOOL)textBar:(TTTextBarController*)textBar willPostText:(NSString*)text; - -/** - * The text has been posted. - */ -- (void)textBar: (TTTextBarController*)textBar - didPostText: (NSString*)text - withResult: (id)result; - -/** - * The controller was cancelled before posting. - */ -- (void)textBarDidCancel:(TTTextBarController*)textBar; - -@end diff --git a/src/Three20UI/Headers/TTTextEditor.h b/src/Three20UI/Headers/TTTextEditor.h deleted file mode 100644 index c55ee9d1c3..0000000000 --- a/src/Three20UI/Headers/TTTextEditor.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTView.h" - -@protocol TTTextEditorDelegate; -@class TTTextView; -@class TTTextEditorInternal; - -@interface TTTextEditor : TTView { - TTTextEditorInternal* _internal; - UITextField* _textField; - TTTextView* _textView; - - NSInteger _minNumberOfLines; - NSInteger _maxNumberOfLines; - - BOOL _editing; - BOOL _overflowed; - BOOL _autoresizesToText; - BOOL _showsExtraLine; - - id _delegate; -} - -@property (nonatomic, copy) NSString* text; -@property (nonatomic, copy) NSString* placeholder; -@property (nonatomic, retain) UIFont* font; -@property (nonatomic, retain) UIColor* textColor; - -@property (nonatomic) NSInteger minNumberOfLines; -@property (nonatomic) NSInteger maxNumberOfLines; - -@property (nonatomic, readonly) BOOL editing; -@property (nonatomic) BOOL autoresizesToText; -@property (nonatomic) BOOL showsExtraLine; - -@property (nonatomic, assign) id delegate; - -- (void)scrollContainerToCursor:(UIScrollView*)scrollView; - -@end diff --git a/src/Three20UI/Headers/TTTextEditorDelegate.h b/src/Three20UI/Headers/TTTextEditorDelegate.h deleted file mode 100644 index 3eec54ced3..0000000000 --- a/src/Three20UI/Headers/TTTextEditorDelegate.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTTextEditor; - -@protocol TTTextEditorDelegate -@optional - -- (BOOL)textEditorShouldBeginEditing:(TTTextEditor*)textEditor; -- (BOOL)textEditorShouldEndEditing:(TTTextEditor*)textEditor; - -- (void)textEditorDidBeginEditing:(TTTextEditor*)textEditor; -- (void)textEditorDidEndEditing:(TTTextEditor*)textEditor; - -- (BOOL) textEditor: (TTTextEditor*)textEditor - shouldChangeTextInRange: (NSRange)range - replacementText: (NSString*)replacementText; - -- (void)textEditorDidChange:(TTTextEditor*)textEditor; - -- (BOOL)textEditor:(TTTextEditor*)textEditor shouldResizeBy:(CGFloat)height; -- (BOOL)textEditorShouldReturn:(TTTextEditor*)textEditor; - -@end diff --git a/src/Three20UI/Headers/TTTextEditorInternal.h b/src/Three20UI/Headers/TTTextEditorInternal.h deleted file mode 100644 index 9e90cc828d..0000000000 --- a/src/Three20UI/Headers/TTTextEditorInternal.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTTextEditor; -@protocol TTTextEditorDelegate; - -@interface TTTextEditorInternal : NSObject { - TTTextEditor* _textEditor; - BOOL _ignoreBeginAndEnd; - - id _delegate; -} - -@property (nonatomic) BOOL ignoreBeginAndEnd; - -@property (nonatomic, assign) id delegate; - -- (id)initWithTextEditor:(TTTextEditor*)textEditor; - -@end diff --git a/src/Three20UI/Headers/TTTextView.h b/src/Three20UI/Headers/TTTextView.h deleted file mode 100644 index 553a7b89f0..0000000000 --- a/src/Three20UI/Headers/TTTextView.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface TTTextView : UITextView { - BOOL _autoresizesToText; - BOOL _overflowed; -} - -@property (nonatomic) BOOL autoresizesToText; -@property (nonatomic) BOOL overflowed; - -@end diff --git a/src/Three20UI/Headers/TTThumbView.h b/src/Three20UI/Headers/TTThumbView.h deleted file mode 100644 index 4da39f01fb..0000000000 --- a/src/Three20UI/Headers/TTThumbView.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTButton.h" - -@interface TTThumbView : TTButton - -@property (nonatomic, copy) NSString* thumbURL; - -@end diff --git a/src/Three20UI/Headers/TTThumbsDataSource.h b/src/Three20UI/Headers/TTThumbsDataSource.h deleted file mode 100644 index b26730121c..0000000000 --- a/src/Three20UI/Headers/TTThumbsDataSource.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewDataSource.h" - -@protocol TTPhotoSource; -@protocol TTThumbsTableViewCellDelegate; - -@interface TTThumbsDataSource : TTTableViewDataSource { - id _photoSource; - id _delegate; -} - -@property (nonatomic, retain) id photoSource; -@property (nonatomic, assign) id delegate; - -- (id)initWithPhotoSource: (id)photoSource - delegate: (id)delegate; - -@end diff --git a/src/Three20UI/Headers/TTThumbsTableViewCell.h b/src/Three20UI/Headers/TTThumbsTableViewCell.h deleted file mode 100644 index 86fac4574d..0000000000 --- a/src/Three20UI/Headers/TTThumbsTableViewCell.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewCell.h" - -@protocol TTPhoto; -@protocol TTThumbsTableViewCellDelegate; -@class TTThumbView; - -@interface TTThumbsTableViewCell : TTTableViewCell { - id _photo; - - NSMutableArray* _thumbViews; - - CGFloat _thumbSize; - CGPoint _thumbOrigin; - NSInteger _columnCount; - - id _delegate; -} - -@property (nonatomic, retain) id photo; -@property (nonatomic) CGFloat thumbSize; -@property (nonatomic) CGPoint thumbOrigin; -@property (nonatomic) NSInteger columnCount; - -@property (nonatomic, assign) id delegate; - -- (void)suspendLoading:(BOOL)suspended; - -@end diff --git a/src/Three20UI/Headers/TTThumbsTableViewCellDelegate.h b/src/Three20UI/Headers/TTThumbsTableViewCellDelegate.h deleted file mode 100644 index 0413f3e956..0000000000 --- a/src/Three20UI/Headers/TTThumbsTableViewCellDelegate.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -@protocol TTPhoto; -@class TTThumbsTableViewCell; - -@protocol TTThumbsTableViewCellDelegate -@required - -- (void)thumbsTableViewCell:(TTThumbsTableViewCell*)cell didSelectPhoto:(id)photo; - -@end diff --git a/src/Three20UI/Headers/TTThumbsViewController.h b/src/Three20UI/Headers/TTThumbsViewController.h deleted file mode 100644 index 10bbdbe2ff..0000000000 --- a/src/Three20UI/Headers/TTThumbsViewController.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTTableViewController.h" -#import "Three20UI/TTThumbsTableViewCellDelegate.h" - -@protocol TTThumbsViewControllerDelegate; -@protocol TTPhotoSource; -@protocol TTTableViewDataSource; -@class TTPhotoViewController; - -@interface TTThumbsViewController : TTTableViewController { - id _photoSource; - id _delegate; -} - -@property (nonatomic, retain) id photoSource; -@property (nonatomic, assign) id delegate; - -- (id)initWithDelegate:(id)delegate; -- (id)initWithQuery:(NSDictionary*)query; - -- (TTPhotoViewController*)createPhotoViewController; -- (id)createDataSource; - -@end diff --git a/src/Three20UI/Headers/TTThumbsViewControllerDelegate.h b/src/Three20UI/Headers/TTThumbsViewControllerDelegate.h deleted file mode 100644 index 5f253bc7a5..0000000000 --- a/src/Three20UI/Headers/TTThumbsViewControllerDelegate.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@protocol TTPhoto; -@class TTThumbsViewController; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@protocol TTThumbsViewControllerDelegate - -- (void)thumbsViewController: (TTThumbsViewController*)controller - didSelectPhoto: (id)photo; - -@optional - -- (BOOL)thumbsViewController: (TTThumbsViewController*)controller - shouldNavigateToPhoto: (id)photo; - -@end diff --git a/src/Three20UI/Headers/TTUnclippedView.h b/src/Three20UI/Headers/TTUnclippedView.h deleted file mode 100644 index 826c20bbd9..0000000000 --- a/src/Three20UI/Headers/TTUnclippedView.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * A utility view that will cause all of its ancestors to stop clipping, ensuring that - * nothing obscures any of part of this view and its contents. - */ -@interface TTUnclippedView : UIView -@end diff --git a/src/Three20UI/Headers/TTView.h b/src/Three20UI/Headers/TTView.h deleted file mode 100644 index 203a879f60..0000000000 --- a/src/Three20UI/Headers/TTView.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Style -#import "Three20Style/TTStyleDelegate.h" - -@class TTStyle; -@class TTLayout; - -/** - * A UIView with an attached style and layout that are used to render and - * layout the view, respectively. Style and layout are optional. - */ -@interface TTView : UIView { - TTStyle* _style; - TTLayout* _layout; -} - -@property (nonatomic, retain) TTStyle* style; -@property (nonatomic, retain) TTLayout* layout; - -- (void)drawContent:(CGRect)rect; - -@end diff --git a/src/Three20UI/Headers/TTViewController.h b/src/Three20UI/Headers/TTViewController.h deleted file mode 100644 index 19c4004d4b..0000000000 --- a/src/Three20UI/Headers/TTViewController.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTNavigatorViewController.h" - -@class TTTableViewController; -@class TTSearchDisplayController; - -/** - * A view controller with some useful additions. - */ -@interface TTViewController : TTNavigatorViewController { -@protected - TTSearchDisplayController* _searchController; -} - -/** - * A view controller used to display the contents of the search display controller. - * - * If you assign a view controller to this property, it will automatically create a search - * display controller which you can access through this view controller's searchDisplaController - * property. You can then take the searchBar from that controller and add it to your views. The - * search bar will then search the data source of the view controller that you assigned here. - */ -@property (nonatomic, retain) TTTableViewController* searchViewController; - -/** - * Forcefully initiates garbage collection. You may call this in your didReceiveMemoryWarning - * message if you are worried about garbage collection memory consumption. - * - * See Articles/UI/GarbageCollection.mdown for a more detailed discussion. - */ -+ (void)doGarbageCollection; - -@end diff --git a/src/Three20UI/Headers/TTWebController.h b/src/Three20UI/Headers/TTWebController.h deleted file mode 100644 index eab84c9a27..0000000000 --- a/src/Three20UI/Headers/TTWebController.h +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/TTModelViewController.h" - -@protocol TTWebControllerDelegate; - -@interface TTWebController : TTModelViewController { -@protected - UIWebView* _webView; - - UIToolbar* _toolbar; - - UIView* _headerView; - - UIBarButtonItem* _backButton; - UIBarButtonItem* _forwardButton; - UIBarButtonItem* _refreshButton; - UIBarButtonItem* _stopButton; - UIBarButtonItem* _actionButton; - UIBarButtonItem* _activityItem; - - NSURL* _loadingURL; - - UIActionSheet* _actionSheet; - - id _delegate; -} - -/** - * The current web view URL. If the web view is currently loading a URL, then the loading URL is - * returned instead. - */ -@property (nonatomic, readonly) NSURL* URL; - -/** - * A view that is inserted at the top of the web view, within the scroller. - */ -@property (nonatomic, retain) UIView* headerView; - -/** - * The web controller delegate, currently does nothing. - */ -@property (nonatomic, assign) id delegate; - -/** - * Navigate to the given URL. - */ -- (void)openURL:(NSURL*)URL; - -/** - * Load the given request using UIWebView's loadRequest:. - * - * @param request A URL request identifying the location of the content to load. - */ -- (void)openRequest:(NSURLRequest*)request; - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@protocol TTWebControllerDelegate -// XXXjoe Need to make this similar to UIWebViewDelegate -@end diff --git a/src/Three20UI/Headers/TTYouTubeView.h b/src/Three20UI/Headers/TTYouTubeView.h deleted file mode 100644 index d39d892eab..0000000000 --- a/src/Three20UI/Headers/TTYouTubeView.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * A web view that displays a YouTube video. - */ -@interface TTYouTubeView : UIWebView { - NSString* _urlPath; -} - -@property (nonatomic, copy) NSString* urlPath; - -/** - * Initialize with a YouTube video URL. - * For example: http://www.youtube.com/watch?v=g8thp78oXsg - */ -- (id)initWithURLPath:(NSString*)urlPath; - -@end diff --git a/src/Three20UI/Headers/Three20UI+Additions.h b/src/Three20UI/Headers/Three20UI+Additions.h deleted file mode 100644 index ca4eb37d95..0000000000 --- a/src/Three20UI/Headers/Three20UI+Additions.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UI/Three20UI.h" - -// Additions -#import "Three20UI/UIViewAdditions.h" -#import "Three20UI/UINavigationControllerAdditions.h" -#import "Three20UI/UINavigationControllerAdditions.h" -#import "Three20UI/UITabBarControllerAdditions.h" -#import "Three20UI/UITableViewAdditions.h" -#import "Three20UI/UIWebViewAdditions.h" -#import "Three20UI/UIToolbarAdditions.h" -#import "Three20UI/UINSStringAdditions.h" -#import "Three20UI/UINSObjectAdditions.h" diff --git a/src/Three20UI/Headers/Three20UI.h b/src/Three20UI/Headers/Three20UI.h deleted file mode 100644 index 161d57c45c..0000000000 --- a/src/Three20UI/Headers/Three20UI.h +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI Controllers -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTViewController.h" -#import "Three20UI/TTSplitViewController.h" -#import "Three20UI/TTNavigationController.h" -#import "Three20UI/TTExtensionsController.h" -#import "Three20UI/TTWebController.h" -#import "Three20UI/TTMessageController.h" -#import "Three20UI/TTMessageControllerDelegate.h" -#import "Three20UI/TTMessageField.h" -#import "Three20UI/TTMessageRecipientField.h" -#import "Three20UI/TTMessageTextField.h" -#import "Three20UI/TTMessageSubjectField.h" -#import "Three20UI/TTAlertViewController.h" -#import "Three20UI/TTAlertViewControllerDelegate.h" -#import "Three20UI/TTActionSheetController.h" -#import "Three20UI/TTActionSheetControllerDelegate.h" -#import "Three20UI/TTPostController.h" -#import "Three20UI/TTPostControllerDelegate.h" -#import "Three20UI/TTTextBarController.h" -#import "Three20UI/TTTextBarDelegate.h" -#import "Three20Network/TTURLCache.h" - -// UI Views -#import "Three20UI/TTView.h" -#import "Three20UI/TTImageView.h" -#import "Three20UI/TTImageViewDelegate.h" -#import "Three20UI/TTYouTubeView.h" -#import "Three20UI/TTScrollView.h" -#import "Three20UI/TTScrollViewDelegate.h" -#import "Three20UI/TTScrollViewDataSource.h" - -#import "Three20UI/TTLauncherView.h" -#import "Three20UI/TTLauncherViewDelegate.h" -#import "Three20UI/TTLauncherItem.h" - -#import "Three20UI/TTLabel.h" -#import "Three20UI/TTStyledTextLabel.h" -#import "Three20UI/TTActivityLabel.h" -#import "Three20UI/TTSearchlightLabel.h" - -#import "Three20UI/TTButton.h" -#import "Three20UI/TTLink.h" -#import "Three20UI/TTTabBar.h" -#import "Three20UI/TTTabDelegate.h" -#import "Three20UI/TTTabStrip.h" -#import "Three20UI/TTTabGrid.h" -#import "Three20UI/TTTab.h" -#import "Three20UI/TTTabItem.h" -#import "Three20UI/TTButtonBar.h" -#import "Three20UI/TTPageControl.h" - -#import "Three20UI/TTTextEditor.h" -#import "Three20UI/TTTextEditorDelegate.h" -#import "Three20UI/TTSearchTextField.h" -#import "Three20UI/TTSearchTextFieldDelegate.h" -#import "Three20UI/TTPickerTextField.h" -#import "Three20UI/TTPickerTextFieldDelegate.h" -#import "Three20UI/TTSearchBar.h" - -#import "Three20UI/TTTableViewController.h" -#import "Three20UI/TTSearchDisplayController.h" -#import "Three20UI/TTTableView.h" -#import "Three20UI/TTTableViewDelegate.h" -#import "Three20UI/TTTableViewVarHeightDelegate.h" -#import "Three20UI/TTTableViewGroupedVarHeightDelegate.h" -#import "Three20UI/TTTableViewPlainDelegate.h" -#import "Three20UI/TTTableViewPlainVarHeightDelegate.h" -#import "Three20UI/TTTableViewDragRefreshDelegate.h" -#import "Three20UI/TTTableViewNetworkEnabledDelegate.h" - -#import "Three20UI/TTListDataSource.h" -#import "Three20UI/TTSectionedDataSource.h" -#import "Three20UI/TTTableHeaderView.h" -#import "Three20UI/TTTableFooterInfiniteScrollView.h" -#import "THree20UI/TTTableHeaderDragRefreshView.h" -#import "Three20UI/TTTableViewCell.h" - -// Table Items -#import "Three20UI/TTTableItem.h" -#import "Three20UI/TTTableLinkedItem.h" -#import "Three20UI/TTTableTextItem.h" -#import "Three20UI/TTTableCaptionItem.h" -#import "Three20UI/TTTableRightCaptionItem.h" -#import "Three20UI/TTTableSubtextItem.h" -#import "Three20UI/TTTableSubtitleItem.h" -#import "Three20UI/TTTableMessageItem.h" -#import "Three20UI/TTTableLongTextItem.h" -#import "Three20UI/TTTableGrayTextItem.h" -#import "Three20UI/TTTableSummaryItem.h" -#import "Three20UI/TTTableLink.h" -#import "Three20UI/TTTableButton.h" -#import "Three20UI/TTTableMoreButton.h" -#import "Three20UI/TTTableImageItem.h" -#import "Three20UI/TTTableRightImageItem.h" -#import "Three20UI/TTTableActivityItem.h" -#import "Three20UI/TTTableStyledTextItem.h" -#import "Three20UI/TTTableControlItem.h" -#import "Three20UI/TTTableViewItem.h" - -// Table Item Cells -#import "Three20UI/TTTableLinkedItemCell.h" -#import "Three20UI/TTTableTextItemCell.h" -#import "Three20UI/TTTableCaptionItemCell.h" -#import "Three20UI/TTTableSubtextItemCell.h" -#import "Three20UI/TTTableRightCaptionItemCell.h" -#import "Three20UI/TTTableSubtitleItemCell.h" -#import "Three20UI/TTTableMessageItemCell.h" -#import "Three20UI/TTTableMoreButtonCell.h" -#import "Three20UI/TTTableImageItemCell.h" -#import "Three20UI/TTStyledTextTableItemCell.h" -#import "Three20UI/TTStyledTextTableCell.h" -#import "Three20UI/TTTableActivityItemCell.h" -#import "Three20UI/TTTableControlCell.h" -#import "Three20UI/TTTableFlushViewCell.h" - -#import "Three20UI/TTErrorView.h" - -#import "Three20UI/TTPhotoVersion.h" -#import "Three20UI/TTPhotoSource.h" -#import "Three20UI/TTPhoto.h" -#import "Three20UI/TTPhotoViewController.h" -#import "Three20UI/TTPhotoView.h" -#import "Three20UI/TTThumbsViewController.h" -#import "Three20UI/TTThumbsViewControllerDelegate.h" -#import "Three20UI/TTThumbsDataSource.h" -#import "Three20UI/TTThumbsTableViewCell.h" -#import "Three20UI/TTThumbsTableViewCellDelegate.h" -#import "Three20UI/TTThumbView.h" - -#import "Three20UI/TTRecursiveProgress.h" diff --git a/src/Three20UI/Headers/Three20UI_Prefix.pch b/src/Three20UI/Headers/Three20UI_Prefix.pch deleted file mode 100644 index 8b42a1811c..0000000000 --- a/src/Three20UI/Headers/Three20UI_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'Three20' target in the 'Three20' project -// - -#ifdef __OBJC__ - #import - #import -#endif - diff --git a/src/Three20UI/Headers/UINSObjectAdditions.h b/src/Three20UI/Headers/UINSObjectAdditions.h deleted file mode 100644 index 43ab7170d8..0000000000 --- a/src/Three20UI/Headers/UINSObjectAdditions.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface NSObject (TTCategory) - -/** - * Converts the object to a URL using TTURLMap. - */ -@property (nonatomic, readonly) NSString* URLValue; - -/** - * Converts the object to a specially-named URL using TTURLMap. - */ -- (NSString*)URLValueWithName:(NSString*)name; - -@end diff --git a/src/Three20UI/Headers/UINSStringAdditions.h b/src/Three20UI/Headers/UINSStringAdditions.h deleted file mode 100644 index 36428cb604..0000000000 --- a/src/Three20UI/Headers/UINSStringAdditions.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -#import -#import - -@interface NSString (TTCategory) - -/** - * Converts the string to an object using TTURLMap. - */ -- (id)objectValue; - -/** - * Opens a URL with the string using TTURLMap. - */ -- (void)openURL; -- (void)openURLFromButton:(UIView*)button; - -@end diff --git a/src/Three20UI/Headers/UINavigationControllerAdditions.h b/src/Three20UI/Headers/UINavigationControllerAdditions.h deleted file mode 100644 index 16c67803df..0000000000 --- a/src/Three20UI/Headers/UINavigationControllerAdditions.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UINavigationController (TTCategory) - -@end diff --git a/src/Three20UI/Headers/UITabBarControllerAdditions.h b/src/Three20UI/Headers/UITabBarControllerAdditions.h deleted file mode 100644 index b6e77871ac..0000000000 --- a/src/Three20UI/Headers/UITabBarControllerAdditions.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UITabBarController (TTCategory) - -- (void)setTabURLs:(NSArray*)URLs; - -@end diff --git a/src/Three20UI/Headers/UITableViewAdditions.h b/src/Three20UI/Headers/UITableViewAdditions.h deleted file mode 100644 index fdc47b6030..0000000000 --- a/src/Three20UI/Headers/UITableViewAdditions.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UITableView (TTCategory) - -/** - * The view that contains the "index" along the right side of the table. - */ -@property (nonatomic, readonly) UIView* indexView; - -/** - * Returns the margin used to inset table cells. - * - * Grouped tables have a margin but plain tables don't. This is useful in table cell - * layout calculations where you don't want to hard-code the table style. - */ -@property (nonatomic, readonly) CGFloat tableCellMargin; - -- (void)scrollToTop:(BOOL)animated; - -- (void)scrollToBottom:(BOOL)animated; - -- (void)scrollToFirstRow:(BOOL)animated; - -- (void)scrollToLastRow:(BOOL)animated; - -- (void)scrollFirstResponderIntoView; - -- (void)touchRowAtIndexPath:(NSIndexPath*)indexPath animated:(BOOL)animated; - -@end diff --git a/src/Three20UI/Headers/UIToolbarAdditions.h b/src/Three20UI/Headers/UIToolbarAdditions.h deleted file mode 100644 index b717f9fcef..0000000000 --- a/src/Three20UI/Headers/UIToolbarAdditions.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIToolbar (TTCategory) - -- (UIBarButtonItem*)itemWithTag:(NSInteger)tag; - -- (void)replaceItemWithTag:(NSInteger)tag withItem:(UIBarButtonItem*)item; - -@end diff --git a/src/Three20UI/Headers/UIViewAdditions.h b/src/Three20UI/Headers/UIViewAdditions.h deleted file mode 100644 index 9388fff6b4..0000000000 --- a/src/Three20UI/Headers/UIViewAdditions.h +++ /dev/null @@ -1,175 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIView (TTCategory) - -/** - * Shortcut for frame.origin.x. - * - * Sets frame.origin.x = left - */ -@property (nonatomic) CGFloat left; - -/** - * Shortcut for frame.origin.y - * - * Sets frame.origin.y = top - */ -@property (nonatomic) CGFloat top; - -/** - * Shortcut for frame.origin.x + frame.size.width - * - * Sets frame.origin.x = right - frame.size.width - */ -@property (nonatomic) CGFloat right; - -/** - * Shortcut for frame.origin.y + frame.size.height - * - * Sets frame.origin.y = bottom - frame.size.height - */ -@property (nonatomic) CGFloat bottom; - -/** - * Shortcut for frame.size.width - * - * Sets frame.size.width = width - */ -@property (nonatomic) CGFloat width; - -/** - * Shortcut for frame.size.height - * - * Sets frame.size.height = height - */ -@property (nonatomic) CGFloat height; - -/** - * Shortcut for center.x - * - * Sets center.x = centerX - */ -@property (nonatomic) CGFloat centerX; - -/** - * Shortcut for center.y - * - * Sets center.y = centerY - */ -@property (nonatomic) CGFloat centerY; - -/** - * Return the x coordinate on the screen. - */ -@property (nonatomic, readonly) CGFloat ttScreenX; - -/** - * Return the y coordinate on the screen. - */ -@property (nonatomic, readonly) CGFloat ttScreenY; - -/** - * Return the x coordinate on the screen, taking into account scroll views. - */ -@property (nonatomic, readonly) CGFloat screenViewX; - -/** - * Return the y coordinate on the screen, taking into account scroll views. - */ -@property (nonatomic, readonly) CGFloat screenViewY; - -/** - * Return the view frame on the screen, taking into account scroll views. - */ -@property (nonatomic, readonly) CGRect screenFrame; - -/** - * Shortcut for frame.origin - */ -@property (nonatomic) CGPoint origin; - -/** - * Shortcut for frame.size - */ -@property (nonatomic) CGSize size; - -/** - * Return the width in portrait or the height in landscape. - */ -@property (nonatomic, readonly) CGFloat orientationWidth; - -/** - * Return the height in portrait or the width in landscape. - */ -@property (nonatomic, readonly) CGFloat orientationHeight; - -/** - * Finds the first descendant view (including this view) that is a member of a particular class. - */ -- (UIView*)descendantOrSelfWithClass:(Class)cls; - -/** - * Finds the first ancestor view (including this view) that is a member of a particular class. - */ -- (UIView*)ancestorOrSelfWithClass:(Class)cls; - -/** - * Removes all subviews. - */ -- (void)removeAllSubviews; - -/** - * WARNING: This depends on undocumented APIs and may be fragile. For testing only. - */ -#ifdef DEBUG -- (void)simulateTapAtPoint:(CGPoint)location; -#endif - -/** - * Calculates the offset of this view from another view in screen coordinates. - * - * otherView should be a parent view of this view. - */ -- (CGPoint)offsetFromView:(UIView*)otherView; - -/** - * Calculates the frame of this view with parts that intersect with the keyboard subtracted. - * - * If the keyboard is not showing, this will simply return the normal frame. - */ -- (CGRect)frameWithKeyboardSubtracted:(CGFloat)plusHeight; - -/** - * Shows the view in a window at the bottom of the screen. - * - * This will send a notification pretending that a keyboard is about to appear so that - * observers who adjust their layout for the keyboard will also adjust for this view. - */ -- (void)presentAsKeyboardInView:(UIView*)containingView; - -/** - * Hides a view that was showing in a window at the bottom of the screen (via presentAsKeyboard). - * - * This will send a notification pretending that a keyboard is about to disappear so that - * observers who adjust their layout for the keyboard will also adjust for this view. - */ -- (void)dismissAsKeyboard:(BOOL)animated; - -@end diff --git a/src/Three20UI/Headers/UIWebViewAdditions.h b/src/Three20UI/Headers/UIWebViewAdditions.h deleted file mode 100644 index e9c6c64070..0000000000 --- a/src/Three20UI/Headers/UIWebViewAdditions.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIWebView (TTCategory) - -/** - * Gets the frame of a DOM element in the page. - * - * @query A JavaScript expression that evaluates to a single DOM element. - */ -- (CGRect)frameOfElement:(NSString*)query; - -@end diff --git a/src/Three20UI/Sources/TTActionSheet.m b/src/Three20UI/Sources/TTActionSheet.m deleted file mode 100644 index 92f1eb9a9e..0000000000 --- a/src/Three20UI/Sources/TTActionSheet.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTActionSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTActionSheet - -@synthesize popupViewController = _popupViewController; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_popupViewController); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToSuperview { - if (nil == self.superview) { - [_popupViewController autorelease]; - _popupViewController = nil; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTActionSheetController.m b/src/Three20UI/Sources/TTActionSheetController.m deleted file mode 100644 index 76d59a4ccf..0000000000 --- a/src/Three20UI/Sources/TTActionSheetController.m +++ /dev/null @@ -1,274 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTActionSheetController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTActionSheetControllerDelegate.h" -#import "Three20UI/TTActionSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTActionSheetController - -@synthesize delegate = _delegate; -@synthesize userInfo = _userInfo; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _URLs = [[NSMutableArray alloc] init]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title delegate:(id)delegate { - if (self = [self initWithNibName:nil bundle:nil]) { - _delegate = delegate; - - if (nil != title) { - self.actionSheet.title = title; - } - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title { - if (self = [self initWithTitle:title delegate:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithTitle:nil delegate:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_URLs); - TT_RELEASE_SAFELY(_userInfo); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - TTActionSheet* actionSheet = [[[TTActionSheet alloc] initWithTitle:nil delegate:self - cancelButtonTitle:nil - destructiveButtonTitle:nil - otherButtonTitles:nil] autorelease]; - actionSheet.popupViewController = self; - self.view = actionSheet; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UTViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTPopupViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showInView:(UIView*)view animated:(BOOL)animated { - [self viewWillAppear:animated]; - [self.actionSheet showInView:view.window]; - [self viewDidAppear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated { - [self viewWillAppear:animated]; - [self.actionSheet showFromBarButtonItem:item animated:animated]; - [self viewDidAppear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated { - [self viewWillAppear:animated]; - [self.actionSheet showFromRect:rect inView:view animated:animated]; - [self viewDidAppear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissPopupViewControllerAnimated:(BOOL)animated { - [self viewWillDisappear:animated]; - [self.actionSheet dismissWithClickedButtonIndex:self.actionSheet.cancelButtonIndex - animated:animated]; - [self viewDidDisappear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIActionSheetDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)actionSheet:(UIActionSheet*)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { - if ([_delegate respondsToSelector:@selector(actionSheet:clickedButtonAtIndex:)]) { - [_delegate actionSheet:actionSheet clickedButtonAtIndex:buttonIndex]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)actionSheetCancel:(UIActionSheet*)actionSheet { - if ([_delegate respondsToSelector:@selector(actionSheetCancel:)]) { - [_delegate actionSheetCancel:actionSheet]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)willPresentActionSheet:(UIActionSheet*)actionSheet { - if ([_delegate respondsToSelector:@selector(willPresentActionSheet:)]) { - [_delegate willPresentActionSheet:actionSheet]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didPresentActionSheet:(UIActionSheet*)actionSheet { - if ([_delegate respondsToSelector:@selector(didPresentActionSheet:)]) { - [_delegate didPresentActionSheet:actionSheet]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)actionSheet:(UIActionSheet*)actionSheet willDismissWithButtonIndex:(NSInteger)buttonIndex { - if ([_delegate respondsToSelector:@selector(actionSheet:willDismissWithButtonIndex:)]) { - [_delegate actionSheet:actionSheet willDismissWithButtonIndex:buttonIndex]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)actionSheet:(UIActionSheet*)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex { - NSString* URL = [self buttonURLAtIndex:buttonIndex]; - BOOL canOpenURL = YES; - - if ([_delegate - respondsToSelector:@selector(actionSheetController:didDismissWithButtonIndex:URL:)]) { - canOpenURL = [_delegate actionSheetController: self - didDismissWithButtonIndex: buttonIndex - URL: URL]; - } - - if (URL && canOpenURL) { - TTOpenURL(URL); - } - - if ([_delegate respondsToSelector:@selector(actionSheet:didDismissWithButtonIndex:)]) { - [_delegate actionSheet:actionSheet didDismissWithButtonIndex:buttonIndex]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIActionSheet*)actionSheet { - return (UIActionSheet*)self.view; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)addButtonWithTitle:(NSString*)title URL:(NSString*)URL { - if (URL) { - [_URLs addObject:URL]; - - } else { - [_URLs addObject:[NSNull null]]; - } - return [self.actionSheet addButtonWithTitle:title]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)addCancelButtonWithTitle:(NSString*)title URL:(NSString*)URL { - self.actionSheet.cancelButtonIndex = [self addButtonWithTitle:title URL:URL]; - return self.actionSheet.cancelButtonIndex; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)addDestructiveButtonWithTitle:(NSString*)title URL:(NSString*)URL { - self.actionSheet.destructiveButtonIndex = [self addButtonWithTitle:title URL:URL]; - return self.actionSheet.destructiveButtonIndex; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)buttonURLAtIndex:(NSInteger)buttonIndex { - if (buttonIndex < _URLs.count) { - id URL = [_URLs objectAtIndex:buttonIndex]; - return URL != [NSNull null] ? URL : nil; - - } else { - return nil; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTActivityLabel.m b/src/Three20UI/Sources/TTActivityLabel.m deleted file mode 100644 index 91ba603d53..0000000000 --- a/src/Three20UI/Sources/TTActivityLabel.m +++ /dev/null @@ -1,360 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTActivityLabel.h" - -// UI -#import "Three20UI/TTView.h" -#import "Three20UI/TTButton.h" -#import "Three20UI/UIViewAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/UIFontAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static CGFloat kMargin = 10; -static CGFloat kPadding = 15; -static CGFloat kBannerPadding = 8; -static CGFloat kSpacing = 6; -static CGFloat kProgressMargin = 6; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTActivityLabel - -@synthesize style = _style; -@synthesize progress = _progress; -@synthesize smoothesProgress = _smoothesProgress; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame style:(TTActivityLabelStyle)style text:(NSString*)text { - if (self = [super initWithFrame:frame]) { - _style = style; - _progress = 0; - _smoothesProgress = NO; - _smoothTimer =nil; - _progressView = nil; - - _bezelView = [[TTView alloc] init]; - if (_style == TTActivityLabelStyleBlackBezel) { - _bezelView.backgroundColor = [UIColor clearColor]; - _bezelView.style = TTSTYLE(blackBezel); - self.backgroundColor = [UIColor clearColor]; - - } else if (_style == TTActivityLabelStyleWhiteBezel) { - _bezelView.backgroundColor = [UIColor clearColor]; - _bezelView.style = TTSTYLE(whiteBezel); - self.backgroundColor = [UIColor clearColor]; - - } else if (_style == TTActivityLabelStyleWhiteBox) { - _bezelView.backgroundColor = [UIColor clearColor]; - self.backgroundColor = [UIColor whiteColor]; - - } else if (_style == TTActivityLabelStyleBlackBox) { - _bezelView.backgroundColor = [UIColor clearColor]; - self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.8]; - - } else if (_style == TTActivityLabelStyleBlackBanner) { - _bezelView.backgroundColor = [UIColor clearColor]; - _bezelView.style = TTSTYLE(blackBanner); - self.backgroundColor = [UIColor clearColor]; - - } else { - _bezelView.backgroundColor = [UIColor clearColor]; - self.backgroundColor = [UIColor clearColor]; - } - - self.autoresizingMask = - UIViewAutoresizingFlexibleWidth | - UIViewAutoresizingFlexibleHeight; - - _label = [[UILabel alloc] init]; - _label.text = text; - _label.backgroundColor = [UIColor clearColor]; - _label.lineBreakMode = UILineBreakModeTailTruncation; - - if (_style == TTActivityLabelStyleWhite) { - _activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: - UIActivityIndicatorViewStyleWhite]; - _label.font = TTSTYLEVAR(activityLabelFont); - _label.textColor = [UIColor whiteColor]; - - } else if (_style == TTActivityLabelStyleGray - || _style == TTActivityLabelStyleWhiteBox - || _style == TTActivityLabelStyleWhiteBezel) { - _activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: - UIActivityIndicatorViewStyleGray]; - _label.font = TTSTYLEVAR(activityLabelFont); - _label.textColor = TTSTYLEVAR(tableActivityTextColor); - - } else if (_style == TTActivityLabelStyleBlackBezel || _style == TTActivityLabelStyleBlackBox) { - _activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: - UIActivityIndicatorViewStyleWhiteLarge]; - _activityIndicator.frame = CGRectMake(0, 0, 24, 24); - _label.font = TTSTYLEVAR(activityLabelFont); - _label.textColor = [UIColor whiteColor]; - _label.shadowColor = [UIColor colorWithWhite:0 alpha:0.3]; - _label.shadowOffset = CGSizeMake(1, 1); - - } else if (_style == TTActivityLabelStyleBlackBanner) { - _activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: - UIActivityIndicatorViewStyleWhite]; - _label.font = TTSTYLEVAR(activityBannerFont); - _label.textColor = [UIColor whiteColor]; - _label.shadowColor = [UIColor colorWithWhite:0 alpha:0.3]; - _label.shadowOffset = CGSizeMake(1, 1); - } - - [self addSubview:_bezelView]; - [_bezelView addSubview:_activityIndicator]; - [_bezelView addSubview:_label]; - [_activityIndicator startAnimating]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame style:(TTActivityLabelStyle)style { - if (self = [self initWithFrame:frame style:style text:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(TTActivityLabelStyle)style { - if (self = [self initWithFrame:CGRectZero style:style text:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [self initWithFrame:frame style:TTActivityLabelStyleWhiteBox text:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_INVALIDATE_TIMER(_smoothTimer); - TT_RELEASE_SAFELY(_bezelView); - TT_RELEASE_SAFELY(_progressView); - TT_RELEASE_SAFELY(_activityIndicator); - TT_RELEASE_SAFELY(_label); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - CGSize textSize = [_label.text sizeWithFont:_label.font]; - - CGFloat indicatorSize = 0; - [_activityIndicator sizeToFit]; - if (_activityIndicator.isAnimating) { - if (_activityIndicator.height > textSize.height) { - indicatorSize = textSize.height; - - } else { - indicatorSize = _activityIndicator.height; - } - } - - CGFloat contentWidth = indicatorSize + kSpacing + textSize.width; - CGFloat contentHeight = textSize.height > indicatorSize ? textSize.height : indicatorSize; - - if (_progressView) { - [_progressView sizeToFit]; - contentHeight += _progressView.height + kSpacing; - } - - CGFloat margin, padding, bezelWidth, bezelHeight; - if (_style == TTActivityLabelStyleBlackBezel || _style == TTActivityLabelStyleWhiteBezel) { - margin = kMargin; - padding = kPadding; - bezelWidth = contentWidth + padding*2; - bezelHeight = contentHeight + padding*2; - - } else { - margin = 0; - padding = kBannerPadding; - bezelWidth = self.width; - bezelHeight = self.height; - } - - CGFloat maxBevelWidth = TTScreenBounds().size.width - margin*2; - if (bezelWidth > maxBevelWidth) { - bezelWidth = maxBevelWidth; - contentWidth = bezelWidth - (kSpacing + indicatorSize); - } - - CGFloat textMaxWidth = (bezelWidth - (indicatorSize + kSpacing)) - padding*2; - CGFloat textWidth = textSize.width; - if (textWidth > textMaxWidth) { - textWidth = textMaxWidth; - } - - _bezelView.frame = CGRectMake(floor(self.width/2 - bezelWidth/2), - floor(self.height/2 - bezelHeight/2), - bezelWidth, bezelHeight); - - CGFloat y = padding + floor((bezelHeight - padding*2)/2 - contentHeight/2); - - if (_progressView) { - if (_style == TTActivityLabelStyleBlackBanner) { - y += kBannerPadding/2; - } - _progressView.frame = CGRectMake(kProgressMargin, y, - bezelWidth - kProgressMargin*2, _progressView.height); - y += _progressView.height + kSpacing-1; - } - - _label.frame = CGRectMake(floor((bezelWidth/2 - contentWidth/2) + indicatorSize + kSpacing), y, - textWidth, textSize.height); - - _activityIndicator.frame = CGRectMake(_label.left - (indicatorSize+kSpacing), y, - indicatorSize, indicatorSize); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - CGFloat padding; - if (_style == TTActivityLabelStyleBlackBezel || _style == TTActivityLabelStyleWhiteBezel) { - padding = kPadding; - - } else { - padding = kBannerPadding; - } - - CGFloat height = _label.font.ttLineHeight + padding*2; - if (_progressView) { - height += _progressView.height + kSpacing; - } - - return CGSizeMake(size.width, height); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)smoothTimer { - if (_progressView.progress < _progress) { - _progressView.progress += 0.01; - - } else { - TT_INVALIDATE_TIMER(_smoothTimer); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)text { - return _label.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(NSString*)text { - _label.text = text; - [self setNeedsLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return _label.font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - _label.font = font; - [self setNeedsLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isAnimating { - return _activityIndicator.isAnimating; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setIsAnimating:(BOOL)isAnimating { - if (isAnimating) { - [_activityIndicator startAnimating]; - - } else { - [_activityIndicator stopAnimating]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setProgress:(float)progress { - _progress = progress; - - if (!_progressView) { - _progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault]; - _progressView.progress = 0; - [_bezelView addSubview:_progressView]; - [self setNeedsLayout]; - } - - if (_smoothesProgress) { - if (!_smoothTimer) { - _smoothTimer = [NSTimer scheduledTimerWithTimeInterval:0.01 target:self - selector:@selector(smoothTimer) userInfo:nil repeats:YES]; - } - - } else { - _progressView.progress = progress; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTAlertView.m b/src/Three20UI/Sources/TTAlertView.m deleted file mode 100644 index cafc6de7bf..0000000000 --- a/src/Three20UI/Sources/TTAlertView.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTAlertView.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTAlertView - -@synthesize popupViewController = _popupViewController; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_popupViewController); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToSuperview { - if (nil == self.superview) { - [_popupViewController autorelease]; - _popupViewController = nil; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTAlertViewController.m b/src/Three20UI/Sources/TTAlertViewController.m deleted file mode 100644 index 9e63a39e31..0000000000 --- a/src/Three20UI/Sources/TTAlertViewController.m +++ /dev/null @@ -1,244 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTAlertViewController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTAlertViewControllerDelegate.h" -#import "Three20UI/TTAlertView.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTAlertViewController - -@synthesize delegate = _delegate; -@synthesize userInfo = _userInfo; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _URLs = [[NSMutableArray alloc] init]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title message:(NSString*)message delegate:(id)delegate { - if (self = [self initWithNibName:nil bundle:nil]) { - _delegate = delegate; - - if (nil != title) { - self.alertView.title = title; - } - - if (nil != message) { - self.alertView.message = message; - } - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title message:(NSString*)message { - if (self = [self initWithTitle:title message:message delegate:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithTitle:nil message:nil delegate:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [(UIAlertView*)self.view setDelegate:nil]; - TT_RELEASE_SAFELY(_URLs); - TT_RELEASE_SAFELY(_userInfo); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - TTAlertView* alertView = [[[TTAlertView alloc] initWithTitle:nil message:nil delegate:self - cancelButtonTitle:nil - otherButtonTitles:nil] autorelease]; - alertView.popupViewController = self; - self.view = alertView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UTViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTPopupViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showInView:(UIView*)view animated:(BOOL)animated { - [self viewWillAppear:animated]; - [self.alertView show]; - [self viewDidAppear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissPopupViewControllerAnimated:(BOOL)animated { - [self viewWillDisappear:animated]; - [self.alertView dismissWithClickedButtonIndex:self.alertView.cancelButtonIndex animated:animated]; - [self viewDidDisappear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAlertviewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { - if ([_delegate respondsToSelector:@selector(alertView:clickedButtonAtIndex:)]) { - [_delegate alertView:alertView clickedButtonAtIndex:buttonIndex]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)alertViewCancel:(UIAlertView*)alertView { - if ([_delegate respondsToSelector:@selector(alertViewCancel:)]) { - [_delegate alertViewCancel:alertView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)willPresentAlertView:(UIAlertView*)alertView { - if ([_delegate respondsToSelector:@selector(willPresentAlertView:)]) { - [_delegate willPresentAlertView:alertView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didPresentAlertView:(UIAlertView*)alertView { - if ([_delegate respondsToSelector:@selector(didPresentAlertView:)]) { - [_delegate didPresentAlertView:alertView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)alertView:(UIAlertView*)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex { - if ([_delegate respondsToSelector:@selector(alertView:willDismissWithButtonIndex:)]) { - [_delegate alertView:alertView willDismissWithButtonIndex:buttonIndex]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)alertView:(UIAlertView*)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { - NSString* URL = [self buttonURLAtIndex:buttonIndex]; - BOOL canOpenURL = YES; - if ([_delegate respondsToSelector: - @selector(alertViewController:didDismissWithButtonIndex:URL:)]) { - canOpenURL = [_delegate alertViewController:self didDismissWithButtonIndex:buttonIndex URL:URL]; - } - if (URL && canOpenURL) { - TTOpenURL(URL); - } - if ([_delegate respondsToSelector:@selector(alertView:didDismissWithButtonIndex:)]) { - [_delegate alertView:alertView didDismissWithButtonIndex:buttonIndex]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIAlertView*)alertView { - return (UIAlertView*)self.view; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)addButtonWithTitle:(NSString*)title URL:(NSString*)URL { - if (URL) { - [_URLs addObject:URL]; - - } else { - [_URLs addObject:[NSNull null]]; - } - return [self.alertView addButtonWithTitle:title]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)addCancelButtonWithTitle:(NSString*)title URL:(NSString*)URL { - self.alertView.cancelButtonIndex = [self addButtonWithTitle:title URL:URL]; - return self.alertView.cancelButtonIndex; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)buttonURLAtIndex:(NSInteger)buttonIndex { - id URL = [_URLs objectAtIndex:buttonIndex]; - return URL != [NSNull null] ? URL : nil; -} - - -@end diff --git a/src/Three20UI/Sources/TTButton.m b/src/Three20UI/Sources/TTButton.m deleted file mode 100644 index 9d8282e342..0000000000 --- a/src/Three20UI/Sources/TTButton.m +++ /dev/null @@ -1,486 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTButton.h" - -// UI (private) -#import "Three20UI/private/TTButtonContent.h" - -// UI -#import "Three20UI/TTImageViewDelegate.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTTextStyle.h" -#import "Three20Style/TTPartStyle.h" -#import "Three20Style/TTBoxStyle.h" -#import "Three20Style/TTImageStyle.h" -#import "Three20Style/UIImageAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kHPadding = 8; -static const CGFloat kVPadding = 7; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTButton - -@synthesize font = _font; -@synthesize isVertical = _isVertical; -@synthesize imageDelegate = _imageDelegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.backgroundColor = [UIColor clearColor]; - self.contentMode = UIViewContentModeRedraw; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_content); - TT_RELEASE_SAFELY(_font); - self.imageDelegate = nil; - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTButton*)buttonWithStyle:(NSString*)selector { - TTButton* button = [[[self alloc] init] autorelease]; - [button setStylesWithSelector:selector]; - return button; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTButton*)buttonWithStyle:(NSString*)selector title:(NSString*)title { - TTButton* button = [[[self alloc] init] autorelease]; - [button setTitle:title forState:UIControlStateNormal]; - [button setStylesWithSelector:selector]; - return button; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)keyForState:(UIControlState)state { - static NSString* normalKey = @"normal"; - static NSString* highlighted = @"highlighted"; - static NSString* selected = @"selected"; - static NSString* disabled = @"disabled"; - if (state & UIControlStateHighlighted) { - return highlighted; - - } else if (state & UIControlStateSelected) { - return selected; - - } else if (state & UIControlStateDisabled) { - return disabled; - - } else { - return normalKey; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTButtonContent*)contentForState:(UIControlState)state { - if (!_content) { - _content = [[NSMutableDictionary alloc] init]; - } - - id key = [self keyForState:state]; - TTButtonContent* content = [_content objectForKey:key]; - if (!content) { - content = [[[TTButtonContent alloc] initWithButton:self] autorelease]; - [_content setObject:content forKey:key]; - } - - return content; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTButtonContent*)contentForCurrentState { - TTButtonContent* content = nil; - if (self.selected) { - content = [self contentForState:UIControlStateSelected]; - - } else if (self.highlighted) { - content = [self contentForState:UIControlStateHighlighted]; - - } else if (!self.enabled) { - content = [self contentForState:UIControlStateDisabled]; - } - - return content ? content : [self contentForState:UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForCurrentState { - TTButtonContent* content = [self contentForCurrentState]; - return content.title ? content.title : [self contentForState:UIControlStateNormal].title; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)imageForCurrentState { - TTButtonContent* content = [self contentForCurrentState]; - return content.image ? content.image : [self contentForState:UIControlStateNormal].image; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)styleForCurrentState { - TTButtonContent* content = [self contentForCurrentState]; - return content.style ? content.style : [self contentForState:UIControlStateNormal].style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)fontForCurrentState { - if (_font) { - return _font; - - } else { - TTStyle* style = [self styleForCurrentState]; - TTTextStyle* textStyle = (TTTextStyle*)[style firstStyleOfClass:[TTTextStyle class]]; - if (textStyle.font) { - return textStyle.font; - - } else { - return self.font; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - TTStyle* style = [self styleForCurrentState]; - if (style) { - CGRect textFrame = self.bounds; - - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - - TTPartStyle* imageStyle = [style styleForPart:@"image"]; - TTBoxStyle* imageBoxStyle = nil; - CGSize imageSize = CGSizeZero; - if (imageStyle) { - imageBoxStyle = [imageStyle.style firstStyleOfClass:[TTBoxStyle class]]; - imageSize = [imageStyle.style addToSize:CGSizeZero context:context]; - if (_isVertical) { - CGFloat height = imageSize.height + imageBoxStyle.margin.top + imageBoxStyle.margin.bottom; - textFrame.origin.y += height; - textFrame.size.height -= height; - - } else { - textFrame.origin.x += imageSize.width + imageBoxStyle.margin.right; - textFrame.size.width -= imageSize.width + imageBoxStyle.margin.right; - } - } - - context.delegate = self; - context.frame = self.bounds; - context.contentFrame = textFrame; - context.font = [self fontForCurrentState]; - - [style draw:context]; - - if (imageStyle) { - CGRect frame = context.contentFrame; - if (_isVertical) { - frame = self.bounds; - frame.origin.x += imageBoxStyle.margin.left; - frame.origin.y += imageBoxStyle.margin.top; - - } else { - frame.size = imageSize; - frame.origin.x += imageBoxStyle.margin.left; - frame.origin.y += imageBoxStyle.margin.top; - } - - context.frame = frame; - context.contentFrame = context.frame; - context.shape = nil; - - [imageStyle drawPart:context]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - context.font = [self fontForCurrentState]; - - TTStyle* style = [self styleForCurrentState]; - if (style) { - return [style addToSize:CGSizeZero context:context]; - - } else { - return size; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIControl - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHighlighted:(BOOL)highlighted { - [super setHighlighted:highlighted]; - [self setNeedsDisplay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSelected:(BOOL)selected { - [super setSelected:selected]; - [self setNeedsDisplay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setEnabled:(BOOL)enabled { - [super setEnabled:enabled]; - [self setNeedsDisplay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAccessibility - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isAccessibilityElement { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString *)accessibilityLabel { - return [self titleForCurrentState]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIAccessibilityTraits)accessibilityTraits { - return [super accessibilityTraits] | UIAccessibilityTraitButton; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyleDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)textForLayerWithStyle:(TTStyle*)style { - return [self titleForCurrentState]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)imageForLayerWithStyle:(TTStyle*)style { - return [self imageForCurrentState]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTImageViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)imageView:(TTImageView*)imageView didLoadImage:(UIImage*)image { - -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - if (!_font) { - _font = [TTSTYLEVAR(buttonFont) retain]; - } - return _font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - if (font != _font) { - [_font release]; - _font = [font retain]; - [self setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForState:(UIControlState)state { - return [self contentForState:state].title; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTitle:(NSString*)title forState:(UIControlState)state { - TTButtonContent* content = [self contentForState:state]; - content.title = title; - [self setNeedsDisplay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)imageForState:(UIControlState)state { - return [self contentForState:state].imageURL; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setImage:(NSString*)imageURL forState:(UIControlState)state { - TTButtonContent* content = [self contentForState:state]; - content.delegate = self.imageDelegate; - content.imageURL = imageURL; - [self setNeedsDisplay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)styleForState:(UIControlState)state { - return [self contentForState:state].style; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setStyle:(TTStyle*)style forState:(UIControlState)state { - TTButtonContent* content = [self contentForState:state]; - content.style = style; - [self setNeedsDisplay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setStylesWithSelector:(NSString*)selector { - TTStyleSheet* ss = [TTStyleSheet globalStyleSheet]; - - TTStyle* normalStyle = [ss styleWithSelector:selector forState:UIControlStateNormal]; - [self setStyle:normalStyle forState:UIControlStateNormal]; - - TTStyle* highlightedStyle = [ss styleWithSelector:selector forState:UIControlStateHighlighted]; - [self setStyle:highlightedStyle forState:UIControlStateHighlighted]; - - TTStyle* selectedStyle = [ss styleWithSelector:selector forState:UIControlStateSelected]; - [self setStyle:selectedStyle forState:UIControlStateSelected]; - - TTStyle* disabledStyle = [ss styleWithSelector:selector forState:UIControlStateDisabled]; - [self setStyle:disabledStyle forState:UIControlStateDisabled]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)suspendLoadingImages:(BOOL)suspended { - TTButtonContent* content = [self contentForCurrentState]; - if (suspended) { - [content stopLoading]; - - } else if (!content.image) { - [content reload]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)rectForImage { - TTStyle* style = [self styleForCurrentState]; - if (style) { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - - TTPartStyle* imagePartStyle = [style styleForPart:@"image"]; - if (imagePartStyle) { - TTImageStyle* imageStyle = [imagePartStyle.style firstStyleOfClass:[TTImageStyle class]]; - TTBoxStyle* imageBoxStyle = [imagePartStyle.style firstStyleOfClass:[TTBoxStyle class]]; - CGSize imageSize = [imagePartStyle.style addToSize:CGSizeZero context:context]; - - CGRect frame = context.contentFrame; - if (_isVertical) { - frame = self.bounds; - frame.origin.x += imageBoxStyle.margin.left; - frame.origin.y += imageBoxStyle.margin.top; - - } else { - frame.size = imageSize; - frame.origin.x += imageBoxStyle.margin.left; - frame.origin.y += imageBoxStyle.margin.top; - } - - UIImage* image = [self imageForCurrentState]; - return [image convertRect:frame withContentMode:imageStyle.contentMode]; - } - } - - return CGRectZero; -} - - -@end diff --git a/src/Three20UI/Sources/TTButtonBar.m b/src/Three20UI/Sources/TTButtonBar.m deleted file mode 100644 index 9ebcd391f1..0000000000 --- a/src/Three20UI/Sources/TTButtonBar.m +++ /dev/null @@ -1,121 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTButtonBar.h" - -// UI -#import "Three20UI/TTButton.h" -#import "Three20UI/UIViewAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static CGFloat kPadding = 10; -static CGFloat kButtonHeight = 30; -static CGFloat kButtonMaxWidth = 120; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTButtonBar - -@synthesize buttons = _buttons; -@synthesize buttonStyle = _buttonStyle; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _buttons = [[NSMutableArray alloc] init]; - - self.buttonStyle = @"toolbarButton:"; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_buttons); - TT_RELEASE_SAFELY(_buttonStyle); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { - // XXXjoe Hackish? This prevents weird things from happening when the user touches the - // background of the button bar while it is used as the menu in a table view. -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - CGFloat buttonWidth = floor((self.width-kPadding) / _buttons.count)-kPadding; - if (buttonWidth > kButtonMaxWidth) { - buttonWidth = kButtonMaxWidth; - } - - CGFloat x = kPadding + floor(self.width/2 - ((buttonWidth+kPadding)*_buttons.count)/2); - CGFloat y = floor(self.height/2 - kButtonHeight/2); - - for (UIButton* button in _buttons) { - button.frame = CGRectMake(x, y, buttonWidth, kButtonHeight); - x += button.width + kPadding; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addButton:(NSString*)title target:(id)target action:(SEL)selector { - TTButton* button = [TTButton buttonWithStyle:_buttonStyle]; - [button setTitle:title forState:UIControlStateNormal]; - [button addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside]; - [self addSubview:button]; - [_buttons addObject:button]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeButtons { - for (UIButton* button in _buttons) { - [button removeFromSuperview]; - } - [_buttons removeAllObjects]; -} - - -@end diff --git a/src/Three20UI/Sources/TTButtonContent.m b/src/Three20UI/Sources/TTButtonContent.m deleted file mode 100644 index 864c5c9ec9..0000000000 --- a/src/Three20UI/Sources/TTButtonContent.m +++ /dev/null @@ -1,166 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTButtonContent.h" - -// UI -#import "Three20UI/TTImageViewDelegate.h" - -// Network -#import "Three20Network/TTURLImageResponse.h" -#import "Three20Network/TTURLCache.h" -#import "Three20Network/TTURLRequest.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTButtonContent - -@synthesize title = _title; -@synthesize imageURL = _imageURL; -@synthesize image = _image; -@synthesize style = _style; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithButton:(TTButton*)button { - if (self = [super init]) { - _button = button; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [_request cancel]; - TT_RELEASE_SAFELY(_request); - TT_RELEASE_SAFELY(_title); - TT_RELEASE_SAFELY(_imageURL); - TT_RELEASE_SAFELY(_image); - TT_RELEASE_SAFELY(_style); - self.delegate = nil; - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLRequestDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidStartLoad:(TTURLRequest*)request { - [_request release]; - _request = [request retain]; - - if ([_delegate respondsToSelector:@selector(imageViewDidStartLoad:)]) { - [_delegate imageViewDidStartLoad:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidFinishLoad:(TTURLRequest*)request { - TTURLImageResponse* response = request.response; - self.image = response.image; - [_button setNeedsDisplay]; - - TT_RELEASE_SAFELY(_request); - - if ([_delegate respondsToSelector:@selector(imageView:didLoadImage:)]) { - [_delegate imageView:nil didLoadImage:response.image]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)request:(TTURLRequest*)request didFailLoadWithError:(NSError*)error { - TT_RELEASE_SAFELY(_request); - - if ([_delegate respondsToSelector:@selector(imageView:didFailLoadWithError:)]) { - [_delegate imageView:nil didFailLoadWithError:error]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidCancelLoad:(TTURLRequest*)request { - TT_RELEASE_SAFELY(_request); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setImageURL:(NSString*)URL { - if (self.image && _imageURL && [URL isEqualToString:_imageURL]) - return; - - [self stopLoading]; - [_imageURL release]; - _imageURL = [URL retain]; - - if (_imageURL.length) { - [self reload]; - - } else { - self.image = nil; - [_button setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reload { - if (!_request && _imageURL) { - UIImage* image = [[TTURLCache sharedCache] imageForURL:_imageURL]; - if (image) { - self.image = image; - [_button setNeedsDisplay]; - - if ([_delegate respondsToSelector:@selector(imageView:didLoadImage:)]) { - [_delegate imageView:nil didLoadImage:image]; - } - - } else { - TTURLRequest* request = [TTURLRequest requestWithURL:_imageURL delegate:self]; - request.response = [[[TTURLImageResponse alloc] init] autorelease]; - [request send]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)stopLoading { - [_request cancel]; -} - - -@end - diff --git a/src/Three20UI/Sources/TTErrorView.m b/src/Three20UI/Sources/TTErrorView.m deleted file mode 100644 index c5f2a8c7bf..0000000000 --- a/src/Three20UI/Sources/TTErrorView.m +++ /dev/null @@ -1,179 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTErrorView.h" - -// UI -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kVPadding1 = 30; -static const CGFloat kVPadding2 = 20; -static const CGFloat kHPadding = 10; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTErrorView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title subtitle:(NSString*)subtitle image:(UIImage*)image { - if (self = [self init]) { - self.title = title; - self.subtitle = subtitle; - self.image = image; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _imageView = [[UIImageView alloc] init]; - _imageView.contentMode = UIViewContentModeCenter; - [self addSubview:_imageView]; - - _titleView = [[UILabel alloc] init]; - _titleView.backgroundColor = [UIColor clearColor]; - _titleView.textColor = TTSTYLEVAR(tableErrorTextColor); - _titleView.font = TTSTYLEVAR(errorTitleFont); - _titleView.textAlignment = UITextAlignmentCenter; - [self addSubview:_titleView]; - - _subtitleView = [[UILabel alloc] init]; - _subtitleView.backgroundColor = [UIColor clearColor]; - _subtitleView.textColor = TTSTYLEVAR(tableErrorTextColor); - _subtitleView.font = TTSTYLEVAR(errorSubtitleFont); - _subtitleView.textAlignment = UITextAlignmentCenter; - _subtitleView.numberOfLines = 0; - [self addSubview:_subtitleView]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_imageView); - TT_RELEASE_SAFELY(_titleView); - TT_RELEASE_SAFELY(_subtitleView); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - _subtitleView.size = [_subtitleView sizeThatFits:CGSizeMake(self.width - kHPadding*2, 0)]; - [_titleView sizeToFit]; - [_imageView sizeToFit]; - - CGFloat maxHeight = _imageView.height + _titleView.height + _subtitleView.height - + kVPadding1 + kVPadding2; - BOOL canShowImage = _imageView.image && self.height > maxHeight; - - CGFloat totalHeight = 0; - - if (canShowImage) { - totalHeight += _imageView.height; - } - if (_titleView.text.length) { - totalHeight += (totalHeight ? kVPadding1 : 0) + _titleView.height; - } - if (_subtitleView.text.length) { - totalHeight += (totalHeight ? kVPadding2 : 0) + _subtitleView.height; - } - - CGFloat top = floor(self.height/2 - totalHeight/2); - - if (canShowImage) { - _imageView.origin = CGPointMake(floor(self.width/2 - _imageView.width/2), top); - _imageView.hidden = NO; - top += _imageView.height + kVPadding1; - - } else { - _imageView.hidden = YES; - } - if (_titleView.text.length) { - _titleView.origin = CGPointMake(floor(self.width/2 - _titleView.width/2), top); - top += _titleView.height + kVPadding2; - } - if (_subtitleView.text.length) { - _subtitleView.origin = CGPointMake(floor(self.width/2 - _subtitleView.width/2), top); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)title { - return _titleView.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTitle:(NSString*)title { - _titleView.text = title; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)subtitle { - return _subtitleView.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSubtitle:(NSString*)subtitle { - _subtitleView.text = subtitle; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)image { - return _imageView.image; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setImage:(UIImage*)image { - _imageView.image = image; -} - - -@end diff --git a/src/Three20UI/Sources/TTExtensionInfoController.m b/src/Three20UI/Sources/TTExtensionInfoController.m deleted file mode 100644 index e6a5892b25..0000000000 --- a/src/Three20UI/Sources/TTExtensionInfoController.m +++ /dev/null @@ -1,104 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTExtensionInfoController.h" - -// UI -#import "Three20UI/TTSectionedDataSource.h" -#import "Three20UI/TTTableCaptionItem.h" -#import "Three20UI/TTTableLongTextItem.h" -#import "Three20UI/TTTableTextItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTExtensionInfo.h" -#import "Three20Core/TTExtensionAuthor.h" -#import "Three20Core/TTExtensionLoader.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTExtensionInfoController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithExtensionID:(NSString*)identifier { - if (self = [super initWithNibName:nil bundle:nil]) { - self.title = @"Extension Info"; - self.tableViewStyle = UITableViewStyleGrouped; - - _extension = [[[TTExtensionLoader availableExtensions] objectForKey:identifier] retain]; - - self.variableHeightRows = YES; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - return [self initWithExtensionID:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_extension); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidLoad { - [super viewDidLoad]; - - NSMutableArray* items = [[[NSMutableArray alloc] init] autorelease]; - NSMutableArray* titles = [[[NSMutableArray alloc] init] autorelease]; - - [titles addObject:@"Description"]; - [items addObject:[NSArray arrayWithObjects: - [TTTableLongTextItem itemWithText:_extension.description], - nil]]; - - [titles addObject:@"General Info"]; - [items addObject:[NSArray arrayWithObjects: - [TTTableCaptionItem itemWithText:_extension.name caption:@"Name:"], - [TTTableCaptionItem itemWithText:_extension.version caption:@"Version:"], - [TTTableCaptionItem itemWithText:_extension.license caption:@"License:"], - [TTTableCaptionItem itemWithText:_extension.copyright caption:@"Copyright:"], - nil]]; - - if ([_extension.authors count] > 0) { - [titles addObject:@"Authors"]; - NSMutableArray* authorItems = [[[NSMutableArray alloc] initWithCapacity: - [_extension.authors count]] autorelease]; - for (TTExtensionAuthor* author in _extension.authors) { - TTDASSERT([author isKindOfClass:[TTExtensionAuthor class]]); - [authorItems addObject:[TTTableTextItem itemWithText:author.name]]; - } - - [items addObject:authorItems]; - } - - self.dataSource = [TTSectionedDataSource dataSourceWithItems:items sections:titles]; -} - - -@end - diff --git a/src/Three20UI/Sources/TTExtensionsController.m b/src/Three20UI/Sources/TTExtensionsController.m deleted file mode 100644 index f6d63d5ec3..0000000000 --- a/src/Three20UI/Sources/TTExtensionsController.m +++ /dev/null @@ -1,137 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "TTExtensionsController.h" - -// UI -#import "Three20UI/TTExtensionInfoController.h" -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTSectionedDataSource.h" -#import "Three20UI/TTTableSubtitleItem.h" -#import "Three20UI/TTTableLongTextItem.h" - -// UINavigator -#import "Three20UINavigator/TTURLMap.h" -#import "Three20UINavigator/UIViewController+TTNavigator.h" - -// Core -#import "Three20Core/TTExtensionInfo.h" -#import "Three20Core/TTExtensionLoader.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTExtensionsController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.title = @"Extensions"; - self.variableHeightRows = YES; - - self.tableViewStyle = UITableViewStyleGrouped; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)registerUrlPathsWithNavigator:(TTNavigator*)navigator prefix:(NSString*)prefix { - TTURLMap* map = navigator.URLMap; - - NSString* extensionsUrlPath = [prefix stringByAppendingString:@"extensions"]; - [map from: extensionsUrlPath - toViewController: [TTExtensionsController class]]; - [map from: [extensionsUrlPath - stringByAppendingString:@"/(initWithExtensionID:)"] - toViewController: [TTExtensionInfoController class]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTTableItem*)tableItemForExtension:(TTExtensionInfo*)extension { - NSString* urlPath = [[self navigatorURL] stringByAppendingFormat:@"/%@", - extension.identifier]; - TTTableSubtitleItem* item = [TTTableSubtitleItem itemWithText: extension.name - subtitle: extension.version - URL: urlPath]; - - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidLoad { - [super viewDidLoad]; - - NSDictionary* loadedExtensions = [TTExtensionLoader loadedExtensions]; - NSDictionary* failedExtensions = [TTExtensionLoader failedExtensions]; - NSMutableDictionary* availableExtensions = [NSMutableDictionary dictionaryWithDictionary: - [TTExtensionLoader availableExtensions]]; - - NSMutableArray* loadedItems = [[[NSMutableArray alloc] - initWithCapacity:[loadedExtensions count]] autorelease]; - NSMutableArray* failedItems = [[[NSMutableArray alloc] - initWithCapacity:[failedExtensions count]] autorelease]; - NSMutableArray* availableItems = [[[NSMutableArray alloc] - initWithCapacity:[availableExtensions count]] autorelease]; - - NSMutableArray* sectionTitles = [[[NSMutableArray alloc] initWithCapacity:3] autorelease]; - NSMutableArray* sectionItems = [[[NSMutableArray alloc] initWithCapacity:3] autorelease]; - - if ([loadedExtensions count] > 0) { - [sectionTitles addObject:@"Loaded extensions"]; - for (NSString* extensionID in loadedExtensions) { - [availableExtensions removeObjectForKey:extensionID]; - - TTExtensionInfo* extension = [loadedExtensions objectForKey:extensionID]; - [loadedItems addObject:[self tableItemForExtension:extension]]; - } - [sectionItems addObject:loadedItems]; - } - - if ([failedExtensions count] > 0) { - [sectionTitles addObject:@"Failed extensions"]; - for (NSString* extensionID in failedExtensions) { - [availableExtensions removeObjectForKey:extensionID]; - - TTExtensionInfo* extension = [failedExtensions objectForKey:extensionID]; - [failedItems addObject:[self tableItemForExtension:extension]]; - } - [sectionItems addObject:failedItems]; - } - - if ([availableExtensions count] > 0) { - [sectionTitles addObject:@"Linked, but not loaded extensions"]; - for (NSString* extensionID in availableExtensions) { - TTExtensionInfo* extension = [availableExtensions objectForKey:extensionID]; - [availableItems addObject:[self tableItemForExtension:extension]]; - } - [availableItems addObject: - [TTTableLongTextItem itemWithText: - @"Call [TTExtensionLoader loadAllExtensions] in your app delegate to load extensions."]]; - [sectionItems addObject:availableItems]; - } - - self.dataSource = [TTSectionedDataSource dataSourceWithItems: sectionItems - sections: sectionTitles]; -} - -@end - diff --git a/src/Three20UI/Sources/TTImageLayer.m b/src/Three20UI/Sources/TTImageLayer.m deleted file mode 100644 index 101583c4a0..0000000000 --- a/src/Three20UI/Sources/TTImageLayer.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTImageLayer.h" - -// UI -#import "Three20UI/TTImageView.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTImageLayer - -@synthesize override = _override; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)display { - if (nil != _override) { - self.contents = (id)_override.image.CGImage; - - } else { - return [super display]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTImageView.m b/src/Three20UI/Sources/TTImageView.m deleted file mode 100644 index 1c34db6b81..0000000000 --- a/src/Three20UI/Sources/TTImageView.m +++ /dev/null @@ -1,294 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTImageView.h" - -// UI -#import "Three20UI/TTImageViewDelegate.h" - -// UI (private) -#import "Three20UI/private/TTImageLayer.h" -#import "Three20UI/private/TTImageViewInternal.h" - -// Style -#import "Three20Style/TTShape.h" -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTContentStyle.h" -#import "Three20Style/UIImageAdditions.h" - -// Network -#import "Three20Network/TTURLCache.h" -#import "Three20Network/TTURLImageResponse.h" -#import "Three20Network/TTURLRequest.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTImageView - -@synthesize urlPath = _urlPath; -@synthesize image = _image; -@synthesize defaultImage = _defaultImage; -@synthesize autoresizesToImage = _autoresizesToImage; - -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _autoresizesToImage = NO; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - _delegate = nil; - [_request cancel]; - TT_RELEASE_SAFELY(_request); - TT_RELEASE_SAFELY(_urlPath); - TT_RELEASE_SAFELY(_image); - TT_RELEASE_SAFELY(_defaultImage); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (Class)layerClass { - return [TTImageLayer class]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - if (self.style) { - [super drawRect:rect]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawContent:(CGRect)rect { - if (nil != _image) { - [_image drawInRect:rect contentMode:self.contentMode]; - - } else { - [_defaultImage drawInRect:rect contentMode:self.contentMode]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLRequestDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidStartLoad:(TTURLRequest*)request { - [_request release]; - _request = [request retain]; - - [self imageViewDidStartLoad]; - if ([_delegate respondsToSelector:@selector(imageViewDidStartLoad:)]) { - [_delegate imageViewDidStartLoad:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidFinishLoad:(TTURLRequest*)request { - TTURLImageResponse* response = request.response; - [self setImage:response.image]; - - TT_RELEASE_SAFELY(_request); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)request:(TTURLRequest*)request didFailLoadWithError:(NSError*)error { - TT_RELEASE_SAFELY(_request); - - [self imageViewDidFailLoadWithError:error]; - if ([_delegate respondsToSelector:@selector(imageView:didFailLoadWithError:)]) { - [_delegate imageView:self didFailLoadWithError:error]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)requestDidCancelLoad:(TTURLRequest*)request { - TT_RELEASE_SAFELY(_request); - - [self imageViewDidFailLoadWithError:nil]; - if ([_delegate respondsToSelector:@selector(imageView:didFailLoadWithError:)]) { - [_delegate imageView:self didFailLoadWithError:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyleDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawLayer:(TTStyleContext*)context withStyle:(TTStyle*)style { - if ([style isKindOfClass:[TTContentStyle class]]) { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGContextSaveGState(ctx); - - CGRect rect = context.frame; - [context.shape addToPath:rect]; - CGContextClip(ctx); - - [self drawContent:rect]; - - CGContextRestoreGState(ctx); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLRequestDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoading { - return !!_request; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoaded { - return nil != _image && _image != _defaultImage; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reload { - if (nil == _request && nil != _urlPath) { - UIImage* image = [[TTURLCache sharedCache] imageForURL:_urlPath]; - - if (nil != image) { - self.image = image; - - } else { - TTURLRequest* request = [TTURLRequest requestWithURL:_urlPath delegate:self]; - request.response = [[[TTURLImageResponse alloc] init] autorelease]; - - if (![request send]) { - // Put the default image in place while waiting for the request to load - if (_defaultImage && nil == self.image) { - self.image = _defaultImage; - } - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)stopLoading { - [_request cancel]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)imageViewDidStartLoad { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)imageViewDidLoadImage:(UIImage*)image { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)imageViewDidFailLoadWithError:(NSError*)error { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)unsetImage { - [self stopLoading]; - self.image = nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDefaultImage:(UIImage*)theDefaultImage { - if (_defaultImage != theDefaultImage) { - [_defaultImage release]; - _defaultImage = [theDefaultImage retain]; - } - if (nil == _urlPath || 0 == _urlPath.length) { - //no url path set yet, so use it as the current image - self.image = _defaultImage; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setUrlPath:(NSString*)urlPath { - // Check for no changes. - if (nil != _image && nil != _urlPath && [urlPath isEqualToString:_urlPath]) { - return; - } - - [self stopLoading]; - - { - NSString* urlPathCopy = [urlPath copy]; - [_urlPath release]; - _urlPath = urlPathCopy; - } - - if (nil == _urlPath || 0 == _urlPath.length) { - // Setting the url path to an empty/nil path, so let's restore the default image. - self.image = _defaultImage; - - } else { - [self reload]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTImageViewInternal.m b/src/Three20UI/Sources/TTImageViewInternal.m deleted file mode 100644 index 7826ce06ea..0000000000 --- a/src/Three20UI/Sources/TTImageViewInternal.m +++ /dev/null @@ -1,115 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTImageViewInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/TTImageViewDelegate.h" -#import "Three20UI/UIViewAdditions.h" - -// UI (private) -#import "Three20UI/private/TTImageLayer.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -TT_FIX_CATEGORY_BUG(TTImageViewInternal) - -@implementation TTImageView (TTInternal) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateLayer { - TTImageLayer* layer = (TTImageLayer*)self.layer; - if (self.style) { - layer.override = nil; - - } else { - // This is dramatically faster than calling drawRect. Since we don't have any styles - // to draw in this case, we can take this shortcut. - layer.override = self; - } - [layer setNeedsDisplay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setImage:(UIImage*)image { - if (image != _image) { - [_image release]; - _image = [image retain]; - - [self updateLayer]; - - CGRect frame = self.frame; - if (_autoresizesToImage) { - self.width = image.size.width; - self.height = image.size.height; - - } else { - // Logical flow: - // If no width or height have been specified, then autoresize to the image. - if (!frame.size.width && !frame.size.height) { - self.width = image.size.width; - self.height = image.size.height; - - // If a width was specified, but no height, then resize the image with the correct aspect - // ratio. - - } else if (frame.size.width && !frame.size.height) { - self.height = floor((image.size.height/image.size.width) * frame.size.width); - - // If a height was specified, but no width, then resize the image with the correct aspect - // ratio. - - } else if (frame.size.height && !frame.size.width) { - self.width = floor((image.size.width/image.size.height) * frame.size.height); - } - - // If both were specified, leave the frame as is. - } - - if (nil == _defaultImage || image != _defaultImage) { - // Only send the notification if there's no default image or this is a new image. - [self imageViewDidLoadImage:image]; - if ([_delegate respondsToSelector:@selector(imageView:didLoadImage:)]) { - [_delegate imageView:self didLoadImage:image]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setStyle:(TTStyle*)style { - if (style != _style) { - [super setStyle:style]; - [self updateLayer]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTLabel.m b/src/Three20UI/Sources/TTLabel.m deleted file mode 100644 index 3a8d3e02e7..0000000000 --- a/src/Three20UI/Sources/TTLabel.m +++ /dev/null @@ -1,169 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTLabel.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTStyle.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLabel - -@synthesize font = _font; -@synthesize text = _text; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithText:(NSString*)text { - if (self = [self init]) { - self.text = text; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _text = nil; - _font = nil; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_text); - TT_RELEASE_SAFELY(_font); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - context.frame = self.bounds; - context.contentFrame = context.frame; - context.font = _font; - - [self.style draw:context]; - if (!context.didDrawContent) { - [self drawContent:self.bounds]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - context.font = _font; - context.frame = CGRectMake(0, 0, size.width, size.height); - context.contentFrame = context.frame; - return [_style addToSize:CGSizeZero context:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAccessibility - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isAccessibilityElement { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString *)accessibilityLabel { - return _text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIAccessibilityTraits)accessibilityTraits { - return [super accessibilityTraits] | UIAccessibilityTraitStaticText; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyleDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)textForLayerWithStyle:(TTStyle*)style { - return self.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - if (!_font) { - _font = [TTSTYLEVAR(font) retain]; - } - return _font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - if (font != _font) { - [_font release]; - _font = [font retain]; - [self setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(NSString*)text { - if (text != _text) { - [_text release]; - _text = [text copy]; - [self setNeedsDisplay]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTLauncherButton.m b/src/Three20UI/Sources/TTLauncherButton.m deleted file mode 100644 index c61c138fb3..0000000000 --- a/src/Three20UI/Sources/TTLauncherButton.m +++ /dev/null @@ -1,262 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTLauncherButton.h" - -// UI -#import "Three20UI/TTLauncherItem.h" -#import "Three20UI/TTLabel.h" -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const NSInteger kMaxBadgeNumber = 99; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTLauncherButton() - -/** - * Adds the badge view to this button and sets its display values. - */ -- (void)updateBadge; - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLauncherButton - -@synthesize item = _item; -@synthesize closeButton = _closeButton; -@synthesize editing = _editing; -@synthesize dragging = _dragging; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithItem:(TTLauncherItem*)item { - if (self = [self init]) { - _item = [item retain]; - - NSString* title = [[NSBundle mainBundle] localizedStringForKey:item.title value:nil table:nil]; - [self setTitle:title forState:UIControlStateNormal]; - [self setImage:item.image forState:UIControlStateNormal]; - - if (item.style) { - [self setStylesWithSelector:item.style]; - - } else { - [self setStylesWithSelector:@"launcherButton:"]; - } - - [self updateBadge]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.isVertical = YES; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_item); - TT_RELEASE_SAFELY(_badge); - TT_RELEASE_SAFELY(_closeButton); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateBadge { - if (_badge == nil && _item.badgeValue != nil) { - _badge = [[TTLabel alloc] init]; - _badge.style = TTSTYLE(largeBadge); - _badge.backgroundColor = [UIColor clearColor]; - _badge.userInteractionEnabled = NO; - [self addSubview:_badge]; - } - - NSString *badgeText = nil; - NSString *badgeValue = _item.badgeValue; - - if (badgeValue != nil) { - NSRange range = [badgeValue rangeOfCharacterFromSet:[[NSCharacterSet decimalDigitCharacterSet] - invertedSet]]; - - if (range.location == NSNotFound && _item.badgeNumber > kMaxBadgeNumber) { - badgeText = [NSString stringWithFormat:@"%d+", kMaxBadgeNumber]; - - } else { - badgeText = badgeValue; - } - } - - _badge.text = badgeText; - _badge.hidden = badgeValue == nil; - [_badge sizeToFit]; - [self setNeedsLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent *)event { - [super touchesBegan:touches withEvent:event]; - [[self nextResponder] touchesBegan:touches withEvent:event]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent *)event { - [super touchesMoved:touches withEvent:event]; - [[self nextResponder] touchesMoved:touches withEvent:event]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent *)event { - [super touchesEnded:touches withEvent:event]; - [[self nextResponder] touchesEnded:touches withEvent:event]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIControl - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isHighlighted { - return !_dragging && [super isHighlighted]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isSelected { - return !_dragging && [super isSelected]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - if (_badge || _closeButton) { - CGRect imageRect = [self rectForImage]; - if (_badge) { - _badge.origin = CGPointMake((imageRect.origin.x - + imageRect.size.width) - - (floor(_badge.width*0.7)), - imageRect.origin.y - (floor(_badge.height*0.25))); - } - - if (_closeButton) { - _closeButton.origin = CGPointMake(imageRect.origin.x - (floor(_closeButton.width*0.4)), - imageRect.origin.y - (floor(_closeButton.height*0.4))); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTButton*)closeButton { - if (!_closeButton && _item.canDelete) { - _closeButton = [[TTButton buttonWithStyle:@"launcherCloseButton:"] retain]; - [_closeButton setImage:@"bundle://Three20.bundle/images/closeButton.png" - forState:UIControlStateNormal]; - _closeButton.size = CGSizeMake(26,29); - _closeButton.isVertical = YES; - } - - return _closeButton; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDragging:(BOOL)dragging { - if (_dragging != dragging) { - _dragging = dragging; - - if (dragging) { - self.transform = CGAffineTransformMakeScale(1.4, 1.4); - self.alpha = 0.7; - - } else { - self.transform = CGAffineTransformIdentity; - self.alpha = 1; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setEditing:(BOOL)editing { - if (_editing != editing) { - _editing = editing; - - if (editing) { - [self addSubview:self.closeButton]; - - } else { - [_closeButton removeFromSuperview]; - TT_RELEASE_SAFELY(_closeButton); - } - } -} - - -@end diff --git a/src/Three20UI/Sources/TTLauncherHighlightView.m b/src/Three20UI/Sources/TTLauncherHighlightView.m deleted file mode 100644 index e7d8992f98..0000000000 --- a/src/Three20UI/Sources/TTLauncherHighlightView.m +++ /dev/null @@ -1,266 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTLauncherHighlightView.h" - -// UI -#import "Three20UI/TTLauncherButton.h" -#import "Three20UI/TTLauncherView.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kHighlightOverlayAlpha = 0.7f; -static const CGFloat kSpotlightScaleFactor = 2.5f; -static const CGFloat kSpotlightBlurInnerAlpha = 0.43f; -static const CGFloat kSpotlightBlurOuterAlpha = 0.7f; // same as kHighlightOverlayAlpha; grr const -static const CGFloat kSpotlightBlurRadius = 120.0f; -static const CGFloat kHighlightTextPadding = 20.0f; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLauncherHighlightView - -@synthesize highlightRect = _highlightRect; -@synthesize parentView = _parentView; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if ((self = [super initWithFrame:frame])) { - self.alpha = 0.0; - - _textLabel = [[UILabel alloc] init]; - _textLabel.lineBreakMode = UILineBreakModeWordWrap; - _textLabel.numberOfLines = 0; - _textLabel.backgroundColor = [UIColor clearColor]; - _textLabel.textAlignment = UITextAlignmentCenter; - _textLabel.textColor = [UIColor whiteColor]; - _textLabel.font = [UIFont boldSystemFontOfSize:17.0f]; - _textLabel.shadowColor = [UIColor blackColor]; - _textLabel.shadowOffset = CGSizeMake(1, 1); - - [self addSubview:_textLabel]; - - CGRect coverFrame = [UIApplication sharedApplication].statusBarFrame; - _statusBarCover = [[UIWindow alloc] initWithFrame:coverFrame]; - _statusBarCover.backgroundColor = [UIColor colorWithWhite:0.0 alpha:kHighlightOverlayAlpha]; - _statusBarCover.windowLevel = UIWindowLevelStatusBar; - _statusBarCover.alpha = 0.0; - _statusBarCover.hidden = NO; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_textLabel); - TT_RELEASE_SAFELY(_statusBarCover); - self.parentView = nil; - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)animateTextIn { - _textLabel.alpha = 0.0; - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - _textLabel.alpha = 1.0; - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutLabel { - CGSize superviewSize = self.superview.bounds.size; - CGFloat width = superviewSize.width - 2 * kHighlightTextPadding; - CGFloat height = [_textLabel.text sizeWithFont:_textLabel.font - constrainedToSize:CGSizeMake(width, superviewSize.height)].height; - - // If the highlighted rect is above center, put the text below it; otherwise, above it. - CGFloat y = 0.0; - if (_highlightRect.origin.y + (_highlightRect.size.height / 2) < superviewSize.height / 2) { - y = _highlightRect.origin.y + _highlightRect.size.height + kHighlightTextPadding; - - } else { - y = _highlightRect.origin.y - height - kHighlightTextPadding; - } - - _textLabel.frame = CGRectMake(kHighlightTextPadding, y, width, height); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHighlightRect:(CGRect)rect { - _highlightRect = rect; - [self layoutLabel]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)text { - return _textLabel.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(NSString*)text { - _textLabel.text = text; - [self layoutLabel]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setAlpha:(CGFloat)alpha { - [super setAlpha:alpha]; - _statusBarCover.alpha = alpha; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)appear:(BOOL)animated { - // The expanded frame needs to be 3.5 times the original size, and the expansion needs to emanate - // from the same center as the highlighted rect - CGRect expandedFrame = self.superview.bounds; - expandedFrame.origin.x = -(_highlightRect.origin.x + _highlightRect.size.width / 2) - * (kSpotlightScaleFactor - 1); - expandedFrame.origin.y = -(_highlightRect.origin.y + _highlightRect.size.height / 2) - * (kSpotlightScaleFactor - 1); - expandedFrame.size.width *= kSpotlightScaleFactor; - expandedFrame.size.height *= kSpotlightScaleFactor; - self.frame = expandedFrame; - self.alpha = 0.0; - _textLabel.alpha = 0.0; - - if (animated) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(animateTextIn)]; - } - self.alpha = 1.0; - self.frame = self.superview.bounds; - _statusBarCover.alpha = 1.0; - - if (animated) { - [UIView commitAnimations]; - - } else { - _textLabel.alpha = 1.0; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isOpaque { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - [[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:kHighlightOverlayAlpha] set]; - UIRectFillUsingBlendMode(rect, kCGBlendModeOverlay); - - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextSetBlendMode(context, kCGBlendModeCopy); - - // Draw the spotlight (more of a Fresnel lens effect but okay I'll stop now) - const CGFloat components[] = {0, 0, 0, kSpotlightBlurInnerAlpha, - 0, 0, 0, kSpotlightBlurOuterAlpha}; - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - CGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, components, NULL, 2); - CGPoint center = CGPointMake(floor(_highlightRect.origin.x + _highlightRect.size.width / 2), - floor(_highlightRect.origin.y + _highlightRect.size.height / 2)); - CGFloat startRadius = MIN(_highlightRect.size.width, _highlightRect.size.height) / 2; - CGFloat endRadius = startRadius + kSpotlightBlurRadius; - CGContextDrawRadialGradient(context, - gradient, - center, startRadius, - center, endRadius, - kCGGradientDrawsAfterEndLocation); - CGColorSpaceRelease(colorSpace); - CGGradientRelease(gradient); - - // Draw the clear circle - CGContextSetRGBFillColor(context, 0, 0, 0, 0); - CGContextFillEllipseInRect(context, _highlightRect); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Overridden so that -hitTest:withEvent: doesn't catch this subview. We can distinguish a user- - * initiated tap from a programmatic hit test by event being nil in the programmatic case. - */ -- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent*)event { - if (event) { - return [super pointInside:point withEvent:event]; - } - - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent*)event { - UITouch* touch = [touches anyObject]; - - // If the user tapped within the highlighted rect, we want to pass the event through to the - // launcher button. - if (CGRectContainsPoint(_highlightRect, [touch locationInView:self])) { - UIView *targetButton = [self.superview hitTest:[touch locationInView:self] withEvent:nil]; - - // This condition should always be true, but just to be safe - if ([targetButton isKindOfClass:[TTLauncherButton class]]) { - [(TTLauncherButton *)targetButton sendActionsForControlEvents:UIControlEventTouchUpInside]; - } - } - - // This will take care of removing the view - [_parentView endHighlightItem:nil]; -} - - -@end diff --git a/src/Three20UI/Sources/TTLauncherItem.m b/src/Three20UI/Sources/TTLauncherItem.m deleted file mode 100644 index 56d576a9fe..0000000000 --- a/src/Three20UI/Sources/TTLauncherItem.m +++ /dev/null @@ -1,141 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTLauncherItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLauncherItem - -@synthesize launcher = _launcher; -@synthesize title = _title; -@synthesize image = _image; -@synthesize URL = _URL; -@synthesize style = _style; -@synthesize badgeValue = _badgeValue; -@synthesize canDelete = _canDelete; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title image:(NSString*)image URL:(NSString*)URL { - if (self = [self initWithTitle:title image:image URL:URL canDelete:NO]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title image:(NSString*)image URL:(NSString*)URL - canDelete:(BOOL)canDelete { - if (self = [super init]) { - _canDelete = canDelete; - - self.title = title; - self.image = image; - self.URL = URL; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_title); - TT_RELEASE_SAFELY(_image); - TT_RELEASE_SAFELY(_URL); - TT_RELEASE_SAFELY(_style); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super init]) { - self.title = [decoder decodeObjectForKey:@"title"]; - self.image = [decoder decodeObjectForKey:@"image"]; - self.URL = [decoder decodeObjectForKey:@"URL"]; - self.style = [decoder decodeObjectForKey:@"style"]; - self.canDelete = [decoder decodeBoolForKey:@"canDelete"]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [encoder encodeObject:_title forKey:@"title"]; - [encoder encodeObject:_image forKey:@"image"]; - [encoder encodeObject:_URL forKey:@"URL"]; - [encoder encodeObject:_style forKey:@"style"]; - [encoder encodeBool:_canDelete forKey:@"canDelete"]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)badgeNumber { - return [self.badgeValue integerValue]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setBadgeNumber:(NSInteger)badgeNumber { - if (badgeNumber == 0) { - [self setBadgeValue:nil]; - - } else { - [self setBadgeValue:[NSString stringWithFormat:@"%d",badgeNumber]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setBadgeValue:(NSString *)badgeValue { - if (_badgeValue != badgeValue) { - [_badgeValue release]; - _badgeValue = [badgeValue copy]; - } - - [_launcher performSelector:@selector(updateItemBadge:) withObject:self]; -} - -@end diff --git a/src/Three20UI/Sources/TTLauncherScrollView.m b/src/Three20UI/Sources/TTLauncherScrollView.m deleted file mode 100644 index 38a6b18d36..0000000000 --- a/src/Three20UI/Sources/TTLauncherScrollView.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTLauncherScrollView.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLauncherScrollView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)touchesShouldCancelInContentView:(UIView *)view { - return !self.delaysContentTouches; -} - - -@end diff --git a/src/Three20UI/Sources/TTLauncherView.m b/src/Three20UI/Sources/TTLauncherView.m deleted file mode 100644 index f8095aa7bf..0000000000 --- a/src/Three20UI/Sources/TTLauncherView.m +++ /dev/null @@ -1,1025 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTLauncherView.h" - -// UI -#import "Three20UI/TTLauncherButton.h" -#import "Three20UI/TTLauncherItem.h" -#import "Three20UI/TTLauncherViewDelegate.h" -#import "Three20UI/TTPageControl.h" -#import "Three20UI/UIViewAdditions.h" - -// UI (private) -#import "Three20UI/private/TTLauncherScrollView.h" -#import "Three20UI/private/TTLauncherHighlightView.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" - -// Network -#import "Three20Network/TTURLRequest.h" -#import "Three20Network/TTUserInfo.h" - -// Core -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" -#import "Three20Core/TTGlobalCoreRects.h" - -static const CGFloat kMargin = 0; -static const CGFloat kPadding = 0; -static const CGFloat kPromptMargin = 40; -static const CGFloat kPagerHeight = 20; -static const CGFloat kWobbleRadians = 1.5; -static const CGFloat kSpringLoadFraction = 0.18; - -static const NSTimeInterval kEditHoldTimeInterval = 1; -static const NSTimeInterval kSpringLoadTimeInterval = 0.5; -static const NSTimeInterval kWobbleTime = 0.07; - -static const NSInteger kPromptTag = 997; - -static const NSInteger kDefaultColumnCount = 3; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLauncherView - -@synthesize columnCount = _columnCount; -@synthesize pager = _pager; -@synthesize prompt = _prompt; -@synthesize editing = _editing; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _scrollView = [[TTLauncherScrollView alloc] initWithFrame: - CGRectMake(0, 0, self.width, self.height - kPagerHeight)]; - _scrollView.delegate = self; - _scrollView.scrollsToTop = NO; - _scrollView.showsVerticalScrollIndicator = NO; - _scrollView.showsHorizontalScrollIndicator = NO; - _scrollView.alwaysBounceHorizontal = YES; - _scrollView.pagingEnabled = YES; - _scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; - _scrollView.delaysContentTouches = NO; - _scrollView.multipleTouchEnabled = NO; - [self addSubview:_scrollView]; - - _pager = [[TTPageControl alloc] init]; - _pager.dotStyle = @"launcherPageDot:"; - _pager.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin - |UIViewAutoresizingFlexibleRightMargin - |UIViewAutoresizingFlexibleBottomMargin; - [_pager addTarget:self action:@selector(pageChanged) - forControlEvents:UIControlEventValueChanged]; - [self addSubview:_pager]; - - self.autoresizesSubviews = YES; - self.columnCount = kDefaultColumnCount; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - for (NSArray* page in _pages) { - for (TTLauncherItem* item in page) { - item.launcher = nil; - } - } - - _scrollView.delegate = nil; - - TT_INVALIDATE_TIMER(_editHoldTimer); - TT_INVALIDATE_TIMER(_springLoadTimer); - TT_RELEASE_SAFELY(_pages); - TT_RELEASE_SAFELY(_buttons); - TT_RELEASE_SAFELY(_scrollView); - TT_RELEASE_SAFELY(_pager); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)rowHeight { - return round(_scrollView.height / 3); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTLauncherButton*)buttonForItem:(TTLauncherItem*)item { - NSIndexPath* path = [self indexPathOfItem:item]; - if (path) { - NSInteger pageIndex = [path indexAtPosition:0]; - NSArray* buttonPage = [_buttons objectAtIndex:pageIndex]; - - NSInteger itemIndex = [path indexAtPosition:1]; - return [buttonPage objectAtIndex:itemIndex]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableArray*)pageWithItem:(TTLauncherItem*)item { - for (NSMutableArray* page in _pages) { - NSUInteger itemIndex = [page indexOfObject:item]; - if (itemIndex != NSNotFound) { - return page; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableArray*)pageWithButton:(TTLauncherButton*)button { - NSIndexPath* path = [self indexPathOfItem:button.item]; - if (path) { - NSInteger pageIndex = [path indexAtPosition:0]; - return [_buttons objectAtIndex:pageIndex]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableArray*)pageWithFreeSpace:(NSInteger)pageIndex { - for (NSInteger i = self.currentPageIndex; i < _pages.count; ++i) { - NSMutableArray* page = [_pages objectAtIndex:i]; - if (page.count < self.columnCount*self.rowCount) { - return page; - } - } - - NSMutableArray* page = [NSMutableArray array]; - [_pages addObject:page]; - return page; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateItemBadge:(TTLauncherItem*)item { - TTLauncherButton* button = [self buttonForItem:item]; - [button performSelector:@selector(updateBadge)]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateContentSize:(NSInteger)numberOfPages { - _scrollView.contentSize = CGSizeMake(numberOfPages*_scrollView.width, _scrollView.height); - if (numberOfPages != _pager.numberOfPages) { - _pager.numberOfPages = numberOfPages; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updatePagerWithContentOffset:(CGPoint)contentOffset { - CGFloat pageWidth = _scrollView.width; - _pager.currentPage = floor((contentOffset.x - pageWidth / 2) / pageWidth) + 1; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showPrompt { - CGRect boxFrame = CGRectMake(_scrollView.width, 0, _scrollView.width, _scrollView.height); - CGRect labelFrame = CGRectInset(boxFrame, kPromptMargin, kPromptMargin); - UILabel* label = [[[UILabel alloc] initWithFrame:labelFrame] autorelease]; - label.tag = kPromptTag; - label.text = _prompt; - label.font = [UIFont boldSystemFontOfSize:17]; - label.backgroundColor = [UIColor clearColor]; - label.textColor = RGBCOLOR(81,95,122); - label.shadowColor = [[UIColor whiteColor] colorWithAlphaComponent:0.6]; - label.shadowOffset = CGSizeMake(0,1); - label.textAlignment = UITextAlignmentCenter; - label.numberOfLines = 0; - [_scrollView addSubview:label]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTLauncherButton*)addButtonWithItem:(TTLauncherItem*)item { - TTLauncherButton* button = [[[TTLauncherButton alloc] initWithItem:item] autorelease]; - - [button addTarget:self action:@selector(buttonTouchedUpInside:) - forControlEvents:UIControlEventTouchUpInside]; - [button addTarget:self action:@selector(buttonTouchedUpOutside:) - forControlEvents:UIControlEventTouchUpOutside]; - [button addTarget:self action:@selector(buttonTouchedDown:withEvent:) - forControlEvents:UIControlEventTouchDown]; - - [_scrollView addSubview:button]; - return button; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutButtons { - [self layoutIfNeeded]; - - CGFloat buttonWidth = ceil((self.width - - (kMargin*2 + kPadding*(self.columnCount-1))) / self.columnCount); - CGFloat buttonHeight = [self rowHeight]; - CGFloat pageWidth = _scrollView.width; - - CGFloat x = kMargin, minX = 0; - for (NSMutableArray* buttonPage in _buttons) { - CGFloat y = kMargin; - for (TTLauncherButton* button in buttonPage) { - CGRect frame = CGRectMake(x, y, buttonWidth, buttonHeight); - if (!button.dragging) { - button.transform = CGAffineTransformIdentity; - button.frame = button == _dragButton ? [_scrollView convertRect:frame toView:self] : frame; - } - x += buttonWidth + kPadding; - if (x >= minX+pageWidth) { - y += buttonHeight + kPadding; - x = minX+kMargin; - } - } - - minX += pageWidth; - x = minX; - } - - NSInteger numberOfPages = _pages.count; - if (numberOfPages == 1 && _prompt) { - [self showPrompt]; - ++numberOfPages; - } - - [self updateContentSize:numberOfPages]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)recreateButtons { - [self layoutIfNeeded]; - [_scrollView removeAllSubviews]; - - [_buttons release]; - _buttons = [[NSMutableArray alloc] init]; - - for (NSArray* page in _pages) { - NSMutableArray* buttonPage = [NSMutableArray array]; - [_buttons addObject:buttonPage]; - - for (TTLauncherItem* item in page) { - TTLauncherButton* button = [self addButtonWithItem:item]; - [buttonPage addObject:button]; - } - } - - [self layoutButtons]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)checkButtonOverflow:(NSInteger)pageIndex { - NSMutableArray* buttonPage = [_buttons objectAtIndex:pageIndex]; - NSInteger maxButtonsPerPage = self.columnCount*self.rowCount; - if (buttonPage.count > maxButtonsPerPage) { - BOOL isLastPage = pageIndex == _buttons.count-1; - - NSMutableArray* itemsPage = [_pages objectAtIndex:pageIndex]; - - NSMutableArray* nextButtonPage = nil; - NSMutableArray* nextItemsPage = nil; - if (isLastPage) { - nextButtonPage = [NSMutableArray array]; - [_buttons addObject:nextButtonPage]; - nextItemsPage = [NSMutableArray array]; - [_pages addObject:nextItemsPage]; - - } else { - nextButtonPage = [_buttons objectAtIndex:pageIndex+1]; - nextItemsPage = [_pages objectAtIndex:pageIndex+1]; - } - - while (buttonPage.count > maxButtonsPerPage) { - [nextButtonPage insertObject:[buttonPage lastObject] atIndex:0]; - [buttonPage removeLastObject]; - [nextItemsPage insertObject:[itemsPage lastObject] atIndex:0]; - [itemsPage removeLastObject]; - } - - if (pageIndex+1 < _buttons.count) { - [self checkButtonOverflow:pageIndex+1]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)startDraggingButton:(TTLauncherButton*)button withEvent:(UIEvent*)event { - TT_INVALIDATE_TIMER(_springLoadTimer); - - if (button) { - button.transform = CGAffineTransformIdentity; - [self addSubview:button]; - button.origin = [_scrollView convertPoint:button.origin toView:self]; - [button layoutIfNeeded]; - } - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - - if (_dragButton) { - _dragButton.selected = NO; - _dragButton.highlighted = NO; - _dragButton.dragging = NO; - [self layoutButtons]; - } - - if (button) { - _dragButton = button; - - NSIndexPath* indexPath = [self indexPathOfItem:button.item]; - _positionOrigin = [indexPath indexAtPosition:1]; - - UITouch* touch = [[event allTouches] anyObject]; - _touchOrigin = [touch locationInView:_scrollView]; - _dragOrigin = button.center; - _dragTouch = touch; - - button.dragging = YES; - - _scrollView.scrollEnabled = NO; - - } else { - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(releaseButtonDidStop)]; - _scrollView.scrollEnabled = YES; - } - - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeButtonAnimationDidStop:(NSString*)animationID finished:(NSNumber*)finished - context:(void*)context { - TTLauncherButton* button = context; - [button removeFromSuperview]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)springLoadTimer:(NSTimer*)timer { - _springLoadTimer = nil; - - if ([(NSNumber*)timer.userInfo boolValue]) { - CGFloat newX = _scrollView.contentOffset.x - _scrollView.width; - if (newX >= 0) { - CGPoint offset = CGPointMake(newX, 0); - [_scrollView setContentOffset:offset animated:YES]; - [self updatePagerWithContentOffset:offset]; - _dragOrigin.x += _scrollView.width; - _positionOrigin = -1; - _springing = YES; - [self performSelector:@selector(springingDidStop) withObject:nil afterDelay:0.3]; - } - - } else { - CGFloat newX = _scrollView.contentOffset.x + _scrollView.width; - if (newX <= _scrollView.contentSize.width - _scrollView.width) { - CGPoint offset = CGPointMake(newX, 0); - [_scrollView setContentOffset:offset animated:YES]; - [self updatePagerWithContentOffset:offset]; - _dragOrigin.x -= _scrollView.width; - _positionOrigin = -1; - _springing = YES; - [self performSelector:@selector(springingDidStop) withObject:nil afterDelay:0.3]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)springingDidStop { - _springing = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)releaseButtonDidStop { - [_scrollView addSubview:_dragButton]; - _dragButton.origin = [self convertPoint:_dragButton.origin toView:_scrollView]; - _dragButton = nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)buttonTouchedUpInside:(TTLauncherButton*)button { - if (_editing) { - if (button == _dragButton) { - [self startDraggingButton:nil withEvent:nil]; - } - - } else { - TT_INVALIDATE_TIMER(_editHoldTimer); - [button setSelected:YES]; - [self performSelector:@selector(deselectButton:) withObject:button - afterDelay:TT_TRANSITION_DURATION]; - NSString* URL = button.item.URL; - if (URL) { - if ([_delegate respondsToSelector:@selector(launcherView:didSelectItem:)]) { - [_delegate launcherView:self didSelectItem:button.item]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)buttonTouchedUpOutside:(TTLauncherButton*)button { - if (_editing) { - if (button == _dragButton) { - [self startDraggingButton:nil withEvent:nil]; - } - - } else { - TT_INVALIDATE_TIMER(_editHoldTimer); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)buttonTouchedDown:(TTLauncherButton*)button withEvent:(UIEvent*)event { - if (_editing) { - if (!_dragButton) { - [self startDraggingButton:button withEvent:event]; - } - - } else { - TT_INVALIDATE_TIMER(_editHoldTimer); - - _editHoldTimer = [NSTimer scheduledTimerWithTimeInterval:kEditHoldTimeInterval - target:self selector:@selector(editHoldTimer:) - userInfo:[TTUserInfo topic:nil strongRef:event weakRef:button] - repeats:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)closeButtonTouchedUpInside:(TTButton*)closeButton { - for (NSArray* buttonPage in _buttons) { - for (TTLauncherButton* button in buttonPage) { - if (button.closeButton == closeButton) { - [self removeItem:button.item animated:YES]; - return; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)wobble { - static BOOL wobblesLeft = NO; - - if (_editing) { - CGFloat rotation = (kWobbleRadians * M_PI) / 180.0; - CGAffineTransform wobbleLeft = CGAffineTransformMakeRotation(rotation); - CGAffineTransform wobbleRight = CGAffineTransformMakeRotation(-rotation); - - [UIView beginAnimations:nil context:nil]; - - NSInteger i = 0; - NSInteger nWobblyButtons = 0; - for (NSArray* buttonPage in _buttons) { - for (TTLauncherButton* button in buttonPage) { - if (button != _dragButton) { - ++nWobblyButtons; - if (i % 2) { - button.transform = wobblesLeft ? wobbleRight : wobbleLeft; - - } else { - button.transform = wobblesLeft ? wobbleLeft : wobbleRight; - } - } - ++i; - } - } - - if (nWobblyButtons >= 1) { - [UIView setAnimationDuration:kWobbleTime]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(wobble)]; - wobblesLeft = !wobblesLeft; - - } else { - [NSObject cancelPreviousPerformRequestsWithTarget:self]; - [self performSelector:@selector(wobble) withObject:nil afterDelay:kWobbleTime]; - } - - [UIView commitAnimations]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)editHoldTimer:(NSTimer*)timer { - _editHoldTimer = nil; - [self beginEditing]; - - TTUserInfo* info = timer.userInfo; - TTLauncherButton* button = info.weakRef; - UIEvent* event = info.strongRef; - - button.selected = NO; - button.highlighted = NO; - [self startDraggingButton:button withEvent:event]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)deselectButton:(TTLauncherButton*)button { - [button setSelected:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endEditingAnimationDidStop:(NSString*)animationID finished:(NSNumber*)finished - context:(void*)context { - for (NSArray* buttonPage in _buttons) { - for (TTLauncherButton* button in buttonPage) { - button.editing = NO; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateTouch { - CGPoint origin = [_dragTouch locationInView:_scrollView]; - _dragButton.center = CGPointMake(_dragOrigin.x + (origin.x - _touchOrigin.x), - _dragOrigin.y + (origin.y - _touchOrigin.y)); - - CGFloat x = origin.x - _scrollView.contentOffset.x; - NSInteger column = round(x/_dragButton.width); - NSInteger row = round(origin.y/_dragButton.height); - NSInteger itemIndex = (row * self.columnCount) + column; - NSInteger pageIndex = floor(_scrollView.contentOffset.x/_scrollView.width); - - if (itemIndex != _positionOrigin) { - NSMutableArray* currentButtonPage = [_buttons objectAtIndex:pageIndex]; - if (itemIndex > currentButtonPage.count) { - itemIndex = currentButtonPage.count; - } - - if (itemIndex != _positionOrigin) { - [[_dragButton retain] autorelease]; - - NSMutableArray* itemPage = [self pageWithItem:_dragButton.item]; - NSMutableArray* buttonPage = [self pageWithButton:_dragButton]; - [itemPage removeObject:_dragButton.item]; - [buttonPage removeObject:_dragButton]; - - if (itemIndex > currentButtonPage.count) { - itemIndex = currentButtonPage.count; - } - - BOOL didMove = itemIndex != _positionOrigin; - - NSMutableArray* currentItemPage = [_pages objectAtIndex:pageIndex]; - [currentItemPage insertObject:_dragButton.item atIndex:itemIndex]; - [currentButtonPage insertObject:_dragButton atIndex:itemIndex]; - _positionOrigin = itemIndex; - - [self checkButtonOverflow:pageIndex]; - if (didMove) { - if ([_delegate respondsToSelector:@selector(launcherView:didMoveItem:)]) { - [_delegate launcherView:self didMoveItem:_dragButton.item]; - } - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [self layoutButtons]; - [UIView commitAnimations]; - } - } - } - - CGFloat springLoadDistance = _dragButton.width*kSpringLoadFraction; - TTDCONDITIONLOG(TTDFLAG_LAUNCHERVIEW, @"%f < %f", springLoadDistance, _dragButton.center.x); - BOOL goToPreviousPage = _dragButton.center.x - springLoadDistance < 0; - BOOL goToNextPage = ((_scrollView.width - _dragButton.center.x) - springLoadDistance) < 0; - if (goToPreviousPage || goToNextPage) { - if (!_springLoadTimer) { - _springLoadTimer = [NSTimer scheduledTimerWithTimeInterval:kSpringLoadTimeInterval - target:self selector:@selector(springLoadTimer:) - userInfo:[NSNumber numberWithBool:goToPreviousPage] repeats:NO]; - } - - } else { - TT_INVALIDATE_TIMER(_springLoadTimer); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent *)event { - [super touchesMoved:touches withEvent:event]; - if (_dragButton && !_springing) { - for (UITouch* touch in touches) { - if (touch == _dragTouch) { - [self updateTouch]; - break; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent *)event { - [super touchesEnded:touches withEvent:event]; - - if (_dragTouch) { - for (UITouch* touch in touches) { - if (touch == _dragTouch) { - - // New delegate method - if ([_delegate respondsToSelector:@selector(launcherViewDidEndDragging:)]) { - [_delegate launcherViewDidEndDragging:self]; - } - - _dragTouch = nil; - break; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFrame:(CGRect)newFrame { - [super setFrame:newFrame]; - [self layoutButtons]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - _pager.frame = CGRectMake(0, _scrollView.height, self.width, kPagerHeight); - - if (!_buttons) { - [self recreateButtons]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIScrollViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewWillBeginDragging:(UIScrollView*)scrollView { - TT_INVALIDATE_TIMER(_editHoldTimer); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { - [self updatePagerWithContentOffset:_scrollView.contentOffset]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIPageControlDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)pageChanged { - _scrollView.contentOffset = CGPointMake(_pager.currentPage * _scrollView.width, 0); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSArray*)pages { - return _pages; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPages:(NSArray*)pages { - for (NSArray* page in _pages) { - for (TTLauncherItem* item in page) { - item.launcher = nil; - } - } - - [_pages release]; - _pages = [[NSMutableArray alloc] init]; - - for (NSArray* page in pages) { - NSMutableArray* pageCopy = [page mutableCopy]; - [_pages addObject:pageCopy]; - for (TTLauncherItem* item in pageCopy) { - item.launcher = self; - } - [pageCopy release]; - } - - TT_RELEASE_SAFELY(_buttons); - [self setNeedsLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setColumnCount:(NSInteger)columnCount { - if (_columnCount != columnCount) { - _columnCount = columnCount; - _rowCount = 0; - TT_RELEASE_SAFELY(_buttons); - [self setNeedsLayout]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)rowCount { - if (!_rowCount) { - _rowCount = floor(self.height / [self rowHeight]); - } - return _rowCount; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)currentPageIndex { - return floor(_scrollView.contentOffset.x/_scrollView.width); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setCurrentPageIndex:(NSInteger)pageIndex { - _scrollView.contentOffset = CGPointMake(_scrollView.width*pageIndex, 0); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addItem:(TTLauncherItem*)item animated:(BOOL)animated { - if (![self itemWithURL:item.URL]) { - item.launcher = self; - - if (!_pages) { - _pages = [[NSMutableArray arrayWithObject:[NSMutableArray arrayWithObject:item]] retain]; - - } else { - NSMutableArray* page = [self pageWithFreeSpace:self.currentPageIndex]; - [page addObject:item]; - } - - if ([_delegate respondsToSelector:@selector(launcherView:didAddItem:)]) { - [_delegate launcherView:self didAddItem:item]; - } - - if (_buttons) { - [self recreateButtons]; - } - - [self scrollToItem:item animated:animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeItem:(TTLauncherItem*)item animated:(BOOL)animated { - NSMutableArray* itemPage = [self pageWithItem:item]; - if (itemPage) { - TTLauncherButton* button = [self buttonForItem:item]; - NSMutableArray* buttonPage = [self pageWithButton:button]; - - item.launcher = nil; - [itemPage removeObject:button.item]; - - if (buttonPage) { - [buttonPage removeObject:button]; - - if (animated) { - [UIView beginAnimations:nil context:button]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector: - @selector(removeButtonAnimationDidStop:finished:context:)]; - [self layoutButtons]; - button.transform = CGAffineTransformMakeScale(0.01, 0.01); - button.alpha = 0; - [UIView commitAnimations]; - - } else { - [button removeFromSuperview]; - [self layoutButtons]; - } - } - - if ([_delegate respondsToSelector:@selector(launcherView:didRemoveItem:)]) { - [_delegate launcherView:self didRemoveItem:item]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTLauncherItem*)itemWithURL:(NSString*)URL { - for (NSArray* page in _pages) { - for (TTLauncherItem* item in page) { - if ([item.URL isEqualToString:URL]) { - return item; - } - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSIndexPath*)indexPathOfItem:(TTLauncherItem*)item { - for (NSUInteger pageIndex = 0; pageIndex < _pages.count; ++pageIndex) { - NSArray* page = [_pages objectAtIndex:pageIndex]; - NSUInteger itemIndex = [page indexOfObject:item]; - if (itemIndex != NSNotFound) { - NSUInteger path[] = {pageIndex, itemIndex}; - return [NSIndexPath indexPathWithIndexes:path length:2]; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollToItem:(TTLauncherItem*)item animated:(BOOL)animated { - NSIndexPath* path = [self indexPathOfItem:item]; - if (path) { - NSUInteger page = [path indexAtPosition:0]; - CGFloat x = page * _scrollView.width; - [_scrollView setContentOffset:CGPointMake(x, 0) animated:animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)beginEditing { - _editing = YES; - _scrollView.delaysContentTouches = YES; - - UIView* prompt = [self viewWithTag:kPromptTag]; - [prompt removeFromSuperview]; - - for (NSArray* buttonPage in _buttons) { - for (TTLauncherButton* button in buttonPage) { - button.editing = YES; - [button.closeButton addTarget:self action:@selector(closeButtonTouchedUpInside:) - forControlEvents:UIControlEventTouchUpInside]; - } - } - - // Add a page at the end - [_pages addObject:[NSMutableArray array]]; - [_buttons addObject:[NSMutableArray array]]; - [self updateContentSize:_pages.count]; - - [self wobble]; - - if ([_delegate respondsToSelector:@selector(launcherViewDidBeginEditing:)]) { - [_delegate launcherViewDidBeginEditing:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endEditing { - _editing = NO; - _scrollView.delaysContentTouches = NO; - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(endEditingAnimationDidStop:finished:context:)]; - - for (NSArray* buttonPage in _buttons) { - for (TTLauncherButton* button in buttonPage) { - button.transform = CGAffineTransformIdentity; - button.closeButton.alpha = 0; - } - } - - [UIView commitAnimations]; - - for (NSInteger i = 0; i < _pages.count; ++i) { - NSArray* page = [_pages objectAtIndex:i]; - if (!page.count) { - [_pages removeObjectAtIndex:i]; - [_buttons removeObjectAtIndex:i]; - --i; - } - } - - [self layoutButtons]; - - if ([_delegate respondsToSelector:@selector(launcherViewDidEndEditing:)]) { - [_delegate launcherViewDidEndEditing:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)beginHighlightItem:(TTLauncherItem*)item withText:(NSString*)text { - if (nil == _highlightView) { - _highlightView = [[TTLauncherHighlightView alloc] initWithFrame:CGRectZero]; - _highlightView.parentView = self; - [self.window addSubview:_highlightView]; - } - - TTLauncherButton* button = [self buttonForItem:item]; - _highlightView.text = text; - _highlightView.highlightRect = TTRectInset([self.window convertRect:button.frame - fromView:_scrollView], - UIEdgeInsetsMake(8.0, 2.0, -4.0, 2.0)); - [_highlightView setNeedsDisplay]; - [_highlightView appear:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endHighlightItem:(TTLauncherItem*)item { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(highlightEndDidFinish)]; - _highlightView.alpha = 0.0; - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)highlightEndDidFinish { - [_highlightView removeFromSuperview]; - TT_RELEASE_SAFELY(_highlightView); -} - - -@end diff --git a/src/Three20UI/Sources/TTLink.m b/src/Three20UI/Sources/TTLink.m deleted file mode 100644 index c79a0847e0..0000000000 --- a/src/Three20UI/Sources/TTLink.m +++ /dev/null @@ -1,137 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTLink.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTView.h" - -// UINavigator -#import "Three20UINavigator/TTURLAction.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" -#import "Three20Style/TTShape.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTLink - -@synthesize URLAction = _URLAction; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.userInteractionEnabled = NO; - [self addTarget: self - action: @selector(linkTouched) forControlEvents:UIControlEventTouchUpInside]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_URLAction); - TT_RELEASE_SAFELY(_screenView); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)linkTouched { - [[TTBaseNavigator navigatorForView:self] openURLAction:_URLAction]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIControl - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHighlighted:(BOOL)highlighted { - [super setHighlighted:highlighted]; - if (highlighted) { - if (!_screenView) { - _screenView = [[TTView alloc] initWithFrame:self.bounds]; - _screenView.style = TTSTYLE(linkHighlighted); - _screenView.backgroundColor = [UIColor clearColor]; - _screenView.userInteractionEnabled = NO; - [self addSubview:_screenView]; - } - - _screenView.frame = self.bounds; - _screenView.hidden = NO; - - } else { - _screenView.hidden = YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event { - if ([self pointInside:[touch locationInView:self] withEvent:event]) { - return YES; - - } else { - self.highlighted = NO; - return NO; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setURLAction:(TTURLAction*)URLAction { - [URLAction retain]; - [_URLAction release]; - _URLAction = URLAction; - - self.userInteractionEnabled = !!URLAction; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)URL { - return _URLAction.urlPath; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setURL:(id)URL { - self.URLAction = [[TTURLAction actionWithURLPath:URL] applyAnimated:YES]; -} - - -@end diff --git a/src/Three20UI/Sources/TTListDataSource.m b/src/Three20UI/Sources/TTListDataSource.m deleted file mode 100644 index 2353fa3b96..0000000000 --- a/src/Three20UI/Sources/TTListDataSource.m +++ /dev/null @@ -1,145 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTListDataSource.h" - -// UI -#import "Three20UI/TTTableItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTListDataSource - -@synthesize items = _items; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithItems:(NSArray*)items { - if (self = [self init]) { - _items = [items mutableCopy]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_items); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTListDataSource*)dataSourceWithObjects:(id)object,... { - NSMutableArray* items = [NSMutableArray array]; - va_list ap; - va_start(ap, object); - while (object) { - [items addObject:object]; - object = va_arg(ap, id); - } - va_end(ap); - - return [[[self alloc] initWithItems:items] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTListDataSource*)dataSourceWithItems:(NSMutableArray*)items { - return [[[self alloc] initWithItems:items] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return _items.count; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)tableView:(UITableView*)tableView objectForRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.row < _items.count) { - return [_items objectAtIndex:indexPath.row]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSIndexPath*)tableView:(UITableView*)tableView indexPathForObject:(id)object { - NSUInteger objectIndex = [_items indexOfObject:object]; - if (objectIndex != NSNotFound) { - return [NSIndexPath indexPathForRow:objectIndex inSection:0]; - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableArray*)items { - if (!_items) { - _items = [[NSMutableArray alloc] init]; - } - return _items; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSIndexPath*)indexPathOfItemWithUserInfo:(id)userInfo { - for (NSInteger i = 0; i < _items.count; ++i) { - TTTableItem* item = [_items objectAtIndex:i]; - if (item.userInfo == userInfo) { - return [NSIndexPath indexPathForRow:i inSection:0]; - } - } - return nil; -} - - -@end diff --git a/src/Three20UI/Sources/TTMessageController.m b/src/Three20UI/Sources/TTMessageController.m deleted file mode 100644 index b2a117cba3..0000000000 --- a/src/Three20UI/Sources/TTMessageController.m +++ /dev/null @@ -1,799 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTMessageController.h" - -// UI -#import "Three20UI/TTMessageControllerDelegate.h" -#import "Three20UI/TTMessageRecipientField.h" -#import "Three20UI/TTMessageTextField.h" -#import "Three20UI/TTMessageSubjectField.h" -#import "Three20UI/TTActivityLabel.h" -#import "Three20UI/TTPickerTextField.h" -#import "Three20UI/TTTextEditor.h" -#import "Three20UI/TTTableViewDataSource.h" -#import "Three20UI/UIViewAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreLocale.h" -#import "Three20Core/TTGlobalCoreRects.h" -#import "Three20Core/NSStringAdditions.h" -#import "Three20Core/TTGlobalCore.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTMessageController - -@synthesize fields = _fields; -@synthesize isModified = _isModified; -@synthesize showsRecipientPicker = _showsRecipientPicker; -@synthesize requireNonEmptyMessageBody = _requireNonEmptyMessageBody; -@synthesize dataSource = _dataSource; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _fields = [[NSArray alloc] initWithObjects: - [[[TTMessageRecipientField alloc] initWithTitle: TTLocalizedString(@"To:", @"") - required: YES] autorelease], - [[[TTMessageSubjectField alloc] initWithTitle: TTLocalizedString(@"Subject:", @"") - required: NO] autorelease], - nil]; - - self.title = TTLocalizedString(@"New Message", @""); - - self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] - initWithTitle: TTLocalizedString(@"Cancel", @"") - style: UIBarButtonItemStyleBordered - target: self - action: @selector(cancel)] autorelease]; - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] - initWithTitle: TTLocalizedString(@"Send", @"") - style: UIBarButtonItemStyleDone - target: self - action: @selector(send)] autorelease]; - self.navigationItem.rightBarButtonItem.enabled = NO; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithRecipients:(NSArray*)recipients { - if (self = [self initWithNibName:nil bundle:nil]) { - _initialRecipients = [recipients retain]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_dataSource); - TT_RELEASE_SAFELY(_fields); - TT_RELEASE_SAFELY(_initialRecipients); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { - [self cancel:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createFieldViews { - for (UIView* view in _fieldViews) { - [view removeFromSuperview]; - } - - [_textEditor removeFromSuperview]; - - [_fieldViews release]; - _fieldViews = [[NSMutableArray alloc] init]; - - for (TTMessageField* field in _fields) { - TTPickerTextField* textField = [field createViewForController:self]; - if (textField) { - textField.delegate = self; - textField.backgroundColor = TTSTYLEVAR(backgroundColor); - textField.font = TTSTYLEVAR(messageFont); - textField.returnKeyType = UIReturnKeyNext; - textField.autoresizingMask = UIViewAutoresizingFlexibleWidth; - [textField sizeToFit]; - - UILabel* label = [[[UILabel alloc] init] autorelease]; - label.text = field.title; - label.font = TTSTYLEVAR(messageFont); - label.textColor = TTSTYLEVAR(messageFieldTextColor); - [label sizeToFit]; - label.frame = CGRectInset(label.frame, -2, 0); - textField.leftView = label; - textField.leftViewMode = UITextFieldViewModeAlways; - - [_scrollView addSubview:textField]; - [_fieldViews addObject:textField]; - - UIView* separator = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 1)] autorelease]; - separator.backgroundColor = TTSTYLEVAR(messageFieldSeparatorColor); - separator.autoresizingMask = UIViewAutoresizingFlexibleWidth; - [_scrollView addSubview:separator]; - } - } - - [_scrollView addSubview:_textEditor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutViews { - CGFloat y = 0; - - for (UIView* view in _scrollView.subviews) { - view.frame = CGRectMake(0, y, self.view.width, view.height); - y += view.height; - } - - _scrollView.contentSize = CGSizeMake(_scrollView.width, y); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasEnteredText { - for (int i = 0; i < _fields.count; ++i) { - TTMessageField* field = [_fields objectAtIndex:i]; - if (field.required) { - if ([field isKindOfClass:[TTMessageRecipientField class]]) { - TTPickerTextField* textField = [_fieldViews objectAtIndex:i]; - if (textField.cells.count) { - return YES; - } - - } else if ([field isKindOfClass:[TTMessageTextField class]]) { - UITextField* textField = [_fieldViews objectAtIndex:i]; - if (TTIsStringWithAnyText(textField.text) - && !textField.text.isWhitespaceAndNewlines) { - return YES; - } - } - } - } - - return _textEditor.text.length; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasRequiredText { - if (_requireNonEmptyMessageBody && [_textEditor.text isWhitespaceAndNewlines]) { - return NO; - } - - for (int i = 0; i < _fields.count; ++i) { - TTMessageField* field = [_fields objectAtIndex:i]; - if (field.required) { - if ([field isKindOfClass:[TTMessageRecipientField class]]) { - TTPickerTextField* textField = [_fieldViews objectAtIndex:i]; - if (!textField.cells.count) { - return NO; - } - - } else if ([field isKindOfClass:[TTMessageTextField class]]) { - UITextField* textField = [_fieldViews objectAtIndex:i]; - if (0 == textField.text.length || textField.text.isWhitespaceAndNewlines) { - return NO; - } - } - } - } - - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateSendCommand { - self.navigationItem.rightBarButtonItem.enabled = [self hasRequiredText]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITextField*)subjectField { - for (int i = 0; i < _fields.count; ++i) { - TTMessageField* field = [_fields objectAtIndex:i]; - if ([field isKindOfClass:[TTMessageSubjectField class]]) { - return [_fieldViews objectAtIndex:i]; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTitleToSubject { - UITextField* subjectField = self.subjectField; - if (subjectField) { - self.navigationItem.title = subjectField.text; - } - [self updateSendCommand]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)fieldIndexOfFirstResponder { - NSInteger fieldIndex = 0; - for (UIView* view in _fieldViews) { - if ([view isFirstResponder]) { - return fieldIndex; - } - ++fieldIndex; - } - - if (_textEditor.isFirstResponder) { - return _fieldViews.count; - } - return -1; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFieldIndexOfFirstResponder:(NSInteger)fieldIndex { - if (fieldIndex < _fieldViews.count) { - UIView* view = [_fieldViews objectAtIndex:fieldIndex]; - [view becomeFirstResponder]; - - } else { - [_textEditor becomeFirstResponder]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showRecipientPicker { - [self messageWillShowRecipientPicker]; - - if ([_delegate respondsToSelector:@selector(composeControllerShowRecipientPicker:)]) { - [_delegate composeControllerShowRecipientPicker:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - [super loadView]; - self.view.backgroundColor = TTSTYLEVAR(backgroundColor); - - _scrollView = [[[UIScrollView class] alloc] initWithFrame:TTKeyboardNavigationFrame()]; - _scrollView.backgroundColor = TTSTYLEVAR(backgroundColor); - _scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; - _scrollView.canCancelContentTouches = NO; - _scrollView.showsVerticalScrollIndicator = NO; - _scrollView.showsHorizontalScrollIndicator = NO; - [self.view addSubview:_scrollView]; - - _textEditor = [[TTTextEditor alloc] initWithFrame:CGRectMake(0, 0, _scrollView.width, 0)]; - _textEditor.delegate = self; - _textEditor.backgroundColor = TTSTYLEVAR(backgroundColor); - _textEditor.font = TTSTYLEVAR(messageFont); - _textEditor.autoresizingMask = UIViewAutoresizingFlexibleWidth; - _textEditor.autoresizesToText = YES; - _textEditor.showsExtraLine = YES; - _textEditor.minNumberOfLines = 6; - [_textEditor sizeToFit]; - - [self createFieldViews]; - [self layoutViews]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidUnload { - [super viewDidUnload]; - TT_RELEASE_SAFELY(_scrollView); - TT_RELEASE_SAFELY(_fieldViews); - TT_RELEASE_SAFELY(_textEditor); - TT_RELEASE_SAFELY(_activityView); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - if (_initialRecipients) { - for (id recipient in _initialRecipients) { - [self addRecipient:recipient forFieldAtIndex:0]; - } - TT_RELEASE_SAFELY(_initialRecipients); - } - - if (!_frozenState) { - for (NSInteger i = 0; i < _fields.count+1; ++i) { - if (![self fieldHasValueAtIndex:i]) { - UIView* view = [self viewForFieldAtIndex:i]; - [view becomeFirstResponder]; - return; - } - } - [[self viewForFieldAtIndex:0] becomeFirstResponder]; - } - - [self updateSendCommand]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return TTIsSupportedOrientation(interfaceOrientation); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - _scrollView.height = self.view.height - TTKeyboardHeight(); - [self layoutViews]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UTViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - NSMutableArray* fields = [NSMutableArray array]; - for (NSInteger i = 0; i < _fields.count; ++i) { - TTMessageField* field = [_fields objectAtIndex:i]; - UITextField* view = [_fieldViews objectAtIndex:i]; - id data = [field persistField:view]; - if (data) { - [fields addObject:data]; - - } else { - [fields addObject:@""]; - } - } - [state setObject:fields forKey:@"fields"]; - - NSString* body = self.body; - if (body) { - [state setObject:body forKey:@"body"]; - } - - CGFloat scrollY = _scrollView.contentOffset.y; - [state setObject:[NSNumber numberWithFloat:scrollY] forKey:@"scrollOffsetY"]; - - NSInteger firstResponder = [self fieldIndexOfFirstResponder]; - [state setObject:[NSNumber numberWithInt:firstResponder] forKey:@"firstResponder"]; - [state setObject:[NSNumber numberWithBool:YES] forKey:@"__important__"]; - return [super persistView:state]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreView:(NSDictionary*)state { - self.view; - TT_RELEASE_SAFELY(_initialRecipients); - NSMutableArray* fields = [state objectForKey:@"fields"]; - for (NSInteger i = 0; i < fields.count; ++i) { - TTMessageField* field = [_fields objectAtIndex:i]; - UITextField* view = [_fieldViews objectAtIndex:i]; - - id data = [fields objectAtIndex:i]; - if (data != [NSNull null]) { - [field restoreField:view withData:data]; - } - } - - NSString* body = [state objectForKey:@"body"]; - if (body) { - self.body = body; - } - - NSNumber* scrollY = [state objectForKey:@"scrollOffsetY"]; - _scrollView.contentOffset = CGPointMake(0, scrollY.floatValue); - - NSInteger firstResponder = [[state objectForKey:@"firstResponder"] intValue]; - [self setFieldIndexOfFirstResponder:firstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITextFieldDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range - replacementString:(NSString *)string { - if (textField == self.subjectField) { - _isModified = YES; - [NSTimer scheduledTimerWithTimeInterval:0 target:self - selector:@selector(setTitleToSubject) userInfo:nil repeats:NO]; - } - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textFieldShouldReturn:(UITextField *)textField { - NSUInteger fieldIndex = [_fieldViews indexOfObject:textField]; - UIView* nextView = fieldIndex == _fieldViews.count-1 - ? _textEditor - : [_fieldViews objectAtIndex:fieldIndex+1]; - [nextView becomeFirstResponder]; - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textField:(TTPickerTextField*)textField didAddCellAtIndex:(NSInteger)cellIndex { - [self updateSendCommand]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textField:(TTPickerTextField*)textField didRemoveCellAtIndex:(NSInteger)cellIndex { - [self updateSendCommand]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textFieldDidResize:(TTPickerTextField*)textField { - [self layoutViews]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTextEditorDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textEditorDidChange:(TTTextEditor*)textEditor { - [self updateSendCommand]; - _isModified = YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textEditor:(TTTextEditor*)textEditor shouldResizeBy:(CGFloat)height { - _textEditor.frame = TTRectContract(_textEditor.frame, 0, -height); - [self layoutViews]; - [_textEditor scrollContainerToCursor:_scrollView]; - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAlertViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { - if (buttonIndex == 0) { - [self cancel:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)subject { - self.view; - for (int i = 0; i < _fields.count; ++i) { - id field = [_fields objectAtIndex:i]; - if ([field isKindOfClass:[TTMessageSubjectField class]]) { - UITextField* textField = [_fieldViews objectAtIndex:i]; - return textField.text; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSubject:(NSString*)subject { - self.view; - for (int i = 0; i < _fields.count; ++i) { - id field = [_fields objectAtIndex:i]; - if ([field isKindOfClass:[TTMessageSubjectField class]]) { - UITextField* textField = [_fieldViews objectAtIndex:i]; - textField.text = subject; - break; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)body { - return _textEditor.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setBody:(NSString*)body { - self.view; - _textEditor.text = body; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDataSource:(id)dataSource { - if (dataSource != _dataSource) { - [_dataSource release]; - _dataSource = [dataSource retain]; - - for (UITextField* textField in _fieldViews) { - if ([textField isKindOfClass:[TTPickerTextField class]]) { - TTPickerTextField* menuTextField = (TTPickerTextField*)textField; - menuTextField.dataSource = dataSource; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFields:(NSArray*)fields { - if (fields != _fields) { - [_fields release]; - _fields = [fields retain]; - - if (_fieldViews) { - [self createFieldViews]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addRecipient:(id)recipient forFieldAtIndex:(NSUInteger)fieldIndex { - self.view; - TTPickerTextField* textField = [_fieldViews objectAtIndex:fieldIndex]; - if ([textField isKindOfClass:[TTPickerTextField class]]) { - NSString* label = [_dataSource tableView:textField.tableView labelForObject:recipient]; - if (label) { - [textField addCellWithObject:recipient]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)textForFieldAtIndex:(NSUInteger)fieldIndex { - self.view; - - NSString* text = nil; - if (fieldIndex == _fieldViews.count) { - text = _textEditor.text; - - } else { - TTPickerTextField* textField = [_fieldViews objectAtIndex:fieldIndex]; - if ([textField isKindOfClass:[TTPickerTextField class]]) { - text = textField.text; - } - } - - NSCharacterSet* whitespace = [NSCharacterSet whitespaceCharacterSet]; - return [text stringByTrimmingCharactersInSet:whitespace]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(NSString*)text forFieldAtIndex:(NSUInteger)fieldIndex { - self.view; - if (fieldIndex == _fieldViews.count) { - _textEditor.text = text; - - } else { - TTPickerTextField* textField = [_fieldViews objectAtIndex:fieldIndex]; - if ([textField isKindOfClass:[TTPickerTextField class]]) { - textField.text = text; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)fieldHasValueAtIndex:(NSUInteger)fieldIndex { - self.view; - - if (fieldIndex == _fieldViews.count) { - return _textEditor.text.length > 0; - - } else { - TTMessageField* field = [_fields objectAtIndex:fieldIndex]; - if ([field isKindOfClass:[TTMessageRecipientField class]]) { - TTPickerTextField* pickerTextField = [_fieldViews objectAtIndex:fieldIndex]; - return (TTIsStringWithAnyText(pickerTextField.text) - && !pickerTextField.text.isWhitespaceAndNewlines) - || pickerTextField.cellViews.count > 0; - - } else { - UITextField* textField = [_fieldViews objectAtIndex:fieldIndex]; - return (TTIsStringWithAnyText(textField.text) - && !textField.text.isWhitespaceAndNewlines); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)viewForFieldAtIndex:(NSUInteger)fieldIndex { - self.view; - - if (fieldIndex == _fieldViews.count) { - return _textEditor; - - } else { - return [_fieldViews objectAtIndex:fieldIndex]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)send { - NSMutableArray* fields = [[_fields mutableCopy] autorelease]; - for (int i = 0; i < fields.count; ++i) { - id field = [fields objectAtIndex:i]; - if ([field isKindOfClass:[TTMessageRecipientField class]]) { - TTPickerTextField* textField = [_fieldViews objectAtIndex:i]; - [(TTMessageRecipientField*)field setRecipients:textField.cells]; - - } else if ([field isKindOfClass:[TTMessageTextField class]]) { - UITextField* textField = [_fieldViews objectAtIndex:i]; - [(TTMessageTextField*)field setText:textField.text]; - } - } - - TTMessageTextField* bodyField = [[[TTMessageTextField alloc] initWithTitle:nil - required:NO] autorelease]; - bodyField.text = _textEditor.text; - [fields addObject:bodyField]; - - [self showActivityView:YES]; - - [self messageWillSend:fields]; - - if ([_delegate respondsToSelector:@selector(composeController:didSendFields:)]) { - [_delegate composeController:self didSendFields:fields]; - } - - [self messageDidSend]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel:(BOOL)confirmIfNecessary { - if (confirmIfNecessary && ![self messageShouldCancel]) { - [self confirmCancellation]; - - } else { - if ([_delegate respondsToSelector:@selector(composeControllerWillCancel:)]) { - [_delegate composeControllerWillCancel:self]; - } - - [self dismissModalViewController]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)confirmCancellation { - UIAlertView* cancelAlertView = [[[UIAlertView alloc] initWithTitle: - TTLocalizedString(@"Cancel", @"") - message:TTLocalizedString(@"Are you sure you want to cancel?", @"") - delegate:self - cancelButtonTitle:TTLocalizedString(@"Yes", @"") - otherButtonTitles:TTLocalizedString(@"No", @""), nil] autorelease]; - [cancelAlertView show]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showActivityView:(BOOL)show { - self.navigationItem.rightBarButtonItem.enabled = !show; - if (show) { - if (!_activityView) { - CGRect frame = CGRectMake(0, 0, self.view.width, _scrollView.height); - _activityView = [[TTActivityLabel alloc] initWithFrame:frame - style:TTActivityLabelStyleWhiteBox]; - _activityView.text = [self titleForSending]; - _activityView.autoresizingMask = UIViewAutoresizingFlexibleWidth; - [self.view addSubview:_activityView]; - } - - } else { - [_activityView removeFromSuperview]; - TT_RELEASE_SAFELY(_activityView); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForSending { - return TTLocalizedString(@"Sending...", @""); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)messageShouldCancel { - return ![self hasEnteredText] || !_isModified; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)messageWillShowRecipientPicker { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)messageWillSend:(NSArray*)fields { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)messageDidSend { -} - - -@end diff --git a/src/Three20UI/Sources/TTMessageField.m b/src/Three20UI/Sources/TTMessageField.m deleted file mode 100644 index f00fca895b..0000000000 --- a/src/Three20UI/Sources/TTMessageField.m +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTMessageField.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTMessageField - -@synthesize title = _title; -@synthesize required = _required; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title required:(BOOL)required { - if (self = [self init]) { - _title = [title copy]; - _required = required; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_title); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"%@", _title]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTPickerTextField*)createViewForController:(TTMessageController*)controller { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)persistField:(UITextField*)textField { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreField:(UITextField*)textField withData:(id)data { -} - - -@end diff --git a/src/Three20UI/Sources/TTMessageRecipientField.m b/src/Three20UI/Sources/TTMessageRecipientField.m deleted file mode 100644 index f6e9c0c34d..0000000000 --- a/src/Three20UI/Sources/TTMessageRecipientField.m +++ /dev/null @@ -1,112 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTMessageRecipientField.h" - -// UI -#import "Three20UI/TTPickerTextField.h" -#import "Three20UI/TTMessageController.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTMessageRecipientField - -@synthesize recipients = _recipients; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_recipients); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"%@ %@", _title, _recipients]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTMessageField - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTPickerTextField*)createViewForController:(TTMessageController*)controller { - TTPickerTextField* textField = [[[TTPickerTextField alloc] init] autorelease]; - textField.dataSource = controller.dataSource; - textField.autocorrectionType = UITextAutocorrectionTypeNo; - textField.autocapitalizationType = UITextAutocapitalizationTypeNone; - textField.rightViewMode = UITextFieldViewModeAlways; - - if (controller.showsRecipientPicker) { - UIButton* addButton = [UIButton buttonWithType:UIButtonTypeContactAdd]; - [addButton addTarget:controller action:@selector(showRecipientPicker) - forControlEvents:UIControlEventTouchUpInside]; - textField.rightView = addButton; - } - - return textField; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)persistField:(UITextField*)textField { - if ([textField isKindOfClass:[TTPickerTextField class]]) { - TTPickerTextField* picker = (TTPickerTextField*)textField; - NSMutableArray* cellsData = [NSMutableArray array]; - for (id cell in picker.cells) { - if ([cell conformsToProtocol:@protocol(NSCoding)]) { - NSData* data = [NSKeyedArchiver archivedDataWithRootObject:cell]; - [cellsData addObject:data]; - } - } - return [NSDictionary dictionaryWithObjectsAndKeys:cellsData, @"cells", - textField.text, @"text", nil]; - - } else { - return [NSDictionary dictionaryWithObjectsAndKeys:textField.text, @"text", nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreField:(UITextField*)textField withData:(id)data { - NSDictionary* dict = data; - - if ([textField isKindOfClass:[TTPickerTextField class]]) { - TTPickerTextField* picker = (TTPickerTextField*)textField; - NSArray* cellsData = [dict objectForKey:@"cells"]; - [picker removeAllCells]; - for (id cellData in cellsData) { - id cell = [NSKeyedUnarchiver unarchiveObjectWithData:cellData]; - [picker addCellWithObject:cell]; - } - } - - textField.text = [dict objectForKey:@"text"]; -} - - -@end diff --git a/src/Three20UI/Sources/TTMessageSubjectField.m b/src/Three20UI/Sources/TTMessageSubjectField.m deleted file mode 100644 index 5e03b952c0..0000000000 --- a/src/Three20UI/Sources/TTMessageSubjectField.m +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTMessageSubjectField.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTMessageSubjectField - -@end diff --git a/src/Three20UI/Sources/TTMessageTextField.m b/src/Three20UI/Sources/TTMessageTextField.m deleted file mode 100644 index f30d89eeef..0000000000 --- a/src/Three20UI/Sources/TTMessageTextField.m +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTMessageTextField.h" - -// UI -#import "Three20UI/TTPickerTextField.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTMessageTextField - -@synthesize text = _text; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_text); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)description { - return [NSString stringWithFormat:@"%@ %@", _title, _text]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTMessageField - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTPickerTextField*)createViewForController:(TTMessageController*)controller { - return [[[TTPickerTextField alloc] init] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)persistField:(UITextField*)textField { - return textField.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreField:(UITextField*)textField withData:(id)data { - textField.text = data; -} - - -@end diff --git a/src/Three20UI/Sources/TTModelViewController.m b/src/Three20UI/Sources/TTModelViewController.m deleted file mode 100644 index 2deaa18bbb..0000000000 --- a/src/Three20UI/Sources/TTModelViewController.m +++ /dev/null @@ -1,539 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTModelViewController.h" - -// UI -#import "Three20UI/TTNavigator.h" - -// UICommon -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Network -#import "Three20Network/TTModel.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTModelViewController - -@synthesize model = _model; -@synthesize modelError = _modelError; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _flags.isViewInvalid = YES; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNibName:nil bundle:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [_model.delegates removeObject:self]; - TT_RELEASE_SAFELY(_model); - TT_RELEASE_SAFELY(_modelError); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)resetViewStates { - if (_flags.isShowingLoading) { - [self showLoading:NO]; - _flags.isShowingLoading = NO; - } - if (_flags.isShowingModel) { - [self showModel:NO]; - _flags.isShowingModel = NO; - } - if (_flags.isShowingError) { - [self showError:NO]; - _flags.isShowingError = NO; - } - if (_flags.isShowingEmpty) { - [self showEmpty:NO]; - _flags.isShowingEmpty = NO; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateViewStates { - if (_flags.isModelDidRefreshInvalid) { - [self didRefreshModel]; - _flags.isModelDidRefreshInvalid = NO; - } - if (_flags.isModelWillLoadInvalid) { - [self willLoadModel]; - _flags.isModelWillLoadInvalid = NO; - } - if (_flags.isModelDidLoadInvalid) { - [self didLoadModel:_flags.isModelDidLoadFirstTimeInvalid]; - _flags.isModelDidLoadInvalid = NO; - _flags.isModelDidLoadFirstTimeInvalid = NO; - _flags.isShowingModel = NO; - } - - BOOL showModel = NO, showLoading = NO, showError = NO, showEmpty = NO; - - if (_model.isLoaded || ![self shouldLoad]) { - if ([self canShowModel]) { - showModel = !_flags.isShowingModel; - _flags.isShowingModel = YES; - - } else { - if (_flags.isShowingModel) { - [self showModel:NO]; - _flags.isShowingModel = NO; - } - } - - } else { - if (_flags.isShowingModel) { - [self showModel:NO]; - _flags.isShowingModel = NO; - } - } - - if (_model.isLoading) { - showLoading = !_flags.isShowingLoading; - _flags.isShowingLoading = YES; - - } else { - if (_flags.isShowingLoading) { - [self showLoading:NO]; - _flags.isShowingLoading = NO; - } - } - - if (_modelError) { - showError = !_flags.isShowingError; - _flags.isShowingError = YES; - - } else { - if (_flags.isShowingError) { - [self showError:NO]; - _flags.isShowingError = NO; - } - } - - if (!_flags.isShowingLoading && !_flags.isShowingModel && !_flags.isShowingError) { - showEmpty = !_flags.isShowingEmpty; - _flags.isShowingEmpty = YES; - - } else { - if (_flags.isShowingEmpty) { - [self showEmpty:NO]; - _flags.isShowingEmpty = NO; - } - } - - if (showModel) { - [self showModel:YES]; - [self didShowModel:_flags.isModelDidShowFirstTimeInvalid]; - _flags.isModelDidShowFirstTimeInvalid = NO; - } - if (showEmpty) { - [self showEmpty:YES]; - } - if (showError) { - [self showError:YES]; - } - if (showLoading) { - [self showLoading:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createInterstitialModel { - self.model = [[[TTModel alloc] init] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillAppear:(BOOL)animated { - _isViewAppearing = YES; - _hasViewAppeared = YES; - - [self updateView]; - - [super viewWillAppear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didReceiveMemoryWarning { - if (_hasViewAppeared && !_isViewAppearing) { - [super didReceiveMemoryWarning]; - [self refresh]; - - } else { - [super didReceiveMemoryWarning]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)delayDidEnd { - [self invalidateModel]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidStartLoad:(id)model { - if (model == self.model) { - _flags.isModelWillLoadInvalid = YES; - _flags.isModelDidLoadFirstTimeInvalid = YES; - [self invalidateView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidFinishLoad:(id)model { - if (model == _model) { - TT_RELEASE_SAFELY(_modelError); - _flags.isModelDidLoadInvalid = YES; - [self invalidateView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didFailLoadWithError:(NSError*)error { - if (model == _model) { - self.modelError = error; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidCancelLoad:(id)model { - if (model == _model) { - [self invalidateView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidChange:(id)model { - if (model == _model) { - [self refresh]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didUpdateObject:(id)object atIndexPath:(NSIndexPath*)indexPath { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didInsertObject:(id)object atIndexPath:(NSIndexPath*)indexPath { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didDeleteObject:(id)object atIndexPath:(NSIndexPath*)indexPath { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidBeginUpdates:(id)model { - if (model == _model) { - [self beginUpdates]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidEndUpdates:(id)model { - if (model == _model) { - [self endUpdates]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)model { - if (!_model) { - if (![TTNavigator navigator].isDelayed) { - [self createModel]; - } - - if (!_model) { - [self createInterstitialModel]; - } - } - return _model; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setModel:(id)model { - if (_model != model) { - [_model.delegates removeObject:self]; - [_model release]; - _model = [model retain]; - [_model.delegates addObject:self]; - TT_RELEASE_SAFELY(_modelError); - - if (_model) { - _flags.isModelWillLoadInvalid = NO; - _flags.isModelDidLoadInvalid = NO; - _flags.isModelDidLoadFirstTimeInvalid = NO; - _flags.isModelDidShowFirstTimeInvalid = YES; - } - - [self refresh]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setModelError:(NSError*)error { - if (error != _modelError) { - [_modelError release]; - _modelError = [error retain]; - - [self invalidateView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createModel { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidateModel { - BOOL wasModelCreated = self.isModelCreated; - [self resetViewStates]; - [_model.delegates removeObject:self]; - TT_RELEASE_SAFELY(_model); - if (wasModelCreated) { - self.model; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isModelCreated { - return !!_model; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldLoad { - return !self.model.isLoaded; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldReload { - return !_modelError && self.model.isOutdated; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldLoadMore { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canShowModel { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reload { - _flags.isViewInvalid = YES; - [self.model load:TTURLRequestCachePolicyNetwork more:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reloadIfNeeded { - if ([self shouldReload] && !self.model.isLoading) { - [self reload]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)refresh { - _flags.isViewInvalid = YES; - _flags.isModelDidRefreshInvalid = YES; - - BOOL loading = self.model.isLoading; - BOOL loaded = self.model.isLoaded; - if (!loading && !loaded && [self shouldLoad]) { - [self.model load:TTURLRequestCachePolicyDefault more:NO]; - - } else if (!loading && loaded && [self shouldReload]) { - [self.model load:TTURLRequestCachePolicyNetwork more:NO]; - - } else if (!loading && [self shouldLoadMore]) { - [self.model load:TTURLRequestCachePolicyDefault more:YES]; - - } else { - _flags.isModelDidLoadInvalid = YES; - if (_isViewAppearing) { - [self updateView]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)beginUpdates { - _flags.isViewSuspended = YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endUpdates { - _flags.isViewSuspended = NO; - [self updateView]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidateView { - _flags.isViewInvalid = YES; - if (_isViewAppearing) { - [self updateView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateView { - if (_flags.isViewInvalid && !_flags.isViewSuspended && !_flags.isUpdatingView) { - _flags.isUpdatingView = YES; - - // Ensure the model is created - self.model; - // Ensure the view is created - self.view; - - [self updateViewStates]; - - if (_frozenState && _flags.isShowingModel) { - [self restoreView:_frozenState]; - TT_RELEASE_SAFELY(_frozenState); - } - - _flags.isViewInvalid = NO; - _flags.isUpdatingView = NO; - - [self reloadIfNeeded]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didRefreshModel { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)willLoadModel { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didLoadModel:(BOOL)firstTime { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didShowModel:(BOOL)firstTime { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showLoading:(BOOL)show { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showModel:(BOOL)show { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showEmpty:(BOOL)show { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showError:(BOOL)show { -} - - -@end diff --git a/src/Three20UI/Sources/TTNavigationController.m b/src/Three20UI/Sources/TTNavigationController.m deleted file mode 100644 index acf0ff787d..0000000000 --- a/src/Three20UI/Sources/TTNavigationController.m +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTNavigationController.h" - -// Network -#import "Three20Network/TTURLRequestQueue.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTNavigationController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)pushAnimationDidStop { - [TTURLRequestQueue mainQueue].suspended = NO; - - [super pushAnimationDidStop]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)pushViewController: (UIViewController*)controller - animatedWithTransition: (UIViewAnimationTransition)transition { - [TTURLRequestQueue mainQueue].suspended = YES; - - [super pushViewController:controller animatedWithTransition:transition]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)popViewControllerAnimatedWithTransition:(UIViewAnimationTransition)transition { - [TTURLRequestQueue mainQueue].suspended = YES; - - return [super popViewControllerAnimatedWithTransition:transition]; -} - - -@end - diff --git a/src/Three20UI/Sources/TTNavigator.m b/src/Three20UI/Sources/TTNavigator.m deleted file mode 100644 index 10baa10ddb..0000000000 --- a/src/Three20UI/Sources/TTNavigator.m +++ /dev/null @@ -1,179 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTNavigator.h" - -// UI -#import "Three20UI/TTPopupViewController.h" -#import "Three20UI/TTSearchDisplayController.h" -#import "Three20UI/TTTableViewController.h" -#import "Three20UI/TTNavigationController.h" - -// UI (private) -#import "Three20UI/private/TTNavigatorWindow.h" - -// UINavigator -#import "Three20UINavigator/TTURLMap.h" -#import "Three20UINavigator/TTURLAction.h" - -// UINavigator (private) -#import "Three20UINavigator/private/TTBaseNavigatorInternal.h" - -// UICommon -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Core -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -UIViewController* TTOpenURL(NSString* URL) { - return [[TTNavigator navigator] openURLAction: - [[TTURLAction actionWithURLPath:URL] - applyAnimated:YES]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -UIViewController* TTOpenURLFromView(NSString* URL, UIView* view) { - return [[TTBaseNavigator navigatorForView:view] openURLAction: - [[TTURLAction actionWithURLPath:URL] - applyAnimated:YES]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTNavigator - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTNavigator*)navigator { - TTBaseNavigator* navigator = [TTBaseNavigator globalNavigator]; - if (nil == navigator) { - navigator = [[[TTNavigator alloc] init] autorelease]; - // setNavigator: retains. - [super setGlobalNavigator:navigator]; - } - // If this asserts, it's likely that you're attempting to use two different navigator - // implementations simultaneously. Be consistent! - TTDASSERT([navigator isKindOfClass:[TTNavigator class]]); - return (TTNavigator*)navigator; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (Class)windowClass { - return [TTNavigatorWindow class]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * A popup controller is a view controller that is presented over another controller, but doesn't - * necessarily completely hide the original controller (like a modal controller would). A classic - * example is a status indicator while something is loading. - * - * @private - */ -- (void)presentPopupController: (TTPopupViewController*)controller - parentController: (UIViewController*)parentController - action: (TTURLAction*)action { - if (nil != action.sourceButton) { - [controller showFromBarButtonItem: action.sourceButton - animated: action.animated]; - - } else { - parentController.popupViewController = controller; - controller.superController = parentController; - [controller showInView: parentController.view - animated: action.animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Present a view controller that strictly depends on the existence of the parent controller. - * - * @protected - */ -- (void)presentDependantController: (UIViewController*)controller - parentController: (UIViewController*)parentController - mode: (TTNavigationMode)mode - action: (TTURLAction*)action { - - if ([controller isKindOfClass:[TTPopupViewController class]]) { - TTPopupViewController* popupViewController = (TTPopupViewController*)controller; - [self presentPopupController: popupViewController - parentController: parentController - action: action]; - - } else { - [super presentDependantController: controller - parentController: parentController - mode: mode - action: action]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @protected - */ -- (void)didRestoreController:(UIViewController*)controller { - if ([controller isKindOfClass:[TTModelViewController class]]) { - TTModelViewController* modelViewController = (TTModelViewController*)controller; - modelViewController.model; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @protected - */ -- (UIViewController*)getVisibleChildController:(UIViewController*)controller { - UISearchDisplayController* search = controller.searchDisplayController; - if (search && search.active && [search isKindOfClass:[TTSearchDisplayController class]]) { - TTSearchDisplayController* ttsearch = (TTSearchDisplayController*)search; - return ttsearch.searchResultsViewController; - - } else { - return [super getVisibleChildController:controller]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reload { - UIViewController* controller = self.visibleViewController; - if ([controller isKindOfClass:[TTModelViewController class]]) { - TTModelViewController* ttcontroller = (TTModelViewController*)controller; - [ttcontroller reload]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (Class)navigationControllerClass { - return [TTNavigationController class]; -} - - -@end diff --git a/src/Three20UI/Sources/TTNavigatorWindow.m b/src/Three20UI/Sources/TTNavigatorWindow.m deleted file mode 100644 index 23c0a1577c..0000000000 --- a/src/Three20UI/Sources/TTNavigatorWindow.m +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTNavigatorWindow.h" - -// UI -#import "Three20UI/TTNavigator.h" - -// Core -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTNavigatorWindow - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event { - if (event.type == UIEventSubtypeMotionShake - && [TTNavigator navigator].supportsShakeToReload) { - // If you're going to use a custom navigator implementation, you need to ensure that you - // implement the reload method. If you're inheriting from TTNavigator, then you're fine. - TTDASSERT([[TTNavigator navigator] respondsToSelector:@selector(reload)]); - [(TTNavigator*)[TTNavigator navigator] reload]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTPageControl.m b/src/Three20UI/Sources/TTPageControl.m deleted file mode 100644 index 16b889f02f..0000000000 --- a/src/Three20UI/Sources/TTPageControl.m +++ /dev/null @@ -1,208 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTPageControl.h" - -// UI -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTStyleSheet.h" -#import "Three20Style/TTBoxStyle.h" - -// Core -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTPageControl - -@synthesize numberOfPages = _numberOfPages; -@synthesize currentPage = _currentPage; -@synthesize dotStyle = _dotStyle; -@synthesize hidesForSinglePage = _hidesForSinglePage; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.backgroundColor = [UIColor clearColor]; - self.dotStyle = @"pageDot:"; - self.hidesForSinglePage = NO; - self.contentMode = UIViewContentModeRedraw; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_dotStyle); - TT_RELEASE_SAFELY(_normalDotStyle); - TT_RELEASE_SAFELY(_currentDotStyle); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)normalDotStyle { - if (!_normalDotStyle) { - _normalDotStyle = [[[TTStyleSheet globalStyleSheet] styleWithSelector:_dotStyle - forState:UIControlStateNormal] retain]; - } - return _normalDotStyle; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)currentDotStyle { - if (!_currentDotStyle) { - _currentDotStyle = [[[TTStyleSheet globalStyleSheet] styleWithSelector:_dotStyle - forState:UIControlStateSelected] retain]; - } - return _currentDotStyle; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - if (_numberOfPages <= 1 && _hidesForSinglePage) { - return; - } - - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - TTBoxStyle* boxStyle = [self.normalDotStyle firstStyleOfClass:[TTBoxStyle class]]; - - CGSize dotSize = [self.normalDotStyle addToSize:CGSizeZero context:context]; - - CGFloat dotWidth = dotSize.width + boxStyle.margin.left + boxStyle.margin.right; - CGFloat totalWidth = (dotWidth * _numberOfPages) - (boxStyle.margin.left + boxStyle.margin.right); - CGRect contentRect = CGRectMake(round(self.width/2 - totalWidth/2), - round(self.height/2 - dotSize.height/2), - dotSize.width, dotSize.height); - - for (NSInteger i = 0; i < _numberOfPages; ++i) { - contentRect.origin.x += boxStyle.margin.left; - - context.frame = contentRect; - context.contentFrame = contentRect; - - if (i == _currentPage) { - [self.currentDotStyle draw:context]; - - } else { - [self.normalDotStyle draw:context]; - } - contentRect.origin.x += dotSize.width + boxStyle.margin.right; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - CGSize dotSize = [self.normalDotStyle addToSize:CGSizeZero context:context]; - - CGFloat margin = 0; - TTBoxStyle* boxStyle = [self.normalDotStyle firstStyleOfClass:[TTBoxStyle class]]; - if (boxStyle) { - margin = boxStyle.margin.right + boxStyle.margin.left; - } - - return CGSizeMake((dotSize.width * _numberOfPages) + (margin * (_numberOfPages-1)), - dotSize.height); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIControl - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event { - if (self.touchInside) { - CGPoint point = [touch locationInView:self]; - - if (point.x < self.width / 2) { - self.currentPage = self.currentPage - 1; - - } else { - self.currentPage = self.currentPage + 1; - } - - [self sendActionsForControlEvents:UIControlEventValueChanged]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setNumberOfPages:(NSInteger)numberOfPages { - if (numberOfPages != _numberOfPages) { - TTDASSERT(numberOfPages >= 0); - - _numberOfPages = MAX(0, numberOfPages); - [self setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setCurrentPage:(NSInteger)currentPage { - if (currentPage != _currentPage) { - _currentPage = MAX(0, MIN(_numberOfPages - 1,currentPage)); - [self setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDotStyle:(NSString*)dotStyle { - if (![dotStyle isEqualToString:_dotStyle]) { - [_dotStyle release]; - _dotStyle = [dotStyle copy]; - TT_RELEASE_SAFELY(_normalDotStyle); - TT_RELEASE_SAFELY(_currentDotStyle); - } -} - - -@end diff --git a/src/Three20UI/Sources/TTPhotoView.m b/src/Three20UI/Sources/TTPhotoView.m deleted file mode 100644 index c7cbddae7a..0000000000 --- a/src/Three20UI/Sources/TTPhotoView.m +++ /dev/null @@ -1,349 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTPhotoView.h" - -// UI -#import "Three20UI/TTPhoto.h" -#import "Three20UI/TTPhotoSource.h" -#import "Three20UI/TTLabel.h" -#import "Three20UI/UIViewAdditions.h" - -// UI (private) -#import "Three20UI/private/TTImageViewInternal.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" - -// Network -#import "Three20Network/TTURLCache.h" -#import "Three20Network/TTURLRequestQueue.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreLocale.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTPhotoView - -@synthesize photo = _photo; -@synthesize captionStyle = _captionStyle; -@synthesize hidesExtras = _hidesExtras; -@synthesize hidesCaption = _hidesCaption; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _photoVersion = TTPhotoVersionNone; - self.clipsToBounds = NO; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[TTURLRequestQueue mainQueue] cancelRequestsWithDelegate:self]; - [super setDelegate:nil]; - TT_RELEASE_SAFELY(_photo); - TT_RELEASE_SAFELY(_captionLabel); - TT_RELEASE_SAFELY(_captionStyle); - TT_RELEASE_SAFELY(_statusSpinner); - TT_RELEASE_SAFELY(_statusLabel); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadVersion:(TTPhotoVersion)version fromNetwork:(BOOL)fromNetwork { - NSString* URL = [_photo URLForVersion:version]; - if (URL) { - UIImage* image = [[TTURLCache sharedCache] imageForURL:URL]; - if (image || fromNetwork) { - _photoVersion = version; - self.urlPath = URL; - return YES; - } - } - - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showCaption:(NSString*)caption { - if (caption) { - if (!_captionLabel) { - _captionLabel = [[TTLabel alloc] init]; - _captionLabel.opaque = NO; - _captionLabel.style = _captionStyle ? _captionStyle : TTSTYLE(photoCaption); - _captionLabel.alpha = _hidesCaption ? 0 : 1; - [self addSubview:_captionLabel]; - } - } - - _captionLabel.text = caption; - [self setNeedsLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIImageView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setImage:(UIImage*)image { - if (image != _defaultImage - || !_photo - || self.urlPath != [_photo URLForVersion:TTPhotoVersionLarge]) { - if (image == _defaultImage) { - self.contentMode = UIViewContentModeCenter; - - } else { - self.contentMode = UIViewContentModeScaleAspectFill; - } - - [super setImage:image]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)imageViewDidStartLoad { - [self showProgress:0]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)imageViewDidLoadImage:(UIImage*)image { - if (!_photo.photoSource.isLoading) { - [self showProgress:-1]; - [self showStatus:nil]; - } - - if (!_photo.size.width) { - _photo.size = image.size; - [self.superview setNeedsLayout]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)imageViewDidFailLoadWithError:(NSError*)error { - [self showProgress:0]; - if (error) { - [self showStatus:TTDescriptionForError(error)]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - CGRect screenBounds = TTScreenBounds(); - CGFloat width = self.width; - CGFloat height = self.height; - CGFloat cx = self.bounds.origin.x + width/2; - CGFloat cy = self.bounds.origin.y + height/2; - CGFloat marginRight = 0, marginLeft = 0, marginBottom = TTToolbarHeight(); - - // Since the photo view is constrained to the size of the image, but we want to position - // the status views relative to the screen, offset by the difference - CGFloat screenOffset = -floor(screenBounds.size.height/2 - height/2); - - // Vertically center in the space between the bottom of the image and the bottom of the screen - CGFloat imageBottom = screenBounds.size.height/2 + self.defaultImage.size.height/2; - CGFloat textWidth = screenBounds.size.width - (marginLeft+marginRight); - - if (_statusLabel.text.length) { - CGSize statusSize = [_statusLabel sizeThatFits:CGSizeMake(textWidth, 0)]; - _statusLabel.frame = - CGRectMake(marginLeft + (cx - screenBounds.size.width/2), - cy + floor(screenBounds.size.height/2 - (statusSize.height+marginBottom)), - textWidth, statusSize.height); - - } else { - _statusLabel.frame = CGRectZero; - } - - if (_captionLabel.text.length) { - CGSize captionSize = [_captionLabel sizeThatFits:CGSizeMake(textWidth, 0)]; - _captionLabel.frame = CGRectMake(marginLeft + (cx - screenBounds.size.width/2), - cy + floor(screenBounds.size.height/2 - - (captionSize.height+marginBottom)), - textWidth, captionSize.height); - - } else { - _captionLabel.frame = CGRectZero; - } - - CGFloat spinnerTop = _captionLabel.height - ? _captionLabel.top - floor(_statusSpinner.height + _statusSpinner.height/2) - : screenOffset + imageBottom + floor(_statusSpinner.height/2); - - _statusSpinner.frame = - CGRectMake(self.bounds.origin.x + floor(self.bounds.size.width/2 - _statusSpinner.width/2), - spinnerTop, _statusSpinner.width, _statusSpinner.height); - -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPhoto:(id)photo { - if (!photo || photo != _photo) { - [_photo release]; - _photo = [photo retain]; - _photoVersion = TTPhotoVersionNone; - - self.urlPath = nil; - - [self showCaption:photo.caption]; - } - - if (!_photo || _photo.photoSource.isLoading) { - [self showProgress:0]; - - } else { - [self showStatus:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHidesExtras:(BOOL)hidesExtras { - if (!hidesExtras) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - } - _hidesExtras = hidesExtras; - _statusSpinner.alpha = _hidesExtras ? 0 : 1; - _statusLabel.alpha = _hidesExtras ? 0 : 1; - _captionLabel.alpha = _hidesExtras || _hidesCaption ? 0 : 1; - if (!hidesExtras) { - [UIView commitAnimations]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHidesCaption:(BOOL)hidesCaption { - _hidesCaption = hidesCaption; - _captionLabel.alpha = hidesCaption ? 0 : 1; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadPreview:(BOOL)fromNetwork { - if (![self loadVersion:TTPhotoVersionLarge fromNetwork:NO]) { - if (![self loadVersion:TTPhotoVersionSmall fromNetwork:NO]) { - if (![self loadVersion:TTPhotoVersionThumbnail fromNetwork:fromNetwork]) { - return NO; - } - } - } - - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadImage { - if (_photo) { - _photoVersion = TTPhotoVersionLarge; - self.urlPath = [_photo URLForVersion:TTPhotoVersionLarge]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showProgress:(CGFloat)progress { - if (progress >= 0) { - if (!_statusSpinner) { - _statusSpinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: - UIActivityIndicatorViewStyleWhiteLarge]; - [self addSubview:_statusSpinner]; - } - - [_statusSpinner startAnimating]; - _statusSpinner.hidden = NO; - [self showStatus:nil]; - [self setNeedsLayout]; - - } else { - [_statusSpinner stopAnimating]; - _statusSpinner.hidden = YES; - _captionLabel.hidden = !!_statusLabel.text.length; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showStatus:(NSString*)text { - if (text) { - if (!_statusLabel) { - _statusLabel = [[TTLabel alloc] init]; - _statusLabel.style = TTSTYLE(photoStatusLabel); - _statusLabel.opaque = NO; - [self addSubview:_statusLabel]; - } - - _statusLabel.hidden = NO; - [self showProgress:-1]; - [self setNeedsLayout]; - _captionLabel.hidden = YES; - - } else { - _statusLabel.hidden = YES; - _captionLabel.hidden = NO; - } - - _statusLabel.text = text; -} - - -@end diff --git a/src/Three20UI/Sources/TTPhotoViewController.m b/src/Three20UI/Sources/TTPhotoViewController.m deleted file mode 100644 index 32eb21650b..0000000000 --- a/src/Three20UI/Sources/TTPhotoViewController.m +++ /dev/null @@ -1,999 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTPhotoViewController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTThumbsViewController.h" -#import "Three20UI/TTNavigationController.h" -#import "Three20UI/TTPhotoSource.h" -#import "Three20UI/TTPhoto.h" -#import "Three20UI/TTPhotoView.h" -#import "Three20UI/TTActivityLabel.h" -#import "Three20UI/TTScrollView.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20UI/UINavigationControllerAdditions.h" -#import "Three20UI/UIToolbarAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTURLObject.h" -#import "Three20UINavigator/TTURLMap.h" -#import "Three20UINavigator/TTBaseNavigationController.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Network -#import "Three20Network/TTGlobalNetwork.h" -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreLocale.h" - -static const NSTimeInterval kPhotoLoadLongDelay = 0.5; -static const NSTimeInterval kPhotoLoadShortDelay = 0.25; -static const NSTimeInterval kSlideshowInterval = 2; -static const NSInteger kActivityLabelTag = 96; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTPhotoViewController - -@synthesize centerPhoto = _centerPhoto; -@synthesize centerPhotoIndex = _centerPhotoIndex; -@synthesize defaultImage = _defaultImage; -@synthesize captionStyle = _captionStyle; -@synthesize photoSource = _photoSource; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.navigationItem.backBarButtonItem = - [[[UIBarButtonItem alloc] - initWithTitle: - TTLocalizedString(@"Photo", - @"Title for back button that returns to photo browser") - style: UIBarButtonItemStylePlain - target: nil - action: nil] autorelease]; - - self.statusBarStyle = UIStatusBarStyleBlackTranslucent; - self.navigationBarStyle = UIBarStyleBlackTranslucent; - self.navigationBarTintColor = nil; - self.wantsFullScreenLayout = YES; - self.hidesBottomBarWhenPushed = YES; - - self.defaultImage = TTIMAGE(@"bundle://Three20.bundle/images/photoDefault.png"); - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithPhoto:(id)photo { - if (self = [self initWithNibName:nil bundle:nil]) { - self.centerPhoto = photo; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithPhotoSource:(id)photoSource { - if (self = [self initWithNibName:nil bundle:nil]) { - self.photoSource = photoSource; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNibName:nil bundle:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - _thumbsController.delegate = nil; - TT_INVALIDATE_TIMER(_slideshowTimer); - TT_INVALIDATE_TIMER(_loadTimer); - TT_RELEASE_SAFELY(_thumbsController); - TT_RELEASE_SAFELY(_centerPhoto); - TT_RELEASE_SAFELY(_photoSource); - TT_RELEASE_SAFELY(_statusText); - TT_RELEASE_SAFELY(_captionStyle); - TT_RELEASE_SAFELY(_defaultImage); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTPhotoView*)centerPhotoView { - return (TTPhotoView*)_scrollView.centerPage; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadImageDelayed { - _loadTimer = nil; - [self.centerPhotoView loadImage]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)startImageLoadTimer:(NSTimeInterval)delay { - [_loadTimer invalidate]; - _loadTimer = [NSTimer scheduledTimerWithTimeInterval:delay - target:self - selector:@selector(loadImageDelayed) - userInfo:nil - repeats:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancelImageLoadTimer { - [_loadTimer invalidate]; - _loadTimer = nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadImages { - TTPhotoView* centerPhotoView = self.centerPhotoView; - for (TTPhotoView* photoView in _scrollView.visiblePages.objectEnumerator) { - if (photoView == centerPhotoView) { - [photoView loadPreview:NO]; - - } else { - [photoView loadPreview:YES]; - } - } - - if (_delayLoad) { - _delayLoad = NO; - [self startImageLoadTimer:kPhotoLoadLongDelay]; - - } else { - [centerPhotoView loadImage]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateChrome { - if (_photoSource.numberOfPhotos < 2) { - self.title = _photoSource.title; - - } else { - self.title = [NSString stringWithFormat: - TTLocalizedString(@"%d of %d", @"Current page in photo browser (1 of 10)"), - _centerPhotoIndex+1, _photoSource.numberOfPhotos]; - } - - if (![self.ttPreviousViewController isKindOfClass:[TTThumbsViewController class]]) { - if (_photoSource.numberOfPhotos > 1) { - self.navigationItem.rightBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle:TTLocalizedString(@"See All", - @"See all photo thumbnails") - style:UIBarButtonItemStyleBordered - target:self - action:@selector(showThumbnails)] - autorelease]; - - } else { - self.navigationItem.rightBarButtonItem = nil; - } - - } else { - self.navigationItem.rightBarButtonItem = nil; - } - - UIBarButtonItem* playButton = [_toolbar itemWithTag:1]; - playButton.enabled = _photoSource.numberOfPhotos > 1; - _previousButton.enabled = _centerPhotoIndex > 0; - _nextButton.enabled = _centerPhotoIndex >= 0 && _centerPhotoIndex < _photoSource.numberOfPhotos-1; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateToolbarWithOrientation:(UIInterfaceOrientation)interfaceOrientation { - if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) { - _toolbar.height = TT_TOOLBAR_HEIGHT; - - } else { - _toolbar.height = TT_LANDSCAPE_TOOLBAR_HEIGHT+1; - } - _toolbar.top = self.view.height - _toolbar.height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updatePhotoView { - _scrollView.centerPageIndex = _centerPhotoIndex; - [self loadImages]; - [self updateChrome]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)moveToPhoto:(id)photo { - id previousPhoto = [_centerPhoto autorelease]; - _centerPhoto = [photo retain]; - [self didMoveToPhoto:_centerPhoto fromPhoto:previousPhoto]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)moveToPhotoAtIndex:(NSInteger)photoIndex withDelay:(BOOL)withDelay { - _centerPhotoIndex = photoIndex == TT_NULL_PHOTO_INDEX ? 0 : photoIndex; - [self moveToPhoto:[_photoSource photoAtIndex:_centerPhotoIndex]]; - _delayLoad = withDelay; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showPhoto:(id)photo inView:(TTPhotoView*)photoView { - photoView.photo = photo; - if (!photoView.photo && _statusText) { - [photoView showStatus:_statusText]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateVisiblePhotoViews { - [self moveToPhoto:[_photoSource photoAtIndex:_centerPhotoIndex]]; - - NSDictionary* photoViews = _scrollView.visiblePages; - for (NSNumber* key in photoViews.keyEnumerator) { - TTPhotoView* photoView = [photoViews objectForKey:key]; - [photoView showProgress:-1]; - - id photo = [_photoSource photoAtIndex:key.intValue]; - [self showPhoto:photo inView:photoView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)resetVisiblePhotoViews { - NSDictionary* photoViews = _scrollView.visiblePages; - for (TTPhotoView* photoView in photoViews.objectEnumerator) { - if (!photoView.isLoading) { - [photoView showProgress:-1]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isShowingChrome { - UINavigationBar* bar = self.navigationController.navigationBar; - return bar ? bar.alpha != 0 : 1; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTPhotoView*)statusView { - if (!_photoStatusView) { - _photoStatusView = [[TTPhotoView alloc] initWithFrame:_scrollView.frame]; - _photoStatusView.defaultImage = _defaultImage; - _photoStatusView.photo = nil; - [_innerView addSubview:_photoStatusView]; - } - - return _photoStatusView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showProgress:(CGFloat)progress { - if ((self.hasViewAppeared || self.isViewAppearing) && progress >= 0 && !self.centerPhotoView) { - [self.statusView showProgress:progress]; - self.statusView.hidden = NO; - - } else { - _photoStatusView.hidden = YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showStatus:(NSString*)status { - [_statusText release]; - _statusText = [status retain]; - - if ((self.hasViewAppeared || self.isViewAppearing) && status && !self.centerPhotoView) { - [self.statusView showStatus:status]; - self.statusView.hidden = NO; - - } else { - _photoStatusView.hidden = YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showCaptions:(BOOL)show { - for (TTPhotoView* photoView in _scrollView.visiblePages.objectEnumerator) { - photoView.hidesCaption = !show; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)URLForThumbnails { - if ([self.photoSource respondsToSelector:@selector(URLValueWithName:)]) { - return [self.photoSource performSelector:@selector(URLValueWithName:) - withObject:@"TTThumbsViewController"]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showThumbnails { - NSString* URL = [self URLForThumbnails]; - if (!_thumbsController) { - if (URL) { - // The photo source has a URL mapping in TTURLMap, so we use that to show the thumbs - NSDictionary* query = [NSDictionary dictionaryWithObject:self forKey:@"delegate"]; - TTBaseNavigator* navigator = [TTBaseNavigator navigatorForView:self.view]; - _thumbsController = [[navigator viewControllerForURL:URL query:query] retain]; - [navigator.URLMap setObject:_thumbsController forURL:URL]; - - } else { - // The photo source had no URL mapping in TTURLMap, so we let the subclass show the thumbs - _thumbsController = [[self createThumbsViewController] retain]; - _thumbsController.photoSource = _photoSource; - } - } - - if (URL) { - TTOpenURLFromView(URL, self.view); - - } else { - if ([self.navigationController isKindOfClass:[TTNavigationController class]]) { - [(TTNavigationController*)self.navigationController - pushViewController: _thumbsController - animatedWithTransition: UIViewAnimationTransitionCurlDown]; - - } else { - [self.navigationController pushViewController:_thumbsController animated:YES]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)slideshowTimer { - if (_centerPhotoIndex == _photoSource.numberOfPhotos-1) { - _scrollView.centerPageIndex = 0; - - } else { - _scrollView.centerPageIndex = _centerPhotoIndex+1; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)playAction { - if (!_slideshowTimer) { - UIBarButtonItem* pauseButton = - [[[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemPause - target: self - action: @selector(pauseAction)] - autorelease]; - pauseButton.tag = 1; - - [_toolbar replaceItemWithTag:1 withItem:pauseButton]; - - _slideshowTimer = [NSTimer scheduledTimerWithTimeInterval:kSlideshowInterval - target:self - selector:@selector(slideshowTimer) - userInfo:nil - repeats:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)pauseAction { - if (_slideshowTimer) { - UIBarButtonItem* playButton = - [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay - target:self - action:@selector(playAction)] - autorelease]; - playButton.tag = 1; - - [_toolbar replaceItemWithTag:1 withItem:playButton]; - - [_slideshowTimer invalidate]; - _slideshowTimer = nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)nextAction { - [self pauseAction]; - if (_centerPhotoIndex < _photoSource.numberOfPhotos-1) { - _scrollView.centerPageIndex = _centerPhotoIndex+1; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)previousAction { - [self pauseAction]; - if (_centerPhotoIndex > 0) { - _scrollView.centerPageIndex = _centerPhotoIndex-1; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showBarsAnimationDidStop { - self.navigationController.navigationBarHidden = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)hideBarsAnimationDidStop { - self.navigationController.navigationBarHidden = YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - CGRect screenFrame = [UIScreen mainScreen].bounds; - self.view = [[[UIView alloc] initWithFrame:screenFrame] autorelease]; - - CGRect innerFrame = CGRectMake(0, 0, - screenFrame.size.width, screenFrame.size.height); - _innerView = [[UIView alloc] initWithFrame:innerFrame]; - _innerView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; - [self.view addSubview:_innerView]; - - _scrollView = [[TTScrollView alloc] initWithFrame:screenFrame]; - _scrollView.delegate = self; - _scrollView.dataSource = self; - _scrollView.rotateEnabled = NO; - _scrollView.backgroundColor = [UIColor blackColor]; - _scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; - [_innerView addSubview:_scrollView]; - - _nextButton = - [[UIBarButtonItem alloc] initWithImage:TTIMAGE(@"bundle://Three20.bundle/images/nextIcon.png") - style:UIBarButtonItemStylePlain - target:self - action:@selector(nextAction)]; - _previousButton = - [[UIBarButtonItem alloc] initWithImage: - TTIMAGE(@"bundle://Three20.bundle/images/previousIcon.png") - style:UIBarButtonItemStylePlain - target:self - action:@selector(previousAction)]; - - UIBarButtonItem* playButton = - [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay - target:self - action:@selector(playAction)] - autorelease]; - playButton.tag = 1; - - UIBarItem* space = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem: - UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease]; - - _toolbar = [[UIToolbar alloc] initWithFrame: - CGRectMake(0, screenFrame.size.height - TT_ROW_HEIGHT, - screenFrame.size.width, TT_ROW_HEIGHT)]; - if (self.navigationBarStyle == UIBarStyleDefault) { - _toolbar.tintColor = TTSTYLEVAR(toolbarTintColor); - } - - _toolbar.barStyle = self.navigationBarStyle; - _toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleTopMargin; - _toolbar.items = [NSArray arrayWithObjects: - space, _previousButton, space, _nextButton, space, nil]; - [_innerView addSubview:_toolbar]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidUnload { - [super viewDidUnload]; - _scrollView.delegate = nil; - _scrollView.dataSource = nil; - TT_RELEASE_SAFELY(_innerView); - TT_RELEASE_SAFELY(_scrollView); - TT_RELEASE_SAFELY(_photoStatusView); - TT_RELEASE_SAFELY(_nextButton); - TT_RELEASE_SAFELY(_previousButton); - TT_RELEASE_SAFELY(_toolbar); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - [self updateToolbarWithOrientation:self.interfaceOrientation]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - [_scrollView cancelTouches]; - [self pauseAction]; - if (self.nextViewController) { - [self showBars:YES animated:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return TTIsSupportedOrientation(interfaceOrientation); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation - duration:(NSTimeInterval)duration { - [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; - [self updateToolbarWithOrientation:toInterfaceOrientation]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView *)rotatingFooterView { - return _toolbar; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showBars:(BOOL)show animated:(BOOL)animated { - [super showBars:show animated:animated]; - - CGFloat alpha = show ? 1 : 0; - if (alpha == _toolbar.alpha) - return; - - if (animated) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - if (show) { - [UIView setAnimationDidStopSelector:@selector(showBarsAnimationDidStop)]; - - } else { - [UIView setAnimationDidStopSelector:@selector(hideBarsAnimationDidStop)]; - } - - } else { - if (show) { - [self showBarsAnimationDidStop]; - - } else { - [self hideBarsAnimationDidStop]; - } - } - - [self showCaptions:show]; - - _toolbar.alpha = alpha; - - if (animated) { - [UIView commitAnimations]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldLoad { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldLoadMore { - return !_centerPhoto; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canShowModel { - return _photoSource.numberOfPhotos > 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didRefreshModel { - [super didRefreshModel]; - [self updatePhotoView]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didLoadModel:(BOOL)firstTime { - [super didLoadModel:firstTime]; - if (firstTime) { - [self updatePhotoView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showLoading:(BOOL)show { - [self showProgress:show ? 0 : -1]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showEmpty:(BOOL)show { - if (show) { - [_scrollView reloadData]; - [self showStatus:TTLocalizedString(@"This photo set contains no photos.", @"")]; - - } else { - [self showStatus:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showError:(BOOL)show { - if (show) { - [self showStatus:TTDescriptionForError(_modelError)]; - - } else { - [self showStatus:nil]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)moveToNextValidPhoto { - if (_centerPhotoIndex >= _photoSource.numberOfPhotos) { - // We were positioned at an index that is past the end, so move to the last photo - [self moveToPhotoAtIndex:_photoSource.numberOfPhotos - 1 withDelay:NO]; - - } else { - [self moveToPhotoAtIndex:_centerPhotoIndex withDelay:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidFinishLoad:(id)model { - if (model == _model) { - if (_centerPhotoIndex >= _photoSource.numberOfPhotos) { - [self moveToNextValidPhoto]; - [_scrollView reloadData]; - [self resetVisiblePhotoViews]; - - } else { - [self updateVisiblePhotoViews]; - } - } - [super modelDidFinishLoad:model]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didFailLoadWithError:(NSError*)error { - if (model == _model) { - [self resetVisiblePhotoViews]; - } - [super model:model didFailLoadWithError:error]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidCancelLoad:(id)model { - if (model == _model) { - [self resetVisiblePhotoViews]; - } - [super modelDidCancelLoad:model]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didUpdateObject:(id)object atIndexPath:(NSIndexPath*)indexPath { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didInsertObject:(id)object atIndexPath:(NSIndexPath*)indexPath { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didDeleteObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - if (object == self.centerPhoto) { - [self showActivity:nil]; - [self moveToNextValidPhoto]; - [_scrollView reloadData]; - [self refresh]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTScrollViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollView:(TTScrollView*)scrollView didMoveToPageAtIndex:(NSInteger)pageIndex { - if (pageIndex != _centerPhotoIndex) { - [self moveToPhotoAtIndex:pageIndex withDelay:YES]; - [self refresh]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewWillBeginDragging:(TTScrollView *)scrollView { - [self cancelImageLoadTimer]; - [self showCaptions:NO]; - [self showBars:NO animated:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidEndDecelerating:(TTScrollView*)scrollView { - [self startImageLoadTimer:kPhotoLoadShortDelay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewWillRotate:(TTScrollView*)scrollView - toOrientation:(UIInterfaceOrientation)orientation { - self.centerPhotoView.hidesExtras = YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidRotate:(TTScrollView*)scrollView { - self.centerPhotoView.hidesExtras = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)scrollViewShouldZoom:(TTScrollView*)scrollView { - return self.centerPhotoView.image != self.centerPhotoView.defaultImage; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidBeginZooming:(TTScrollView*)scrollView { - self.centerPhotoView.hidesExtras = YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidEndZooming:(TTScrollView*)scrollView { - self.centerPhotoView.hidesExtras = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollView:(TTScrollView*)scrollView tapped:(UITouch*)touch { - if ([self isShowingChrome]) { - [self showBars:NO animated:YES]; - - } else { - [self showBars:YES animated:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTScrollViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)numberOfPagesInScrollView:(TTScrollView*)scrollView { - return _photoSource.numberOfPhotos; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)scrollView:(TTScrollView*)scrollView pageAtIndex:(NSInteger)pageIndex { - TTPhotoView* photoView = (TTPhotoView*)[_scrollView dequeueReusablePage]; - if (!photoView) { - photoView = [self createPhotoView]; - photoView.captionStyle = _captionStyle; - photoView.defaultImage = _defaultImage; - photoView.hidesCaption = _toolbar.alpha == 0; - } - - id photo = [_photoSource photoAtIndex:pageIndex]; - [self showPhoto:photo inView:photoView]; - - return photoView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)scrollView:(TTScrollView*)scrollView sizeOfPageAtIndex:(NSInteger)pageIndex { - id photo = [_photoSource photoAtIndex:pageIndex]; - return photo ? photo.size : CGSizeZero; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTThumbsViewControllerDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)thumbsViewController:(TTThumbsViewController*)controller didSelectPhoto:(id)photo { - self.centerPhoto = photo; - - if ([self.navigationController isKindOfClass:[TTBaseNavigationController class]]) { - [(TTBaseNavigationController*)self.navigationController - popViewControllerAnimatedWithTransition:UIViewAnimationTransitionCurlUp]; - - } else { - [self.navigationController popViewControllerAnimated:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)thumbsViewController:(TTThumbsViewController*)controller - shouldNavigateToPhoto:(id)photo { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPhotoSource:(id)photoSource { - if (_photoSource != photoSource) { - [_photoSource release]; - _photoSource = [photoSource retain]; - - [self moveToPhotoAtIndex:0 withDelay:NO]; - self.model = _photoSource; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setCenterPhoto:(id)photo { - if (_centerPhoto != photo) { - if (photo.photoSource != _photoSource) { - [_photoSource release]; - _photoSource = [photo.photoSource retain]; - - [self moveToPhotoAtIndex:photo.index withDelay:NO]; - self.model = _photoSource; - - } else { - [self moveToPhotoAtIndex:photo.index withDelay:NO]; - [self refresh]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTPhotoView*)createPhotoView { - return [[[TTPhotoView alloc] init] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTThumbsViewController*)createThumbsViewController { - return [[[TTThumbsViewController alloc] initWithDelegate:self] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToPhoto:(id)photo fromPhoto:(id)fromPhoto { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showActivity:(NSString*)title { - if (title) { - TTActivityLabel* label = [[[TTActivityLabel alloc] - initWithStyle:TTActivityLabelStyleBlackBezel] autorelease]; - label.tag = kActivityLabelTag; - label.text = title; - label.frame = _scrollView.frame; - [_innerView addSubview:label]; - - _scrollView.scrollEnabled = NO; - - } else { - UIView* label = [_innerView viewWithTag:kActivityLabelTag]; - if (label) { - [label removeFromSuperview]; - } - - _scrollView.scrollEnabled = YES; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTPickerTextField.m b/src/Three20UI/Sources/TTPickerTextField.m deleted file mode 100644 index a0a3f9e108..0000000000 --- a/src/Three20UI/Sources/TTPickerTextField.m +++ /dev/null @@ -1,521 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTPickerTextField.h" - -// UI -#import "Three20UI/TTPickerTextFieldDelegate.h" -#import "Three20UI/TTTableViewDataSource.h" -#import "Three20UI/TTPickerViewCell.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20Style/UIFontAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static NSString* kEmpty = @" "; -static NSString* kSelected = @"`"; - -static const CGFloat kCellPaddingY = 3; -static const CGFloat kPaddingX = 8; -static const CGFloat kSpacingY = 6; -static const CGFloat kPaddingRatio = 1.75; -static const CGFloat kClearButtonSize = 38; -static const CGFloat kMinCursorWidth = 50; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTPickerTextField - -@synthesize cellViews = _cellViews; -@synthesize selectedCell = _selectedCell; -@synthesize lineCount = _lineCount; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _cellViews = [[NSMutableArray alloc] init]; - _lineCount = 1; - _cursorOrigin = CGPointZero; - - self.text = kEmpty; - self.contentVerticalAlignment = UIControlContentVerticalAlignmentTop; - self.clearButtonMode = UITextFieldViewModeNever; - self.returnKeyType = UIReturnKeyDone; - self.enablesReturnKeyAutomatically = NO; - - [self addTarget:self action:@selector(textFieldDidEndEditing) - forControlEvents:UIControlEventEditingDidEnd]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_cellViews); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)layoutCells { - CGFloat fontHeight = self.font.ttLineHeight; - CGFloat lineIncrement = fontHeight + kCellPaddingY*2 + kSpacingY; - CGFloat marginY = floor(fontHeight/kPaddingRatio); - CGFloat marginLeft = self.leftView - ? kPaddingX + self.leftView.width + kPaddingX/2 - : kPaddingX; - CGFloat marginRight = kPaddingX + (self.rightView ? kClearButtonSize : 0); - - _cursorOrigin.x = marginLeft; - _cursorOrigin.y = marginY; - _lineCount = 1; - - if (self.width) { - for (TTPickerViewCell* cell in _cellViews) { - [cell sizeToFit]; - - CGFloat lineWidth = _cursorOrigin.x + cell.frame.size.width + marginRight; - if (lineWidth >= self.width) { - _cursorOrigin.x = marginLeft; - _cursorOrigin.y += lineIncrement; - ++_lineCount; - } - - cell.frame = CGRectMake(_cursorOrigin.x, _cursorOrigin.y-kCellPaddingY, - cell.width, cell.height); - _cursorOrigin.x += cell.frame.size.width + kPaddingX; - } - - CGFloat remainingWidth = self.width - (_cursorOrigin.x + marginRight); - if (remainingWidth < kMinCursorWidth) { - _cursorOrigin.x = marginLeft; - _cursorOrigin.y += lineIncrement; - ++_lineCount; - } - } - - return _cursorOrigin.y + fontHeight + marginY; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateHeight { - CGFloat previousHeight = self.height; - CGFloat newHeight = [self layoutCells]; - if (previousHeight && newHeight != previousHeight) { - self.height = newHeight; - [self setNeedsDisplay]; - - SEL sel = @selector(textFieldDidResize:); - if ([self.delegate respondsToSelector:sel]) { - [self.delegate performSelector:sel withObject:self]; - } - - [self scrollToVisibleLine:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)marginY { - return floor(self.font.ttLineHeight/kPaddingRatio); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)topOfLine:(int)lineNumber { - if (lineNumber == 0) { - return 0; - - } else { - CGFloat ttLineHeight = self.font.ttLineHeight; - CGFloat lineSpacing = kCellPaddingY*2 + kSpacingY; - CGFloat marginY = floor(ttLineHeight/kPaddingRatio); - CGFloat lineTop = marginY + ttLineHeight*lineNumber + lineSpacing*lineNumber; - return lineTop - lineSpacing; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)centerOfLine:(int)lineNumber { - CGFloat lineTop = [self topOfLine:lineNumber]; - CGFloat ttLineHeight = self.font.ttLineHeight + kCellPaddingY*2 + kSpacingY; - return lineTop + floor(ttLineHeight/2); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)heightWithLines:(int)lines { - CGFloat ttLineHeight = self.font.ttLineHeight; - CGFloat lineSpacing = kCellPaddingY*2 + kSpacingY; - CGFloat marginY = floor(ttLineHeight/kPaddingRatio); - return marginY + ttLineHeight*lines + lineSpacing*(lines ? lines-1 : 0) + marginY; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)selectLastCell { - self.selectedCell = [_cellViews objectAtIndex:_cellViews.count-1]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)labelForObject:(id)object { - NSString* label = nil; - if ([_dataSource respondsToSelector:@selector(tableView:labelForObject:)]) { - label = [_dataSource tableView:_tableView labelForObject:object]; - } - return label ? label : [NSString stringWithFormat:@"%@", object]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - if (_dataSource) { - [self layoutCells]; - - } else { - _cursorOrigin.x = kPaddingX; - _cursorOrigin.y = [self marginY]; - if (self.leftView) { - _cursorOrigin.x += self.leftView.width + kPaddingX/2; - } - } - - [super layoutSubviews]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - [self layoutIfNeeded]; - CGFloat height = [self heightWithLines:_lineCount]; - return CGSizeMake(size.width, height); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { - [super touchesBegan:touches withEvent:event]; - - if (_dataSource) { - UITouch* touch = [touches anyObject]; - if (touch.view == self) { - self.selectedCell = nil; - - } else { - if ([touch.view isKindOfClass:[TTPickerViewCell class]]) { - self.selectedCell = (TTPickerViewCell*)touch.view; - [self becomeFirstResponder]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITextField - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(NSString*)text { - if (_dataSource) { - [self updateHeight]; - } - [super setText:text]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)textRectForBounds:(CGRect)bounds { - if (_dataSource && [self.text isEqualToString:kSelected]) { - // Hide the cursor while a cell is selected - return CGRectMake(-10, 0, 0, 0); - - } else { - CGRect frame = CGRectOffset(bounds, _cursorOrigin.x, _cursorOrigin.y); - frame.size.width -= (_cursorOrigin.x + kPaddingX + (self.rightView ? kClearButtonSize : 0)); - return frame; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)editingRectForBounds:(CGRect)bounds { - return [self textRectForBounds:bounds]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)placeholderRectForBounds:(CGRect)bounds { - return [self textRectForBounds:bounds]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)leftViewRectForBounds:(CGRect)bounds { - if (self.leftView) { - return CGRectMake( - bounds.origin.x+kPaddingX, self.marginY, - self.leftView.frame.size.width, self.leftView.frame.size.height); - - } else { - return bounds; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)rightViewRectForBounds:(CGRect)bounds { - if (self.rightView) { - return CGRectMake(bounds.size.width - kClearButtonSize, bounds.size.height - kClearButtonSize, - kClearButtonSize, kClearButtonSize); - - } else { - return bounds; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTSearchTextField - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasText { - return self.text.length && ![self.text isEqualToString:kEmpty] - && ![self.text isEqualToString:kSelected]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showSearchResults:(BOOL)show { - [super showSearchResults:show]; - if (show) { - [self scrollToEditingLine:YES]; - - } else { - [self scrollToVisibleLine:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)rectForSearchResults:(BOOL)withKeyboard { - UIView* superview = self.superviewForSearchResults; - CGFloat y = superview.ttScreenY; - CGFloat visibleHeight = [self heightWithLines:1]; - CGFloat keyboardHeight = withKeyboard ? TTKeyboardHeight() : 0; - CGFloat tableHeight = TTScreenBounds().size.height - (y + visibleHeight + keyboardHeight); - - return CGRectMake(0, self.bottom-1, superview.frame.size.width, tableHeight+1); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldUpdate:(BOOL)emptyText { - if (emptyText && !self.hasText && !self.selectedCell && self.cells.count) { - [self selectLastCell]; - return NO; - - } else if (emptyText && self.selectedCell) { - [self removeSelectedCell]; - [super shouldUpdate:emptyText]; - return NO; - - } else if (!emptyText && !self.hasText && self.selectedCell) { - [self removeSelectedCell]; - [super shouldUpdate:emptyText]; - return YES; - - } else { - return [super shouldUpdate:emptyText]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath { - [_tableView deselectRowAtIndexPath:indexPath animated:NO]; - - id object = [_dataSource tableView:tableView objectForRowAtIndexPath:indexPath]; - [self addCellWithObject:object]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIControlEvents - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textFieldDidEndEditing { - if (_selectedCell) { - self.selectedCell = nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSArray*)cells { - NSMutableArray* cells = [NSMutableArray array]; - for (TTPickerViewCell* cellView in _cellViews) { - [cells addObject:cellView.object ? cellView.object : [NSNull null]]; - } - return cells; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addCellWithObject:(id)object { - TTPickerViewCell* cell = [[[TTPickerViewCell alloc] init] autorelease]; - - NSString* label = [self labelForObject:object]; - - cell.object = object; - cell.label = label; - cell.font = self.font; - [_cellViews addObject:cell]; - [self addSubview:cell]; - - // Reset text so the cursor moves to be at the end of the cellViews - self.text = kEmpty; - - SEL sel = @selector(textField:didAddCellAtIndex:); - if ([self.delegate respondsToSelector:sel]) { - [self.delegate performSelector:sel withObject:self withObject:(id)(_cellViews.count-1)]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeCellWithObject:(id)object { - for (int i = 0; i < _cellViews.count; ++i) { - TTPickerViewCell* cell = [_cellViews objectAtIndex:i]; - if (cell.object == object) { - [_cellViews removeObjectAtIndex:i]; - [cell removeFromSuperview]; - - SEL sel = @selector(textField:didRemoveCellAtIndex:); - if ([self.delegate respondsToSelector:sel]) { - [self.delegate performSelector:sel withObject:self withObject:(id)i]; - } - break; - } - } - - // Reset text so the cursor oves to be at the end of the cellViews - self.text = self.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeAllCells { - while (_cellViews.count) { - TTPickerViewCell* cell = [_cellViews objectAtIndex:0]; - [cell removeFromSuperview]; - [_cellViews removeObjectAtIndex:0]; - } - - _selectedCell = nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSelectedCell:(TTPickerViewCell*)cell { - if (_selectedCell) { - _selectedCell.selected = NO; - } - - _selectedCell = cell; - - if (_selectedCell) { - _selectedCell.selected = YES; - self.text = kSelected; - - } else if (self.cells.count) { - self.text = kEmpty; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeSelectedCell { - if (_selectedCell) { - [self removeCellWithObject:_selectedCell.object]; - _selectedCell = nil; - - if (_cellViews.count) { - self.text = kEmpty; - - } else { - self.text = @""; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollToVisibleLine:(BOOL)animated { - if (self.editing) { - UIScrollView* scrollView = (UIScrollView*)[self ancestorOrSelfWithClass:[UIScrollView class]]; - if (scrollView) { - [scrollView setContentOffset:CGPointMake(0, self.top) animated:animated]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollToEditingLine:(BOOL)animated { - UIScrollView* scrollView = (UIScrollView*)[self ancestorOrSelfWithClass:[UIScrollView class]]; - if (scrollView) { - CGFloat offset = _lineCount == 1 ? 0 : [self topOfLine:_lineCount-1]; - [scrollView setContentOffset:CGPointMake(0, self.top+offset) animated:animated]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTPickerViewCell.m b/src/Three20UI/Sources/TTPickerViewCell.m deleted file mode 100644 index eab98b4f37..0000000000 --- a/src/Three20UI/Sources/TTPickerViewCell.m +++ /dev/null @@ -1,137 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTPickerViewCell.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kPaddingX = 8; -static const CGFloat kPaddingY = 3; -static const CGFloat kMaxWidth = 250; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTPickerViewCell - -@synthesize object = _object; -@synthesize selected = _selected; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _labelView = [[UILabel alloc] init]; - _labelView.backgroundColor = [UIColor clearColor]; - _labelView.textColor = TTSTYLEVAR(textColor); - _labelView.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - _labelView.lineBreakMode = UILineBreakModeTailTruncation; - [self addSubview:_labelView]; - - self.backgroundColor = [UIColor clearColor]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_object); - TT_RELEASE_SAFELY(_labelView); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - _labelView.frame = CGRectMake(kPaddingX, kPaddingY, - self.frame.size.width-kPaddingX*2, self.frame.size.height-kPaddingY*2); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - CGSize labelSize = [_labelView.text sizeWithFont:_labelView.font]; - CGFloat width = labelSize.width + kPaddingX*2; - return CGSizeMake(width > kMaxWidth ? kMaxWidth : width, labelSize.height + kPaddingY*2); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTStyle*)style { - if (self.selected) { - return TTSTYLESTATE(pickerCell:, UIControlStateSelected); - - } else { - return TTSTYLESTATE(pickerCell:, UIControlStateNormal); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)label { - return _labelView.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setLabel:(NSString*)label { - _labelView.text = label; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return _labelView.font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - _labelView.font = font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSelected:(BOOL)selected { - _selected = selected; - - _labelView.highlighted = selected; - [self setNeedsDisplay]; -} - - -@end diff --git a/src/Three20UI/Sources/TTPopupViewController.m b/src/Three20UI/Sources/TTPopupViewController.m deleted file mode 100644 index 9d9689a879..0000000000 --- a/src/Three20UI/Sources/TTPopupViewController.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTPopupViewController.h" - -// UICommon -#import "Three20UICommon/UIViewControllerAdditions.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTPopupViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _statusBarStyle = [UIApplication sharedApplication].statusBarStyle; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNibName:nil bundle:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - self.superController.popupViewController = nil; - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showInView:(UIView*)view animated:(BOOL)animated { -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated { -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated { -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissPopupViewControllerAnimated:(BOOL)animated { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canBeTopViewController { - return NO; -} - - -@end diff --git a/src/Three20UI/Sources/TTPostController.m b/src/Three20UI/Sources/TTPostController.m deleted file mode 100644 index 2eb90f206c..0000000000 --- a/src/Three20UI/Sources/TTPostController.m +++ /dev/null @@ -1,619 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTPostController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTPostControllerDelegate.h" -#import "Three20UI/TTActivityLabel.h" -#import "Three20UI/TTView.h" -#import "Three20UI/UIViewAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" - -// Core -#import "Three20Core/TTGlobalCoreLocale.h" -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/NSStringAdditions.h" -#import "Three20Core/TTGlobalCore.h" - -static const CGFloat kMarginX = 5; -static const CGFloat kMarginY = 6; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTPostController - -@synthesize result = _result; -@synthesize textView = _textView; -@synthesize originView = _originView; - -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.navigationItem.leftBarButtonItem = - [[[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemCancel - target: self - action: @selector(cancel)] autorelease]; - self.navigationItem.rightBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle: TTLocalizedString(@"Done", @"") - style: UIBarButtonItemStyleDone - target: self - action: @selector(post)] autorelease]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNavigatorURL:(NSURL*)URL query:(NSDictionary*)query { - if (self = [self initWithNibName:nil bundle:nil]) { - if (nil != query) { - _delegate = [query objectForKey:@"delegate"]; - _defaultText = [[query objectForKey:@"text"] copy]; - - self.navigationItem.title = [query objectForKey:@"title"]; - - self.originView = [query objectForKey:@"__target__"]; - NSValue* originRect = [query objectForKey:@"originRect"]; - if (nil != originRect) { - _originRect = [originRect CGRectValue]; - } - } - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_result); - TT_RELEASE_SAFELY(_defaultText); - TT_RELEASE_SAFELY(_originView); - TT_RELEASE_SAFELY(_textView); - TT_RELEASE_SAFELY(_navigationBar); - TT_RELEASE_SAFELY(_innerView); - TT_RELEASE_SAFELY(_activityView); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)stripWhitespace:(NSString*)text { - if (nil != text) { - NSCharacterSet* whitespace = [NSCharacterSet whitespaceCharacterSet]; - return [text stringByTrimmingCharactersInSet:whitespace]; - - } else { - return @""; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showKeyboard { - UIApplication* app = [UIApplication sharedApplication]; - _originalStatusBarStyle = app.statusBarStyle; - _originalStatusBarHidden = app.statusBarHidden; - if (!_originalStatusBarHidden) { -#ifdef __IPHONE_3_2 - if ([app respondsToSelector:@selector(setStatusBarHidden:withAnimation:)]) - [app setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide]; - else -#endif - [app setStatusBarHidden:NO animated:YES]; - [app setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:YES]; - } - [_textView becomeFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)hideKeyboard { - UIApplication* app = [UIApplication sharedApplication]; -#ifdef __IPHONE_3_2 - if ([app respondsToSelector:@selector(setStatusBarHidden:withAnimation:)]) - [app setStatusBarHidden:_originalStatusBarHidden withAnimation:UIStatusBarAnimationSlide]; - else -#endif - [app setStatusBarHidden:_originalStatusBarHidden animated:YES]; - [app setStatusBarStyle:_originalStatusBarStyle animated:NO]; - [_textView resignFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGAffineTransform)transformForOrientation { - return TTRotateTransformForOrientation(TTInterfaceOrientation()); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showActivity:(NSString*)activityText { - if (nil == _activityView) { - _activityView = [[TTActivityLabel alloc] initWithStyle:TTActivityLabelStyleWhiteBox]; - [self.view addSubview:_activityView]; - } - - if (nil != activityText) { - _activityView.text = activityText; - _activityView.frame = CGRectOffset(CGRectInset(_textView.frame, 13, 13), 2, 0); - _activityView.hidden = NO; - _textView.hidden = YES; - self.navigationItem.rightBarButtonItem.enabled = NO; - - } else { - _activityView.hidden = YES; - _textView.hidden = NO; - self.navigationItem.rightBarButtonItem.enabled = YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutTextEditor { - CGFloat keyboard = TTKeyboardHeightForOrientation(TTInterfaceOrientation()); - _screenView.frame = CGRectMake(0, _navigationBar.bottom, - self.view.orientationWidth, - self.view.orientationHeight - (keyboard+_navigationBar.height)); - - _textView.frame = CGRectMake(kMarginX, kMarginY+_navigationBar.height, - _screenView.width - kMarginX*2, - _screenView.height - kMarginY*2); - _textView.hidden = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showAnimationDidStop { - _textView.hidden = NO; - - [self.superController viewDidDisappear:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissAnimationDidStop { - if ([_delegate respondsToSelector:@selector(postController:didPostText:withResult:)]) { - [_delegate postController:self didPostText:_textView.text withResult:_result]; - } - - TT_RELEASE_SAFELY(_originView); - [self dismissPopupViewControllerAnimated:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)fadeOut { - _originView.hidden = NO; - TT_RELEASE_SAFELY(_originView); - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(fadeAnimationDidStop)]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - self.view.alpha = 0; - [UIView commitAnimations]; - - [self hideKeyboard]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)fadeAnimationDidStop { - [self dismissPopupViewControllerAnimated:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissWithCancel { - if ([_delegate respondsToSelector:@selector(postControllerDidCancel:)]) { - [_delegate postControllerDidCancel:self]; - } - - BOOL animated = YES; - - [self.superController viewWillAppear:animated]; - [self dismissPopupViewControllerAnimated:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - [super loadView]; - self.view.frame = [UIScreen mainScreen].applicationFrame; - self.view.backgroundColor = [UIColor clearColor]; - self.view.autoresizesSubviews = YES; - - _innerView = [[UIView alloc] init]; - _innerView.backgroundColor = [UIColor blackColor]; - _innerView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; - _innerView.autoresizesSubviews = YES; - [self.view addSubview:_innerView]; - - _screenView = [[TTView alloc] init]; - _screenView.backgroundColor = [UIColor clearColor]; - _screenView.style = TTSTYLE(postTextEditor); - _screenView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; - _screenView.autoresizesSubviews = YES; - [self.view addSubview:_screenView]; - - _textView = [[UITextView alloc] init]; - _textView.delegate = self; - _textView.font = TTSTYLEVAR(font); - _textView.textColor = [UIColor blackColor]; - _textView.contentInset = UIEdgeInsetsMake(0, 4, 0, 4); - _textView.keyboardAppearance = UIKeyboardAppearanceAlert; - _textView.backgroundColor = [UIColor clearColor]; - [self.view addSubview:_textView]; - - _navigationBar = [[UINavigationBar alloc] init]; - _navigationBar.barStyle = UIBarStyleBlackOpaque; - _navigationBar.autoresizingMask = UIViewAutoresizingFlexibleWidth; - [_navigationBar pushNavigationItem:self.navigationItem animated:NO]; - [_innerView addSubview:_navigationBar]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return TTIsSupportedOrientation(interfaceOrientation); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation - duration:(NSTimeInterval)duration { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - self.view.transform = [self transformForOrientation]; - self.view.frame = [UIScreen mainScreen].applicationFrame; - _innerView.frame = self.view.bounds; - [self layoutTextEditor]; - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)rotatingHeaderView { - return _navigationBar; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - [state setObject:[NSNumber numberWithBool:YES] forKey:@"__important__"]; - - NSString* delegate = [[TTNavigator navigator] pathForObject:_delegate]; - if (delegate) { - [state setObject:delegate forKey:@"delegate"]; - } - [state setObject:self.textView.text forKey:@"text"]; - - NSString* title = self.navigationItem.title; - - if (title) { - [state setObject:title forKey:@"title"]; - } - - return [super persistView:state]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreView:(NSDictionary*)state { - [super restoreView:state]; - NSString* delegate = [state objectForKey:@"delegate"]; - if (delegate) { - _delegate = [[TTNavigator navigator] objectForPath:delegate]; - } - NSString* title = [state objectForKey:@"title"]; - if (title) { - self.navigationItem.title = title; - } - _defaultText = [[state objectForKey:@"text"] retain]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTPopupViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showInView:(UIView*)view animated:(BOOL)animated { - [self retain]; - - [self.superController viewWillDisappear:animated]; - - UIWindow* window = view.window ? view.window : [UIApplication sharedApplication].keyWindow; - - self.view.transform = [self transformForOrientation]; - self.view.frame = [UIScreen mainScreen].applicationFrame; - [window addSubview:self.view]; - - if (_defaultText) { - _textView.text = _defaultText; - - } else { - _defaultText = [_textView.text retain]; - } - - _innerView.frame = self.view.bounds; - [_navigationBar sizeToFit]; - _originView.hidden = YES; - - if (animated) { - _innerView.alpha = 0; - _navigationBar.alpha = 0; - _textView.hidden = YES; - - CGRect originRect = _originRect; - if (CGRectIsEmpty(originRect) && _originView) { - originRect = _originView.screenFrame; - } - - if (!CGRectIsEmpty(originRect)) { - _screenView.frame = CGRectOffset(originRect, 0, -TTStatusHeight()); - - } else { - [self layoutTextEditor]; - _screenView.transform = CGAffineTransformMakeScale(0.00001, 0.00001); - } - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(showAnimationDidStop)]; - - _navigationBar.alpha = 1; - _innerView.alpha = 1; - - if (originRect.size.width) { - [self layoutTextEditor]; - - } else { - _screenView.transform = CGAffineTransformIdentity; - } - - [UIView commitAnimations]; - - } else { - _innerView.alpha = 1; - _screenView.transform = CGAffineTransformIdentity; - [self layoutTextEditor]; - [self showAnimationDidStop]; - } - - [self showKeyboard]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissPopupViewControllerAnimated:(BOOL)animated { - if (animated) { - [self fadeOut]; - - } else { - UIViewController* superController = self.superController; - [self.view removeFromSuperview]; - [self release]; - superController.popupViewController = nil; - [superController viewDidAppear:animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAlertViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { - if (buttonIndex == 0) { - [self dismissWithCancel]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITextView*)textView { - self.view; - return _textView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UINavigationBar*)navigatorBar { - if (!_navigationBar) { - self.view; - } - return _navigationBar; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setOriginView:(UIView*)view { - if (view != _originView) { - [_originView release]; - _originView = [view retain]; - _originRect = CGRectZero; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)post { - BOOL shouldDismiss = [self willPostText:_textView.text]; - if ([_delegate respondsToSelector:@selector(postController:willPostText:)]) { - shouldDismiss = [_delegate postController:self willPostText:_textView.text]; - } - - if (shouldDismiss) { - [self dismissWithResult:nil animated:YES]; - - } else { - [self showActivity:[self titleForActivity]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { - if (TTIsStringWithAnyText(_textView.text) - && !_textView.text.isWhitespaceAndNewlines - && !(_defaultText && [_defaultText isEqualToString:_textView.text])) { - UIAlertView* cancelAlertView = [[[UIAlertView alloc] initWithTitle: - TTLocalizedString(@"Cancel", @"") - message:TTLocalizedString(@"Are you sure you want to cancel?", @"") - delegate:self cancelButtonTitle:TTLocalizedString(@"Yes", @"") - otherButtonTitles:TTLocalizedString(@"No", @""), nil] autorelease]; - [cancelAlertView show]; - - } else { - [self dismissWithCancel]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissWithResult:(id)result animated:(BOOL)animated { - [_result release]; - _result = [result retain]; - - [self.superController viewWillAppear:animated]; - - if (animated) { - if ([_delegate respondsToSelector:@selector(postController:willAnimateTowards:)]) { - CGRect rect = [_delegate postController:self willAnimateTowards:_originRect]; - if (!CGRectIsEmpty(rect)) { - _originRect = rect; - } - } - - CGRect originRect = _originRect; - if (CGRectIsEmpty(originRect) && _originView) { - originRect = _originView.screenFrame; - } - - _originView.hidden = NO; - _activityView.hidden = YES; - _textView.hidden = YES; - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(dismissAnimationDidStop)]; - - if (!CGRectIsEmpty(originRect)) { - _screenView.frame = CGRectOffset(originRect, 0, -TTStatusHeight()); - - } else { - _screenView.transform = CGAffineTransformMakeScale(0.00001, 0.00001); - } - - _innerView.alpha = 0; - _navigationBar.alpha = 0; - - [UIView commitAnimations]; - - } else { - [self dismissAnimationDidStop]; - } - - [self hideKeyboard]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)failWithError:(NSError*)error { - [self showActivity:nil]; - - NSString* title = [self titleForError:error]; - if (title.length) { - UIAlertView* alertView = [[[UIAlertView alloc] initWithTitle:TTLocalizedString(@"Error", @"") - message:title delegate:nil cancelButtonTitle:TTLocalizedString(@"Ok", @"") - otherButtonTitles:nil] autorelease]; - [alertView show]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)willPostText:(NSString*)text { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForActivity { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForError:(NSError*)error { - return nil; -} - - -@end diff --git a/src/Three20UI/Sources/TTRecursiveProgress.m b/src/Three20UI/Sources/TTRecursiveProgress.m deleted file mode 100644 index 3cb3beab04..0000000000 --- a/src/Three20UI/Sources/TTRecursiveProgress.m +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTRecursiveProgress.h" - -// Core -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTRecursiveProgress - -@synthesize firstPercent = _firstPercent; -@synthesize lastPercent = _lastPercent; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)progressWithDelegate:(id)delegate { - return [[[self alloc] initWithDelegate:delegate] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)progressWithParent: (TTRecursiveProgress*)parent - firstPercent: (CGFloat)firstPercent - lastPercent: (CGFloat)lastPercent { - return [[[self alloc] initWithParent: parent - firstPercent: firstPercent - lastPercent: lastPercent] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithDelegate:(id)delegate { - if (self = [super init]) { - _firstPercent = 0; - _lastPercent = 1; - _parent = nil; - self.delegate = delegate; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithParent:(TTRecursiveProgress*)parent - firstPercent: (CGFloat)firstPercent - lastPercent: (CGFloat)lastPercent { - if (self = [super init]) { - _firstPercent = firstPercent; - _lastPercent = lastPercent; - _parent = parent; - _delegate = nil; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)percentWidth { - return _lastPercent - _firstPercent; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPercent:(CGFloat)percent { - CGFloat mappedProgress = [self percentWidth] * percent + _firstPercent; - if (nil == _parent) { - [_delegate didSetProgress:mappedProgress]; - - } else { - [_parent setPercent:mappedProgress]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)percent { - // You can't request progress from this object. - TTDASSERT(NO); - return 0; -} - -@end - diff --git a/src/Three20UI/Sources/TTScrollView.m b/src/Three20UI/Sources/TTScrollView.m deleted file mode 100755 index 9b7103f9b6..0000000000 --- a/src/Three20UI/Sources/TTScrollView.m +++ /dev/null @@ -1,1791 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTScrollView.h" - -// UI -#import "Three20UI/TTScrollViewDelegate.h" -#import "Three20UI/TTScrollViewDataSource.h" -#import "Three20UI/UIViewAdditions.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const NSInteger kOffscreenPages = 1; -static const CGFloat kDefaultPageSpacing = 40.0; -static const CGFloat kFlickThreshold = 60.0; -static const CGFloat kTapZoom = 0.75; -static const CGFloat kResistance = 0.15; -static const NSInteger kInvalidIndex = -1; -static const NSTimeInterval kFlickDuration = 0.4; -static const NSTimeInterval kBounceDuration = 0.3; -static const NSTimeInterval kOvershoot = 2; -static const CGFloat kIncreaseSpeed = 1.5; // How much increase after release touch. - // (Residual movement). -static const CGFloat kFrameDuration = 1.0/40.0; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTScrollView - -@synthesize delegate = _delegate; -@synthesize dataSource = _dataSource; -@synthesize centerPageIndex = _centerPageIndex; -@synthesize pageSpacing = _pageSpacing; -@synthesize scrollEnabled = _scrollEnabled; -@synthesize zoomEnabled = _zoomEnabled; -@synthesize rotateEnabled = _rotateEnabled; -@synthesize orientation = _orientation; -@synthesize holding = _holding; - -@synthesize holdsAfterTouchingForInterval = _holdsAfterTouchingForInterval; - -@synthesize decelerationRate = _decelerationRate; -@synthesize decelerating = _decelerating; - -@synthesize maximumZoomScale = _maximumZoomScale; -@synthesize zoomScale = _zoomScale; -@synthesize zooming = _executingZoomGesture; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.clipsToBounds = YES; - self.multipleTouchEnabled = YES; - self.userInteractionEnabled = YES; - - _maxPages = (kOffscreenPages*2) + 1; - _pages = [[NSMutableArray alloc] initWithCapacity:_maxPages]; - _pageQueue = [[NSMutableArray alloc] init]; - _pageSpacing = kDefaultPageSpacing; - _visiblePageIndex = kInvalidIndex; - _scrollEnabled = YES; - _zoomEnabled = YES; - _rotateEnabled = YES; - _orientation = UIDeviceOrientationPortrait; - _decelerationRate = 0.9; // Inertia, how faster slow the residual movement. - _maximumZoomScale = 4.0; // Maximum zoom scale default value. - - for (NSInteger i = 0; i < _maxPages; ++i) { - [_pages addObject:[NSNull null]]; - } - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(deviceOrientationDidChange:) - name:@"UIDeviceOrientationDidChangeNotification" object:nil]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self - name:@"UIDeviceOrientationDidChangeNotification" object:nil]; - - _delegate = nil; - [_animationTimer invalidate]; - [_tapTimer invalidate]; - TT_RELEASE_SAFELY(_animationStartTime); - TT_RELEASE_SAFELY(_pages); - TT_RELEASE_SAFELY(_pageQueue); - - TT_RELEASE_SAFELY(_touch1); - TT_RELEASE_SAFELY(_touch2); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isFirstPage { - return _centerPageIndex == 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLastPage { - return _centerPageIndex + 1 >= [_dataSource numberOfPagesInScrollView:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)draggingFromEdge { - return (_pageEdges.left < 0 && [self isLastPage]) - || (_pageEdges.left > 0 && [self isFirstPage]); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)flipped { - return _orientation == UIInterfaceOrientationLandscapeLeft - || _orientation == UIInterfaceOrientationPortraitUpsideDown; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)pinched { - return -_pageEdges.left + _pageEdges.right < 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)pulled { - return _pageEdges.left > 0 || _pageEdges.top > 0 - || _pageEdges.right < 0 || _pageEdges.bottom < 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)flicked { - if (!self.flipped) { - if (_pageEdges.left > kFlickThreshold && ![self isFirstPage]) { - return YES; - - } else if (_pageEdges.right < -kFlickThreshold && ![self isLastPage]) { - return YES; - - } else { - return NO; - } - - } else { - if (_pageEdges.left > kFlickThreshold && ![self isLastPage]) { - return YES; - - } else if (_pageEdges.right < -kFlickThreshold && ![self isFirstPage]) { - return YES; - - } else { - return NO; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)pageWidth { - if (UIInterfaceOrientationIsLandscape(_orientation)) { - return self.height; - - } else { - return self.width; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)pageHeight { - if (UIInterfaceOrientationIsLandscape(_orientation)) { - return self.width; - - } else { - return self.height; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)overshoot { - return _pageEdges.left < 0 ? -_overshoot : _overshoot; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// --(CGFloat)stretchedWidth { - return -_pageEdges.left + self.pageWidth + _pageEdges.right; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// --(CGFloat)stretchedHeight { - return -_pageEdges.top + self.pageHeight + _pageEdges.bottom; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)zoomFactor { - return self.stretchedWidth / self.pageWidth; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)frameOfPageAtIndex:(NSInteger)pageIndex { - CGSize size; - if ([_dataSource respondsToSelector:@selector(scrollView:sizeOfPageAtIndex:)]) { - size = [_dataSource scrollView:self sizeOfPageAtIndex:pageIndex]; - if (0 == size.width || 0 == size.height) { - size = CGSizeMake(self.pageWidth, self.pageHeight); - } - - } else { - size = CGSizeMake(self.pageWidth, self.pageHeight); - } - - CGFloat width, height; - if (UIInterfaceOrientationIsLandscape(_orientation)) { - if (size.width / size.height > self.width / self.height) { - height = self.height; - width = size.height/size.width * self.height; - - } else { - height = size.width/size.height * self.width; - width = self.width; - } - - } else { - if (size.width / size.height > self.width / self.height) { - width = self.width; - height = size.height/size.width * self.width; - - } else { - width = size.width/size.height * self.height; - height = self.height; - } - } - - CGFloat xd = width - self.width; - CGFloat yd = height - self.height; - return CGRectMake(-xd/2, -yd/2, width, height); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)overflowForFrame:(CGRect)frame { - if (UIInterfaceOrientationIsLandscape(_orientation)) { - return frame.origin.y < 0 ? fabs(frame.origin.y) : 0; - - } else { - return frame.origin.x < 0 ? fabs(frame.origin.x) : 0; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGPoint)offsetForOrientation:(CGFloat)x y:(CGFloat)y { - if (UIInterfaceOrientationIsLandscape(_orientation)) { - return CGPointMake(y, x); - - } else { - return CGPointMake(x, y); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation { - return orientation == UIInterfaceOrientationLandscapeLeft - || orientation == UIInterfaceOrientationLandscapeRight - || orientation == UIInterfaceOrientationPortrait - || orientation == UIInterfaceOrientationPortraitUpsideDown - || orientation == UIDeviceOrientationFaceDown - || orientation == UIDeviceOrientationFaceUp; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * TODO: Candidate for a more general purpose location. Pull the orientation into the method - * params and expose this method as a static method. - */ -- (CGAffineTransform)rotateTransform:(CGAffineTransform)transform { - if (_orientation == UIInterfaceOrientationLandscapeLeft) { - return CGAffineTransformRotate(transform, M_PI*1.5); - - } else if (_orientation == UIInterfaceOrientationLandscapeRight) { - return CGAffineTransformRotate(transform, M_PI/2); - - } else if (_orientation == UIInterfaceOrientationPortraitUpsideDown) { - return CGAffineTransformRotate(transform, -M_PI); - - } else { - return transform; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Get the location of the touch by taking into account the orientation. - * In landscape mode, the x and y values are flipped. - */ -- (CGPoint)touchLocation:(UITouch*)touch { - CGPoint point = [touch locationInView:self]; - if (UIInterfaceOrientationIsLandscape(_orientation)) { - return CGPointMake(point.y, point.x); - - } else { - return point; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)arrayIndexForPageIndex:(NSInteger)pageIndex relativeToIndex:(NSInteger)baseIndex { - NSInteger numberOfPages = self.numberOfPages; - if (0 == numberOfPages || pageIndex >= numberOfPages || pageIndex < 0) { - return kInvalidIndex; - } - - NSInteger indexDiff = pageIndex - baseIndex; - if (fabs(indexDiff) > kOffscreenPages) { - return kInvalidIndex; - } - - NSInteger arrayIndex = _pageArrayIndex + indexDiff; - - if (arrayIndex >= _maxPages) { - return arrayIndex - _maxPages; - - } else if (arrayIndex < 0) { - return _maxPages + arrayIndex; - - } else { - return arrayIndex; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)realPageIndex { - if (self.pinched) { - return _centerPageIndex; - - } else if (!self.flipped) { - if (_pageEdges.left > kFlickThreshold && ![self isFirstPage]) { - return _centerPageIndex - 1; - - } else if (_pageEdges.right < -kFlickThreshold && ![self isLastPage]) { - return _centerPageIndex + 1; - - } else { - return _centerPageIndex; - } - - } else { - if (_pageEdges.left > kFlickThreshold && ![self isLastPage]) { - return _centerPageIndex + 1; - - } else if (_pageEdges.right < -kFlickThreshold && ![self isFirstPage]) { - return _centerPageIndex - 1; - - } else { - return _centerPageIndex; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)pageAtIndex:(NSInteger)pageIndex create:(BOOL)create { - NSInteger arrayIndex = [self arrayIndexForPageIndex:pageIndex relativeToIndex:_centerPageIndex]; - if (arrayIndex == kInvalidIndex) { - return nil; - } - - UIView* page = [_pages objectAtIndex:arrayIndex]; - if ((NSNull*)page == [NSNull null]) { - if (create) { - page = [_dataSource scrollView:self pageAtIndex:pageIndex]; - page.multipleTouchEnabled = YES; - page.userInteractionEnabled = YES; - [self addSubview:page]; - [_pages replaceObjectAtIndex:arrayIndex withObject:page]; - - } else { - return nil; - } - } - - return page; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)enqueuePageAtIndex:(NSInteger)pageIndex { - NSInteger arrayIndex = [self arrayIndexForPageIndex:pageIndex relativeToIndex:_centerPageIndex]; - if (arrayIndex == kInvalidIndex) { - return nil; - } - - UIView* page = [_pages objectAtIndex:arrayIndex]; - - if ((NSNull*)page == [NSNull null]) { - return nil; - - } else { - [_pageQueue addObject:page]; - [_pages replaceObjectAtIndex:arrayIndex withObject:[NSNull null]]; - [page removeFromSuperview]; - } - - return page; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)enqueueAllPages { - for (NSInteger i = 0; i < _pages.count; ++i) { - UIView* page = [_pages objectAtIndex:i]; - - if ((NSNull*)page != [NSNull null]) { - [_pageQueue addObject:page]; - [_pages replaceObjectAtIndex:i withObject:[NSNull null]]; - [page removeFromSuperview]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)adjustPageEdgesForPageAtIndex:(NSInteger)pageIndex { - CGRect centerFrame = [self frameOfPageAtIndex:_centerPageIndex]; - CGFloat centerPageOverflow = [self overflowForFrame:centerFrame] * self.zoomFactor; - CGRect frame = [self frameOfPageAtIndex:pageIndex]; - CGFloat overflow = [self overflowForFrame:frame]; - - if (self.flipped) { - CGFloat factor = _centerPageIndex > pageIndex ? -1 : 1; - CGFloat xd = (self.pageWidth + _pageSpacing + centerPageOverflow + overflow) * factor; - CGFloat left = _pageEdges.right > 0 ? _pageEdges.right : _pageEdges.left; - CGFloat right = _pageEdges.left < 0 ? _pageEdges.left : _pageEdges.right; - _pageEdges = _pageStartEdges = UIEdgeInsetsMake(0, left - xd, 0, right - xd); - - } else { - CGFloat factor = _centerPageIndex > pageIndex ? 1 : -1; - CGFloat xd = (self.pageWidth + _pageSpacing + centerPageOverflow + overflow) * factor; - CGFloat left = _pageEdges.right < 0 ? _pageEdges.right : _pageEdges.left; - CGFloat right = _pageEdges.left > 0 ? _pageEdges.left : _pageEdges.right; - _pageEdges = _pageStartEdges = UIEdgeInsetsMake(0, right - xd, 0, left - xd); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)moveToPageAtIndex:(NSInteger)pageIndex resetEdges:(BOOL)resetEdges { - if (resetEdges) { - _pageEdges = _pageStartEdges = UIEdgeInsetsZero; - _zooming = NO; - [self setNeedsLayout]; - - } else if (pageIndex != _centerPageIndex) { - [self adjustPageEdgesForPageAtIndex:pageIndex]; - _zooming = NO; - } - - NSInteger indexDiff = pageIndex - _centerPageIndex; - if (indexDiff) { - if (fabs(indexDiff) <= kOffscreenPages) { - if (indexDiff > 0) { - NSInteger edgeIndex = _centerPageIndex - kOffscreenPages; - NSInteger newEdgeIndex = pageIndex - kOffscreenPages; - for (int i = edgeIndex; i < newEdgeIndex; ++i) { - [self enqueuePageAtIndex:i]; - } - - } else if (indexDiff < 0) { - NSInteger edgeIndex = _centerPageIndex + kOffscreenPages; - NSInteger newEdgeIndex = pageIndex + kOffscreenPages; - for (int i = edgeIndex; i > newEdgeIndex; --i) { - [self enqueuePageAtIndex:i]; - } - } - - } else { - [self reloadData]; - } - - _pageArrayIndex = [self arrayIndexForPageIndex:pageIndex relativeToIndex:_centerPageIndex]; - _centerPageIndex = pageIndex; - [self setNeedsLayout]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutPage { - UIView* page = [self pageAtIndex:_centerPageIndex create:YES]; - if (nil != page) { - CGAffineTransform rotation = TTRotateTransformForOrientation(_orientation); - CGPoint offset = [self offsetForOrientation:_pageEdges.left y:_pageEdges.top]; - CGRect frame = [self frameOfPageAtIndex:_centerPageIndex]; - - if (self.zoomed) { - CGFloat zoom = self.zoomFactor; - - page.transform = [self rotateTransform:CGAffineTransformScale( - CGAffineTransformMakeTranslation(offset.x, offset.y), zoom, zoom)]; - page.frame = CGRectMake(offset.x + frame.origin.x*zoom, offset.y + frame.origin.y*zoom, - frame.size.width*zoom, frame.size.height*zoom); - - } else { - page.transform = rotation; - page.frame = CGRectMake(offset.x + frame.origin.x, offset.y + frame.origin.y, - frame.size.width, frame.size.height); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutAdjacentPages { - BOOL flipped = self.flipped; - BOOL pinched = self.pinched; - CGAffineTransform rotation = TTRotateTransformForOrientation(_orientation); - - NSInteger minPageIndex = _centerPageIndex - kOffscreenPages; - NSInteger maxPageIndex = _centerPageIndex + kOffscreenPages; - - CGRect centerFrame = [self frameOfPageAtIndex:_centerPageIndex]; - CGFloat centerPageOverflow = [self overflowForFrame:centerFrame] * self.zoomFactor; - - CGFloat overflow = centerPageOverflow; - for (NSInteger i = _centerPageIndex - 1; i >= 0 && i >= minPageIndex; --i) { - UIView* page = [self pageAtIndex:i create:YES]; - if (page) { - CGRect frame = [self frameOfPageAtIndex:i]; - overflow += [self overflowForFrame:frame]; - - NSInteger relativeIndex = -(_centerPageIndex - i); - CGFloat x = flipped - ? ((self.pageWidth + _pageSpacing) * -relativeIndex) + _pageEdges.right + overflow - : ((self.pageWidth + _pageSpacing) * relativeIndex) + _pageEdges.left - overflow; - CGPoint offset = [self offsetForOrientation:x y:0]; - - page.transform = rotation; - page.frame = CGRectMake(offset.x + frame.origin.x, offset.y + frame.origin.y, - frame.size.width, frame.size.height); - page.hidden = pinched; - } - } - - overflow = centerPageOverflow; - NSInteger pageCount = [_dataSource numberOfPagesInScrollView:self]; - for (NSInteger i = _centerPageIndex + 1; i < pageCount && i <= maxPageIndex; ++i) { - UIView* page = [self pageAtIndex:i create:YES]; - if (page) { - CGRect frame = [self frameOfPageAtIndex:i]; - overflow += [self overflowForFrame:frame]; - - NSInteger relativeIndex = i - _centerPageIndex; - CGFloat x = flipped - ? ((self.pageWidth + _pageSpacing) * -relativeIndex) + _pageEdges.left - overflow - : ((self.pageWidth + _pageSpacing) * relativeIndex) + _pageEdges.right + overflow; - CGPoint offset = [self offsetForOrientation:x y:0]; - - page.transform = rotation; - page.frame = CGRectMake(offset.x + frame.origin.x, offset.y + frame.origin.y, - frame.size.width, frame.size.height); - page.hidden = pinched; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)stretchTouchEdges:(UIEdgeInsets)edges toPoint:(CGPoint)point { - UIEdgeInsets newEdges = edges; - if (!edges.left || point.x < edges.left) { - newEdges.left = point.x; - } - if (!edges.right || point.x > edges.right) { - newEdges.right = point.x; - } - if (!edges.top || point.y < edges.top) { - newEdges.top = point.y; - } - if (!edges.bottom || point.y > edges.bottom) { - newEdges.bottom = point.y; - } - - return newEdges; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)touchEdgesForPoint:(CGPoint)point { - return [self stretchTouchEdges:UIEdgeInsetsZero toPoint:point]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)squareTouchEdges:(UIEdgeInsets)edges { - //if (_touchCount == 1) { - return edges; - - //} else { - // ******** - // - // This math isn't used anymore since we rewrote the zoom engine. - // Still here, for reference and nothing more. - // - /* CGFloat width = edges.right - edges.left; - CGFloat height = edges.bottom - edges.top; - CGFloat d = sqrt((width*width) + (height*height)); - CGFloat midX = edges.left + (width/1.3); - CGFloat midY = edges.top + (height/1.3); - - return UIEdgeInsetsMake(midY - d/2, midX - d/2, midY + d/2, midX + d/2);*/ - //} -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)zoomPageEdgesTo:(CGPoint)point { -// ******** -// -// This math isn't used anymore since we rewrote the zoom engine. -// Still here, for reference and nothing more. -/* - - UIEdgeInsets edges = _pageEdges; - - CGFloat zoom = kTapZoom * self.pageWidth; - CGFloat r = self.pageHeight / self.pageWidth; - - CGFloat xd = self.pageWidth/2 - point.x; - CGFloat yd = self.pageHeight/2 - point.y; - - edges.left = (-zoom + xd); - edges.right = zoom + xd; - edges.top = (-zoom + yd) * r; - edges.bottom = (zoom + yd) * r; - - if (edges.left > 0) { - edges.right += edges.left; - edges.left = 0; - - } else if (edges.right < 0) { - edges.left += -edges.right; - edges.right = 0; - } - - if (edges.top > 0) { - edges.bottom += edges.top; - edges.top = 0; - - } else if (edges.bottom < 0) { - edges.top += -edges.bottom; - edges.bottom = 0; - } -*/ - return UIEdgeInsetsZero; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)reversePageEdges { - UIEdgeInsets edges = _pageEdges; - - edges.left = -edges.left; - edges.right = -edges.right; - edges.top = -edges.top; - edges.bottom = -edges.bottom; - - return edges; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)constrainEdges:(UIEdgeInsets)edges toWidth:(CGFloat)constrainedWidth { - CGFloat constrainedHeight = constrainedWidth * (self.pageHeight/self.pageWidth); - - CGFloat height = -edges.top + self.pageHeight + edges.bottom; - CGFloat width = -edges.left + self.pageWidth + edges.right; - - CGFloat xd = constrainedWidth - width; - CGFloat yd = constrainedHeight - height; - - return UIEdgeInsetsMake(edges.top - yd/2, edges.left - xd/2, - edges.bottom + yd/2, edges.right + xd/2); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)resist:(CGFloat)x1 to:(CGFloat)x2 max:(CGFloat)max { - // The closer we get to the maximum, the less we are allowed to increment - CGFloat rl = (1 - (fabs(x2) / max)) * kResistance; - if (rl < 0) rl = 0; - if (rl > 1) rl = 1; - return x1 + ((x2 - x1) * rl); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)resistPageEdges:(UIEdgeInsets)edges { - CGFloat left = edges.left, right = edges.right, top = edges.top, bottom = edges.bottom; - CGFloat width = self.pageWidth, height = self.pageHeight; - - if (-left + right < 0 || -top + bottom < 0) { - CGFloat zoom = self.zoomFactor; - left = [self resist:_pageEdges.left to:left max:width * zoom]; - right = [self resist:_pageEdges.right to:right max:width * zoom]; - top = [self resist:_pageEdges.top to:top max:height * zoom]; - bottom = [self resist:_pageEdges.bottom to:bottom max:height * zoom]; - - } else { - if (_touchCount == 2 || self.zoomed) { - if (top > 0) { - top = [self resist:_pageEdges.top to:top max:height]; - if (_touchCount == 2) { - bottom = bottom + (top - _pageEdges.top); - - } else { - bottom = _pageEdges.bottom + (top - _pageEdges.top); - } - - CGFloat newHeight = -top + height + bottom; - CGFloat newWidth = (width/height) * newHeight; - CGFloat xd = newWidth - (-left + width + right); - left -= xd/2; - right += xd/2; - - } else if (bottom < 0) { - bottom = [self resist:_pageEdges.bottom to:bottom max:height]; - if (_touchCount == 2) { - top = top + (bottom - _pageEdges.bottom); - - } else { - top = _pageEdges.top + (bottom - _pageEdges.bottom); - } - - CGFloat newHeight = -top + height + bottom; - CGFloat newWidth = (width/height) * newHeight; - CGFloat xd = newWidth - (-left + width + right); - left -= xd/2; - right += xd/2; - } - } - - BOOL flipped = self.flipped; - BOOL flickPrevious = (!flipped && left > 0) || (flipped && left < 0); - BOOL flickNext = (!flipped && right < 0) || (flipped && right > 0); - if (flickPrevious && [self isFirstPage] && !self.zoomed) { - left = [self resist:_pageEdges.left to:left max:width]; - if (_touchCount == 2) { - right = right + (left - _pageEdges.left); - - } else { - right = _pageEdges.right + (left - _pageEdges.left); - } - - CGFloat newWidth = -left + width + right; - CGFloat newHeight = (height/width) * newWidth; - CGFloat yd = newHeight - (-top + height + bottom); - top -= yd/2; - bottom += yd/2; - - } else if (flickNext && [self isLastPage] && !self.zoomed) { - right = [self resist:_pageEdges.right to:right max:width]; - if (_touchCount == 2) { - left = left + (right - _pageEdges.right); - - } else { - left = _pageEdges.left + (right - _pageEdges.right); - } - CGFloat newWidth = -left + width + right; - CGFloat newHeight = (height/width) * newWidth; - CGFloat yd = newHeight - (-top + height + bottom); - top -= yd/2; - bottom += yd/2; - } - } - - return UIEdgeInsetsMake(top, left, bottom, right); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)pageEdgesForAnimation { - CGFloat left = 0, right = 0, top = 0, bottom = 0; - - if (self.pinched) { - left = -_pageEdges.left; - right = -_pageEdges.right; - top = -_pageEdges.top; - bottom = -_pageEdges.bottom; - - } else if (self.flicked) { - CGRect centerFrame = [self frameOfPageAtIndex:_centerPageIndex]; - CGFloat centerPageOverflow = [self overflowForFrame:centerFrame] * self.zoomFactor; - - if (_pageEdges.left < 0) { - CGRect frame = [self frameOfPageAtIndex:_centerPageIndex + (self.flipped ? -1 : 1)]; - CGFloat overflow = centerPageOverflow + [self overflowForFrame:frame]; - if (fabs(_pageStartEdges.left) >= fabs(_pageEdges.right)) { - left = right = -((self.pageWidth + _pageSpacing) - + _pageEdges.right + _overshoot + overflow); - - } else { - left = right = -((self.pageWidth + _pageSpacing) - + _pageEdges.left + _overshoot + overflow); - } - - } else { - CGRect frame = [self frameOfPageAtIndex:_centerPageIndex + (self.flipped ? 1 : -1)]; - CGFloat overflow = centerPageOverflow + [self overflowForFrame:frame]; - if (fabs(_pageEdges.left) >= fabs(_pageEdges.right)) { - left = right = ((self.pageWidth + _pageSpacing) - - _pageEdges.right + _overshoot + overflow); - - } else { - left = right = ((self.pageWidth + _pageSpacing) - - _pageEdges.left + _overshoot + overflow); - } - } - - } else { - if (_pageEdges.left > 0) { - left = right = -_pageEdges.left; - - } else if (_pageEdges.right < 0) { - left = right = -_pageEdges.right; - } - - if (_pageEdges.top > 0) { - top = bottom = -_pageEdges.top; - - } else if (_pageEdges.bottom < 0) { - top = bottom = -_pageEdges.bottom; - } - } - - return UIEdgeInsetsMake(top, left, bottom, right); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)acquireTouch:(UITouch*)touch { - if (nil == _touch1) { - TT_RELEASE_SAFELY(_touch1); - _touch1 = [touch retain]; - ++_touchCount; - - } else if (nil == _touch2) { - TT_RELEASE_SAFELY(_touch2); - _touch2 = [touch retain]; - ++_touchCount; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITouch*)removeTouch:(UITouch*)touch { - if (touch == _touch1) { - TT_RELEASE_SAFELY(_touch1); - --_touchCount; - return _touch2; - - } else if (touch == _touch2) { - TT_RELEASE_SAFELY(_touch2); - --_touchCount; - return _touch1; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canZoom { - return _zoomEnabled && !_holding - && (_zooming || ![_delegate respondsToSelector:@selector(scrollViewShouldZoom:)] - || [_delegate scrollViewShouldZoom:self]); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)edgesAreZoomed:(UIEdgeInsets)edges { - return edges.left != edges.right || edges.top != edges.bottom; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateZooming:(UIEdgeInsets)edges { - if (!_zooming && (self.zoomed || [self edgesAreZoomed:edges])) { - _zooming = YES; - self.centerPage.userInteractionEnabled = NO; - - if ([_delegate respondsToSelector:@selector(scrollViewDidBeginZooming:)]) { - [_delegate scrollViewDidBeginZooming:self]; - } - - } else if (_zooming && !self.zoomed) { - _zooming = NO; - self.centerPage.userInteractionEnabled = YES; - - if ([_delegate respondsToSelector:@selector(scrollViewDidEndZooming:)]) { - [_delegate scrollViewDidEndZooming:self]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)stopDragging:(BOOL)willDecelerate { - if (_dragging) { - _dragging = NO; - - if ([_delegate respondsToSelector:@selector(scrollViewDidEndDragging:willDecelerate:)]) { - [_delegate scrollViewDidEndDragging:self willDecelerate:willDecelerate]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)rotationDidStop { - if ([_delegate respondsToSelector:@selector(scrollViewDidRotate:)]) { - [_delegate scrollViewDidRotate:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)startTapTimer:(UITouch*)touch { - _tapTimer = [NSTimer scheduledTimerWithTimeInterval:0.2 target:self selector:@selector(tapTimer:) - userInfo:touch repeats:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tapTimer:(NSTimer*)timer { - _tapTimer = nil; - - if ([_delegate respondsToSelector:@selector(scrollView:tapped:)]) { - UITouch* touch = timer.userInfo; - [_delegate scrollView:self tapped:touch]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Begin the "holding" action on the view. - * This occurs after the number of seconds defined by _holdsAfterTouchingForInterval. - */ -- (void)beginHolding { - _holdingTimer = nil; - _holding = YES; - - if ([_delegate respondsToSelector:@selector(scrollViewDidBeginHolding:)]) { - [_delegate scrollViewDidBeginHolding:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endHolding { - _holding = NO; - - if ([_delegate respondsToSelector:@selector(scrollViewDidEndHolding:)]) { - [_delegate scrollViewDidEndHolding:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)holdingTimer:(NSTimer*)timer { - _holdingTimer = nil; - [self beginHolding]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)startAnimationTo:(UIEdgeInsets)edges duration:(NSTimeInterval)duration { - if (!_animationTimer) { - _pageStartEdges = _pageEdges; - [self updateZooming:edges]; - TT_INVALIDATE_TIMER(_tapTimer); - - _animateEdges = edges; - _animationDuration = duration; - _animationStartTime = [[NSDate date] retain]; - _animationTimer = [NSTimer scheduledTimerWithTimeInterval:kFrameDuration target:self - selector:@selector(animator) userInfo:nil repeats:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)stopAnimation:(BOOL)resetEdges { - if (_animationTimer) { - [_animationTimer invalidate]; - _animationTimer = nil; - TT_RELEASE_SAFELY(_animationStartTime); - _overshoot = 0; - [self updateZooming:UIEdgeInsetsZero]; - - NSInteger realIndex = [self realPageIndex]; - if (realIndex != _centerPageIndex || self.pinched) { - [self moveToPageAtIndex:realIndex resetEdges:resetEdges]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)tween:(NSTimeInterval)t b:(NSTimeInterval)b c:(NSTimeInterval)c d:(NSTimeInterval)d { - t = t/d-1; - return c*(t*t*t + 1) + b; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)animator { - NSTimeInterval kt = -[_animationStartTime timeIntervalSinceNow]; - CGFloat pct = kt ? [self tween:kt b:0 c:kt d:_animationDuration]/kt : 0; - if (pct > 1.0) { - pct = 1.0; - } - - _pageEdges.left = _pageStartEdges.left + _animateEdges.left * pct; - _pageEdges.right = _pageStartEdges.right + _animateEdges.right * pct; - _pageEdges.top = _pageStartEdges.top + _animateEdges.top * pct; - _pageEdges.bottom = _pageStartEdges.bottom + _animateEdges.bottom * pct; - - [self setNeedsLayout]; - - if (pct == 1.0) { - [self layoutIfNeeded]; - - if (_overshoot) { - TT_RELEASE_SAFELY(_animationStartTime); - [_animationTimer invalidate]; - _animationTimer = nil; - [self startAnimationTo:UIEdgeInsetsMake(0, self.overshoot, 0, self.overshoot) duration:0.1]; - _overshoot = 0; - - } else { - [self stopAnimation:NO]; - - if ([_delegate respondsToSelector:@selector(scrollViewDidEndDecelerating:)]) { - [_delegate scrollViewDidEndDecelerating:self]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * This method isn't being used anywhere. - */ -- (void)animator2 { - NSTimeInterval kt = -[_animationStartTime timeIntervalSinceNow]; - CGFloat pct = kt ? [self tween:kt b:0 c:kt d:_animationDuration]/kt : 0; - if (pct > 1.0) { - pct = 1.0; - } - - _pageEdges.left = _pageStartEdges.left + _animateEdges.left * pct; - _pageEdges.right = _pageStartEdges.right + _animateEdges.right * pct; - _pageEdges.top = _pageStartEdges.top + _animateEdges.top * pct; - _pageEdges.bottom = _pageStartEdges.bottom + _animateEdges.bottom * pct; - - [self setNeedsLayout]; - - if (pct == 1.0) { - [self layoutIfNeeded]; - [self stopAnimation:YES]; - - if ([_delegate respondsToSelector:@selector(scrollViewDidEndDecelerating:)]) { - [_delegate scrollViewDidEndDecelerating:self]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Animate deceleration. - */ --(void)inertiaAnimator { - // Inertia, slowing the speed. If are pulled, double inertia (Slow MUCH faster). - _inertiaSpeed.x *= (self.pulled ? _decelerationRate / 2 : _decelerationRate); - _inertiaSpeed.y *= (self.pulled ? _decelerationRate / 2 : _decelerationRate); - - // Calculate Edges based on Speed. - CGFloat top = _pageEdges.top + _inertiaSpeed.y; - CGFloat left = _pageEdges.left + _inertiaSpeed.x; - CGFloat right = _pageEdges.right + _inertiaSpeed.x; - CGFloat bottom = _pageEdges.bottom + _inertiaSpeed.y; - - // Format New Edges. - UIEdgeInsets newEdges = UIEdgeInsetsMake(top, left, bottom, right); - - // Update Zooming. - [self updateZooming:newEdges]; - - // Apply New Edges and Relayout. - _pageEdges = newEdges; [self setNeedsLayout]; - - // Neligible speed, stop. - if (abs(_inertiaSpeed.x) < 0.05 && abs(_inertiaSpeed.y) < 0.05) { - // Stop animator. - [self stopAnimation:NO]; - - // Reset. - _decelerating = NO; - _inertiaSpeed = CGPointZero; - - // Warn delegate. - if ([_delegate respondsToSelector:@selector(scrollViewDidEndDecelerating:)]) { - [_delegate scrollViewDidEndDecelerating:self]; - } - - // Return to NORMAL BOUNDS, animated. - if ((self.pinched || (_touchCount == 0 && self.pulled)) && self.scrollEnabled) { - UIEdgeInsets edges = [self pageEdgesForAnimation]; - NSTimeInterval dur = self.flicked ? kFlickDuration : kBounceDuration; - [self startAnimationTo:edges duration:dur]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// --(CGPoint)midpointBetweenPointA:(CGPoint)a andB:(CGPoint)b { - return CGPointMake((a.x + b.x) / 2.0, - (a.y + b.y) / 2.0); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// --(CGFloat)distanceBetweenPointA:(CGPoint)a andB:(CGPoint)b { - CGFloat deltaX = b.x - a.x; - CGFloat deltaY = b.y - a.y; - return sqrt(deltaX*deltaX + deltaY*deltaY ); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// --(CGFloat)calculateZoomScaleUsingFingerDistances { - - // Distance Between Fingers. - distanceBetweenFingers = [self distanceBetweenPointA:[self touchLocation:_touch1] - andB:[self touchLocation:_touch2]]; - - // If Actual distance is 0, assume current distance. - actualDistanceBetweenFingers = (actualDistanceBetweenFingers == 0.0 ? - distanceBetweenFingers : actualDistanceBetweenFingers); - - // Zoom Scale Speed and Direction. - // This math calculate the zoom speed based on how fast your fingers move. - CGFloat zoomScaleSpeed = ( distanceBetweenFingers / actualDistanceBetweenFingers ); - - // Increase/Decrease The Zoom Factor (Scale) Using Calculated Speed Rate. - CGFloat newScale = self.zoomFactor * zoomScaleSpeed; - - // Save Actual Distance. So If the Fingers "change" direction or distance we'll know. - actualDistanceBetweenFingers = distanceBetweenFingers; - - // Check Scale. If is bigger assume maximumScale. - newScale = ( newScale > _maximumZoomScale ? _maximumZoomScale : newScale ); - - // Return New Scale. - return newScale; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)squareEdgesUsingZoomScale:(CGFloat)newScale andAnchorPoint:(CGPoint)anchorPoint { - UIEdgeInsets edges = UIEdgeInsetsZero; - - // Calc New Width and Height (Scaled by factor). - CGSize newStretched = CGSizeMake(floor(self.pageWidth * newScale), - floor(self.pageHeight * newScale)); - - // We have TWO anchor points. One for the normal frame of the screen. - // And another to the BOUNDS of the scaled image, including "hided" parts. - // This two coordinates are crossed and aligned using % on both axis. - - // Anchor Point at SCALED coordinates. - CGPoint scaledAnchorPoint = CGPointMake((-_pageEdges.left) + anchorPoint.x, - (-_pageEdges.top) + anchorPoint.y); - - // Equivalent to the % of the anchor point positon on his axis. (NOT SCALED) - CGPoint normalRanges = CGPointMake(anchorPoint.x / 1 / self.pageWidth, - anchorPoint.y / 1 / self.pageHeight); - - // Equivalent to the % of the anchor point positon on his axis. (SCALED) - CGPoint scaledRanges = CGPointMake(scaledAnchorPoint.x / 1 / self.stretchedWidth, - scaledAnchorPoint.y / 1 / self.stretchedHeight); - - - // - // New Edges. - // - // We need to perfect align the two centers (scaled and not scaled). Them we have our - // left and top edges. - // This allows zoom in/out from a specific finger-point on every zoom level. - // - edges.left = -((newStretched.width * scaledRanges.x) - (self.pageWidth * normalRanges.x)); - edges.top = -((newStretched.height * scaledRanges.y) - (self.pageHeight * normalRanges.y)); - - edges.right = newStretched.width - (-edges.left + self.pageWidth); - edges.bottom = newStretched.height - (-edges.top + self.pageHeight); - - /*** DEBUG * - - NSLog( @"page-with: %f", self.pageWidth ); - NSLog( @"resized-width: %f", newStretched.width); - NSLog( @"old-width: %f", self.stretchedWidth); - NSLog( @"actual left: %f", _pageEdges.left ); - NSLog( @"actual right: %f", _pageEdges.right ); - NSLog( @"touch: %f", anchorPoint.x); - NSLog( @"point: %f", anchorPoint.x); - NSLog( @"B: %f", scaledRanges.x); - NSLog( @"C: %f", normalRanges.x); - NSLog( @"left: %f", edges.left); - NSLog( @"right: %f", edges.right); - NSLog( @"/////////////////////////////////////////////////////////////////////////////////"); - - */ - - return edges; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)squareEdgesUsingFingerDistancesAndAnchorPoint:(CGPoint)anchorPoint { - return [self squareEdgesUsingZoomScale:[self calculateZoomScaleUsingFingerDistances] - andAnchorPoint:anchorPoint]; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Solution for the issue discussed here: - * http://discussions.apple.com/message.jspa?messageID=7139722 - */ -- (void) ensureTouches { - if (_touch1.phase == UITouchPhaseEnded) { - [self removeTouch: _touch1]; - } - if (_touch2.phase == UITouchPhaseEnded) { - [self removeTouch: _touch2]; - } -} - - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { - [super touchesBegan:touches withEvent:event]; - - [self ensureTouches]; - - if (_touchCount < 2) { - [self stopAnimation:NO]; - - for (UITouch* touch in touches) { - [self acquireTouch:touch]; - - if (_touchCount == 1) { - if ([_delegate respondsToSelector:@selector(scrollView:touchedDown:)]) { - [_delegate scrollView:self touchedDown:touch]; - } - - if (_holdsAfterTouchingForInterval) { - _holdingTimer = [NSTimer scheduledTimerWithTimeInterval:_holdsAfterTouchingForInterval - target:self selector:@selector(holdingTimer:) - userInfo:nil repeats:NO]; - } - - if (_scrollEnabled && !_holding) { - CGPoint pt = [self touchLocation:touch]; - _touchStartEdges = _touchEdges = [self touchEdgesForPoint:pt]; - _pageStartEdges = _pageEdges; - _renewPosition = CGPointMake(_touchStartEdges.left, _touchStartEdges.top); - } - - } else if (_touchCount == 2) { - if (_scrollEnabled && !_holding) { - CGPoint pt = [self touchLocation:touch]; - _touchEdges = [self squareTouchEdges:[self stretchTouchEdges:_touchEdges toPoint:pt]]; - _touchStartEdges = _touchEdges; - _pageStartEdges = _pageEdges; - } - } - - if (touch.tapCount == 2) { - TT_INVALIDATE_TIMER(_tapTimer); - } - } - - // Reset Actual Distance. - actualDistanceBetweenFingers = 0.0; - - // Store middle point between fingers. - if (_touchCount == 2) { - centerOfFingers = [self midpointBetweenPointA:[self touchLocation:_touch1] - andB:[self touchLocation:_touch2]]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent *)event { - [super touchesMoved:touches withEvent:event]; - TT_INVALIDATE_TIMER(_holdingTimer); - - if (_scrollEnabled && !_holding && _touchCount && !_animationTimer) { - if (!_dragging) { - _dragging = YES; - TT_INVALIDATE_TIMER(_tapTimer); - - if ([_delegate respondsToSelector:@selector(scrollViewWillBeginDragging:)]) { - [_delegate scrollViewWillBeginDragging:self]; - } - } - - _touchEdges = UIEdgeInsetsZero; - for (UITouch* touch in [event allTouches]) { - if (touch == _touch1 || touch == _touch2) { - _touchEdges = [self stretchTouchEdges:_touchEdges toPoint:[self touchLocation:touch]]; - } - } - - // Declare common. - UIEdgeInsets pageEdges = UIEdgeInsetsZero; - UIEdgeInsets newEdges = UIEdgeInsetsZero; - - UIEdgeInsets edges = [self squareTouchEdges:_touchEdges]; - CGFloat left = _pageStartEdges.left + (edges.left - _touchStartEdges.left); - CGFloat right = _pageStartEdges.right + (edges.right - _touchStartEdges.right); - CGFloat top = _pageEdges.top; - CGFloat bottom = _pageEdges.bottom; - - // Drag when is zoomed correct bottom and top. - if ((_touchCount == 2 || self.zoomed) && _zoomEnabled && !_holding) { - top = _pageStartEdges.top + (edges.top - _touchStartEdges.top); - bottom = _pageStartEdges.bottom + (edges.bottom - _touchStartEdges.bottom); - } - - // Zooming. - if (_touchCount == 2 && _zoomEnabled && !_holding) { - // Calc. - newEdges = [self squareEdgesUsingFingerDistancesAndAnchorPoint:centerOfFingers]; - pageEdges = [self resistPageEdges:newEdges]; - _executingZoomGesture = YES; - - // Dragging. - - } else if ( _touchCount == 1 ) { - newEdges = UIEdgeInsetsMake(top, left, bottom, right); - pageEdges = [self resistPageEdges:newEdges]; - _executingZoomGesture = NO; - } - - // Calculate distance. (Speed). - _inertiaSpeed = CGPointMake(_touchEdges.left - _renewPosition.x, - _touchEdges.top - _renewPosition.y); - - // Renew. - _renewPosition = CGPointMake(_touchEdges.left, _touchEdges.top); - - if (![self edgesAreZoomed:pageEdges] || self.canZoom) { - _pageEdges = pageEdges; - [self updateZooming:pageEdges]; - [self setNeedsLayout]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { - [super touchesCancelled:touches withEvent:event]; - TT_INVALIDATE_TIMER(_holdingTimer); - - for (UITouch* touch in touches) { - [self removeTouch:touch]; - } - - if (!_touchCount) { - [self stopAnimation:YES]; - [self stopDragging:NO]; - [self updateZooming:UIEdgeInsetsZero]; - - _pageEdges = UIEdgeInsetsZero; - [self setNeedsLayout]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { - [super touchesEnded:touches withEvent:event]; - TT_INVALIDATE_TIMER(_holdingTimer); - if (_holding) { - [self endHolding]; - } - - for (UITouch* touch in touches) { - if (touch == _touch1 || touch == _touch2) { - UITouch* remainingTouch = [self removeTouch:touch]; - - if (_touchCount == 1) { - CGPoint point = [self touchLocation:remainingTouch]; - _touchEdges = _touchStartEdges = [self touchEdgesForPoint:point]; - _pageStartEdges = _pageEdges; - _renewPosition = CGPointMake(_touchEdges.left, _touchEdges.top); - _executingZoomGesture = NO; - - } else if (_touchCount == 0) { - - if (touch.tapCount == 1 && !_dragging) { - _executingZoomGesture = NO; - if ([_delegate respondsToSelector:@selector(scrollView:touchedUpInside:)]) { - [_delegate scrollView:self touchedUpInside:touch]; - } - - [self startTapTimer:touch]; - - // Double tap, zoom out to fit or zoom in to the 1/3 of the maximum scale. - - } else if (touch.tapCount == 2 && self.canZoom) { - CGPoint pointToZoom = [self touchLocation:touch]; - - if (self.zoomed) { - [self zoomToFit]; - - } else { - [self setZoomScale:_maximumZoomScale / 1.3 withPoint:pointToZoom animated:YES]; - } - } - - // The scroll view will continue to move a short distance afterwards. - // If are zoomed, will still moving after stop drag. Short distance, doesn't animate. - if (_touchCount == 0 && self.scrollEnabled - && self.zoomed && abs(_inertiaSpeed.x) >= 1 && abs(_inertiaSpeed.y) >= 1) { - // Increase speed. (Longer residual movement). - _inertiaSpeed.x *= kIncreaseSpeed; - _inertiaSpeed.y *= kIncreaseSpeed; - - // Store actual Page Edges. - _pageStartEdges = _pageEdges; - - // Warn delegate. - if ([_delegate respondsToSelector:@selector(scrollViewWillBeginDecelerating:)]) { - [_delegate scrollViewWillBeginDecelerating:self]; - } - - // Start Animation Timer. - if (!_animationTimer) { - _decelerating = YES; - - TT_INVALIDATE_TIMER(_tapTimer); - _animationTimer = [NSTimer scheduledTimerWithTimeInterval:kFrameDuration target:self - selector:@selector(inertiaAnimator) userInfo:nil repeats:YES]; - } - } - - [self stopDragging:YES]; - } - - if ((self.pinched || (_touchCount == 0 && self.pulled)) && self.scrollEnabled) { - UIEdgeInsets edges = [self pageEdgesForAnimation]; - NSTimeInterval dur = self.flicked ? kFlickDuration : kBounceDuration; - //_overshoot = kOvershoot; - [self startAnimationTo:edges duration:dur]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [self layoutPage]; - [self layoutAdjacentPages]; - - if (_visiblePageIndex != _centerPageIndex && self.centerPage) { - _visiblePageIndex = _centerPageIndex; - [_delegate scrollView:self didMoveToPageAtIndex:_centerPageIndex]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToSuperview { - if (!self.superview) { - [self stopAnimation:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIDeviceOrientationDidChangeNotification - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)deviceOrientationDidChange:(void*)object { -// UIInterfaceOrientation orientation = TTDeviceOrientation(); -// if (_rotateEnabled && !_holding -// && (![_delegate -// respondsToSelector:@selector(scrollView:shouldAutorotateToInterfaceOrientation:)] -// || [_delegate scrollView:self shouldAutorotateToInterfaceOrientation:orientation])) { -// self.orientation = orientation; -// } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public methods - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)zoomed { - return _pageEdges.left != _pageEdges.right || _pageEdges.top != _pageEdges.bottom; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDataSource:(id)dataSource { - _dataSource = dataSource; - [self reloadData]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setCenterPageIndex:(NSInteger)centerPageIndex { - [self moveToPageAtIndex:centerPageIndex resetEdges:!_touchCount]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)numberOfPages { - return [_dataSource numberOfPagesInScrollView:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)centerPage { - return [self pageAtIndex:_centerPageIndex create:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)visiblePages { - NSMutableDictionary* visiblePages = [NSMutableDictionary dictionaryWithCapacity:_maxPages]; - - UIView* centerPage = self.centerPage; - if (centerPage) { - [visiblePages setObject:self.centerPage forKey:[NSNumber numberWithInt:_centerPageIndex]]; - } - - NSInteger minPageIndex = _centerPageIndex - kOffscreenPages; - for (NSInteger i = _centerPageIndex - 1; i >= 0 && i >= minPageIndex; --i) { - UIView* page = [self pageAtIndex:i create:YES]; - if (page) { - [visiblePages setObject:page forKey:[NSNumber numberWithInt:i]]; - } - } - - NSInteger maxPageIndex = _centerPageIndex + kOffscreenPages; - NSInteger pageCount = [_dataSource numberOfPagesInScrollView:self]; - for (NSInteger i = _centerPageIndex + 1; i < pageCount && i <= maxPageIndex; ++i) { - UIView* page = [self pageAtIndex:i create:YES]; - if (page) { - [visiblePages setObject:page forKey:[NSNumber numberWithInt:i]]; - } - } - - return visiblePages; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setOrientation:(UIInterfaceOrientation)orientation { - [self setOrientation:orientation animated:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setOrientation:(UIInterfaceOrientation)orientation animated:(BOOL)animated { - if (orientation != _orientation && [self supportsOrientation:orientation]) { - if ([_delegate respondsToSelector:@selector(scrollViewWillRotate:toOrientation:)]) { - [_delegate scrollViewWillRotate:self toOrientation:orientation]; - } - - _orientation = orientation; - - if (animated) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(rotationDidStop)]; - [self layoutPage]; - [UIView commitAnimations]; - - } else { - [self rotationDidStop]; - [self setNeedsLayout]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)dequeueReusablePage { - if (_pageQueue.count) { - UIView* page = [[_pageQueue.lastObject retain] autorelease]; - [_pageQueue removeLastObject]; - return page; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reloadData { - if (_dataSource) { - [self enqueueAllPages]; - - _visiblePageIndex = kInvalidIndex; - _pageEdges = _pageStartEdges = UIEdgeInsetsZero; - - [self cancelTouches]; - [self setNeedsLayout]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)pageAtIndex:(NSInteger)pageIndex { - return [self pageAtIndex:pageIndex create:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * A floating-point value that specifies the current scale factor applied to the scroll - * view's content. - */ --(CGFloat)zoomScale { - return self.zoomFactor; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * A floating-point value that specifies the current zoom scale. - */ --(void)setZoomScale:(CGFloat)scale { - [self setZoomScale:scale animated:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * A floating-point value that specifies the current zoom scale. - */ -- (void)setZoomScale:(CGFloat)newScale animated:(BOOL)animated { - [self setZoomScale:newScale - withPoint:CGPointMake(self.pageWidth / 2, self.pageHeight / 2) - animated:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * A floating-point value that specifies the current zoom scale. - * - * Specify one touch point, the scale occurrs centering to him. - * - * YES to animate the transition to the new scale, NO to make the transition immediate. - */ -- (void)setZoomScale:(CGFloat)newScale withPoint:(CGPoint)withPoint animated:(BOOL)animated { - - // If bigger than maximum scale or zoom disabled, do nothing. - if ( newScale > _maximumZoomScale || !self.zoomEnabled ) return; - - // Square Edges to new scale, using specified anchor point.// - UIEdgeInsets zoomEdges = [self squareEdgesUsingZoomScale:newScale - andAnchorPoint:withPoint]; - - // If animated. - if ( animated ) { - [self startAnimationTo:zoomEdges duration:kBounceDuration]; - } - - // Not animated, just apply. - else { - UIEdgeInsets pageEdges = [self resistPageEdges:zoomEdges]; - if (![self edgesAreZoomed:pageEdges] || self.canZoom) { - _pageEdges = pageEdges; - [self updateZooming:pageEdges]; - [self setNeedsLayout]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)zoomToFit { - [self startAnimationTo:[self reversePageEdges] duration:kBounceDuration]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)zoomToDistance:(CGFloat)distance { - UIEdgeInsets insets = UIEdgeInsetsMake(distance, distance, -1 * distance, -1 * distance); - [self startAnimationTo:insets duration:kBounceDuration]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancelTouches { - [self stopAnimation:YES]; - [self stopDragging:NO]; - [self updateZooming:UIEdgeInsetsZero]; - TT_RELEASE_SAFELY(_touch1); - TT_RELEASE_SAFELY(_touch2); - _touchCount = 0; -} - - -@end diff --git a/src/Three20UI/Sources/TTSearchBar.m b/src/Three20UI/Sources/TTSearchBar.m deleted file mode 100644 index 05e0bb44f2..0000000000 --- a/src/Three20UI/Sources/TTSearchBar.m +++ /dev/null @@ -1,461 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTSearchBar.h" - -// UI -#import "Three20UI/TTSearchTextField.h" -#import "Three20UI/TTButton.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20UI/UITableViewAdditions.h" -#import "Three20Style/UIFontAdditions.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreLocale.h" - -static const CGFloat kMarginX = 5; -static const CGFloat kMarginY = 7; -static const CGFloat kPaddingX = 10; -static const CGFloat kPaddingY = 10; -static const CGFloat kSpacingX = 4; - -static const CGFloat kButtonSpacing = 12; -static const CGFloat kButtonHeight = 30; - -static const CGFloat kIndexViewMargin = 4; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSearchBar - -@synthesize boxView = _boxView; -@synthesize tintColor = _tintColor; -@synthesize textFieldStyle = _textFieldStyle; -@synthesize showsCancelButton = _showsCancelButton; -@synthesize showsSearchIcon = _showsSearchIcon; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _boxView = [[TTView alloc] init]; - _boxView.backgroundColor = [UIColor clearColor]; - [self addSubview:_boxView]; - - _searchField = [[TTSearchTextField alloc] init]; - _searchField.placeholder = TTLocalizedString(@"Search", @""); - _searchField.autocapitalizationType = UITextAutocapitalizationTypeNone; - [_searchField addTarget:self action:@selector(textFieldDidBeginEditing) - forControlEvents:UIControlEventEditingDidBegin]; - [_searchField addTarget:self action:@selector(textFieldDidEndEditing) - forControlEvents:UIControlEventEditingDidEnd]; - [self addSubview:_searchField]; - - self.tintColor = TTSTYLEVAR(searchBarTintColor); - self.style = TTSTYLE(searchBar); - self.textFieldStyle = TTSTYLE(searchTextField); - self.font = TTSTYLEVAR(font); - self.showsSearchIcon = YES; - self.showsCancelButton = NO; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_searchField); - TT_RELEASE_SAFELY(_boxView); - TT_RELEASE_SAFELY(_textFieldStyle); - TT_RELEASE_SAFELY(_tintColor); - TT_RELEASE_SAFELY(_cancelButton); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)indexViewWidth { - UITableView* tableView = (UITableView*)[self ancestorOrSelfWithClass:[UITableView class]]; - if (tableView) { - UIView* indexView = tableView.indexView; - if (indexView) { - return indexView.width; - } - } - return 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showIndexView:(BOOL)show { - UITableView* tableView = (UITableView*)[self ancestorOrSelfWithClass:[UITableView class]]; - if (tableView) { - UIView* indexView = tableView.indexView; - if (indexView) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - - if (show) { - CGRect frame = indexView.frame; - frame.origin.x = self.width - (indexView.width + kIndexViewMargin); - indexView.frame = frame; - - } else { - indexView.frame = CGRectOffset(indexView.frame, indexView.width + kIndexViewMargin, 0); - } - indexView.alpha = show ? 1 : 0; - - CGRect searchFrame = _searchField.frame; - searchFrame.size.width += show ? -self.indexViewWidth : self.indexViewWidth; - _searchField.frame = searchFrame; - - CGRect boxFrame = _boxView.frame; - boxFrame.size.width += show ? -self.indexViewWidth : self.indexViewWidth; - _boxView.frame = boxFrame; - - [UIView commitAnimations]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollToTop { - UIScrollView* scrollView = (UIScrollView*)[self ancestorOrSelfWithClass:[UIScrollView class]]; - if (scrollView) { - CGPoint offset = scrollView.contentOffset; - CGPoint myOffset = [self offsetFromView:scrollView]; - if (offset.y != myOffset.y) { - [scrollView setContentOffset:CGPointMake(offset.x, myOffset.y) animated:YES]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textFieldDidBeginEditing { - [self scrollToTop]; - [self showIndexView:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textFieldDidEndEditing { - [self showIndexView:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)becomeFirstResponder { - return [_searchField becomeFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)resignFirstResponder { - return [_searchField resignFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - CGFloat indexViewWidth = [_searchField isEditing] ? 0 : self.indexViewWidth; - CGFloat leftPadding = _showsSearchIcon ? 0 : kSpacingX; - - CGFloat buttonWidth = 0; - if (_showsCancelButton) { - [_cancelButton sizeToFit]; - buttonWidth = _cancelButton.width + kButtonSpacing; - } - - CGFloat boxHeight = self.font.ttLineHeight + 8; - _boxView.frame = CGRectMake(kMarginX, floor(self.height/2 - boxHeight/2), - self.width - (kMarginX*2 + indexViewWidth + buttonWidth), boxHeight); - - _searchField.frame = CGRectMake(kMarginX+kPaddingX+leftPadding, 0, - self.width - (kMarginX*2+kPaddingX+leftPadding+buttonWidth+indexViewWidth), self.height); - - if (_showsCancelButton) { - _cancelButton.frame = CGRectMake(_boxView.right + kButtonSpacing, - floor(self.height/2 - kButtonHeight/2), - _cancelButton.width, kButtonHeight); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - CGFloat height = self.font.ttLineHeight+kPaddingY*2; - if (height < TT_ROW_HEIGHT) { - height = TT_ROW_HEIGHT; - } - return CGSizeMake(size.width, height); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)delegate { - return _searchField.delegate; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDelegate:(id)delegate { - _searchField.delegate = delegate; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)dataSource { - return _searchField.dataSource; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDataSource:(id)dataSource { - _searchField.dataSource = dataSource; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)editing { - return _searchField.editing; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)showsDoneButton { - return _searchField.showsDoneButton; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setShowsDoneButton:(BOOL)showsDoneButton { - _searchField.showsDoneButton = showsDoneButton; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)showsDarkScreen { - return _searchField.showsDarkScreen; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setShowsDarkScreen:(BOOL)showsDarkScreen { - _searchField.showsDarkScreen = showsDarkScreen; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setShowsCancelButton:(BOOL)showsCancelButton { - if (showsCancelButton != _showsCancelButton) { - _showsCancelButton = showsCancelButton; - - if (_showsCancelButton) { - _cancelButton = [[TTButton buttonWithStyle:@"blackToolbarButton:" - title:TTLocalizedString(@"Cancel", @"")] retain]; - [_cancelButton addTarget:_searchField action:@selector(resignFirstResponder) - forControlEvents:UIControlEventTouchUpInside]; - [self addSubview:_cancelButton]; - - } else { - [_cancelButton removeFromSuperview]; - TT_RELEASE_SAFELY(_cancelButton); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setShowsSearchIcon:(BOOL)showsSearchIcon { - if (showsSearchIcon != _showsSearchIcon) { - _showsSearchIcon = showsSearchIcon; - - if (_showsSearchIcon) { - UIImageView* iconView = [[[UIImageView alloc] initWithImage: - [UIImage imageNamed:@"Three20.bundle/images/searchIcon.png"]] autorelease]; - [iconView sizeToFit]; - iconView.contentMode = UIViewContentModeLeft; - iconView.frame = CGRectInset(iconView.frame, -floor(kMarginX/2), 0); - _searchField.leftView = iconView; - _searchField.leftViewMode = UITextFieldViewModeAlways; - - } else { - _searchField.leftView = nil; - _searchField.leftViewMode = UITextFieldViewModeNever; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)searchesAutomatically { - return _searchField.searchesAutomatically; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSearchesAutomatically:(BOOL)searchesAutomatically { - _searchField.searchesAutomatically = searchesAutomatically; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)text { - return _searchField.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(NSString*)text { - _searchField.text = text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)placeholder { - return _searchField.placeholder; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPlaceholder:(NSString*)placeholder { - _searchField.placeholder = placeholder; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITableView*)tableView { - return _searchField.tableView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTintColor:(UIColor*)tintColor { - if (tintColor != _tintColor) { - [_tintColor release]; - _tintColor = [tintColor retain]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTextFieldStyle:(TTStyle*)textFieldStyle { - if (textFieldStyle != _textFieldStyle) { - [_textFieldStyle release]; - _textFieldStyle = [textFieldStyle retain]; - _boxView.style = _textFieldStyle; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)textColor { - return _searchField.textColor; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTextColor:(UIColor*)textColor { - _searchField.textColor = textColor; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return _searchField.font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - _searchField.font = font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)rowHeight { - return _searchField.rowHeight; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setRowHeight:(CGFloat)rowHeight { - _searchField.rowHeight = rowHeight; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIReturnKeyType)returnKeyType { - return _searchField.returnKeyType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setReturnKeyType:(UIReturnKeyType)returnKeyType { - _searchField.returnKeyType = returnKeyType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)search { - [_searchField search]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showSearchResults:(BOOL)show { - [_searchField showSearchResults:show]; -} - - -@end - diff --git a/src/Three20UI/Sources/TTSearchDisplayController.m b/src/Three20UI/Sources/TTSearchDisplayController.m deleted file mode 100644 index 5fff396a82..0000000000 --- a/src/Three20UI/Sources/TTSearchDisplayController.m +++ /dev/null @@ -1,219 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTSearchDisplayController.h" - -// UI -#import "Three20UI/TTTableViewController.h" -#import "Three20UI/TTTableViewDataSource.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -const int kTTSearchBarBackgroundTag = 18942; - -static const NSTimeInterval kPauseInterval = 0.4; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSearchDisplayController - -@synthesize searchResultsViewController = _searchResultsViewController; -@synthesize pausesBeforeSearching = _pausesBeforeSearching; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithSearchBar:(UISearchBar*)searchBar contentsController:(UIViewController*)controller { - if (self = [super initWithSearchBar:searchBar contentsController:controller]) { - self.delegate = self; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_INVALIDATE_TIMER(_pauseTimer); - TT_RELEASE_SAFELY(_searchResultsDelegate2); - TT_RELEASE_SAFELY(_searchResultsViewController); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)resetResults { - if (_searchResultsViewController.model.isLoading) { - [_searchResultsViewController.model cancel]; - } - [_searchResultsViewController.dataSource search:nil]; - [_searchResultsViewController viewWillDisappear:NO]; - [_searchResultsViewController viewDidDisappear:NO]; - _searchResultsViewController.tableView = nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restartPauseTimer { - TT_INVALIDATE_TIMER(_pauseTimer); - _pauseTimer = [NSTimer scheduledTimerWithTimeInterval:kPauseInterval target:self - selector:@selector(searchAfterPause) userInfo:nil repeats:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchAfterPause { - _pauseTimer = nil; - [_searchResultsViewController.dataSource search:self.searchBar.text]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UISearchDisplayDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController*)controller { - self.searchContentsController.navigationItem.rightBarButtonItem.enabled = NO; - UIView* backgroundView = [self.searchBar viewWithTag:kTTSearchBarBackgroundTag]; - if (backgroundView) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - backgroundView.alpha = 0; - [UIView commitAnimations]; - } -// if (!self.searchContentsController.navigationController) { -// [UIView beginAnimations:nil context:nil]; -// self.searchBar.superview.top -= self.searchBar.screenY - TTStatusHeight(); -// [UIView commitAnimations]; -// } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchDisplayControllerDidBeginSearch:(UISearchDisplayController*)controller { - [_searchResultsViewController updateView]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchDisplayControllerWillEndSearch:(UISearchDisplayController*)controller { - self.searchContentsController.navigationItem.rightBarButtonItem.enabled = YES; - - UIView* backgroundView = [self.searchBar viewWithTag:kTTSearchBarBackgroundTag]; - if (backgroundView) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - backgroundView.alpha = 1; - _searchResultsViewController.tableOverlayView.alpha = 0; - [UIView commitAnimations]; - } - -// if (!self.searchContentsController.navigationController) { -// [UIView beginAnimations:nil context:nil]; -// self.searchBar.superview.top += self.searchBar.top - TTStatusHeight(); -// [UIView commitAnimations]; -// } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchDisplayControllerDidEndSearch:(UISearchDisplayController*)controller { - [self resetResults]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchDisplayController:(UISearchDisplayController *)controller - didLoadSearchResultsTableView:(UITableView *)tableView { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchDisplayController:(UISearchDisplayController *)controller - willUnloadSearchResultsTableView:(UITableView *)tableView { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchDisplayController:(UISearchDisplayController *)controller - didShowSearchResultsTableView:(UITableView *)tableView { - _searchResultsViewController.tableView = tableView; - [_searchResultsViewController viewWillAppear:NO]; - [_searchResultsViewController viewDidAppear:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)searchDisplayController:(UISearchDisplayController*)controller - willHideSearchResultsTableView:(UITableView*)tableView { - [self resetResults]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)searchDisplayController:(UISearchDisplayController*)controller - shouldReloadTableForSearchString:(NSString*)searchString { - if (_pausesBeforeSearching) { - [self restartPauseTimer]; - - } else { - [_searchResultsViewController.dataSource search:searchString]; - } - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)searchDisplayController:(UISearchDisplayController*)controller - shouldReloadTableForSearchScope:(NSInteger)searchOption { - [_searchResultsViewController invalidateModel]; - [_searchResultsViewController.dataSource search:self.searchBar.text]; - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSearchResultsDelegate:(id)searchResultsDelegate { - [super setSearchResultsDelegate:searchResultsDelegate]; - if (_searchResultsDelegate2 != searchResultsDelegate) { - [_searchResultsDelegate2 release]; - _searchResultsDelegate2 = [searchResultsDelegate retain]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTSearchTextField.m b/src/Three20UI/Sources/TTSearchTextField.m deleted file mode 100644 index fccd5311c3..0000000000 --- a/src/Three20UI/Sources/TTSearchTextField.m +++ /dev/null @@ -1,496 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTSearchTextField.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTView.h" -#import "Three20UI/TTSearchTextFieldDelegate.h" -#import "Three20UI/TTTableView.h" -#import "Three20UI/TTTableViewCell.h" -#import "Three20UI/TTTableViewDataSource.h" -#import "Three20UI/UIViewAdditions.h" - -// UI (private) -#import "Three20UI/private/TTSearchTextFieldInternal.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kShadowHeight = 24; -static const CGFloat kDesiredTableHeight = 150; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSearchTextField - -@synthesize tableView = _tableView; -@synthesize rowHeight = _rowHeight; -@synthesize searchesAutomatically = _searchesAutomatically; -@synthesize showsDoneButton = _showsDoneButton; -@synthesize showsDarkScreen = _showsDarkScreen; -@synthesize dataSource = _dataSource; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _internal = [[TTSearchTextFieldInternal alloc] initWithTextField:self]; - - self.autocorrectionType = UITextAutocorrectionTypeNo; - self.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; - self.clearButtonMode = UITextFieldViewModeWhileEditing; - self.searchesAutomatically = YES; - - [self addTarget:self action:@selector(didBeginEditing) - forControlEvents:UIControlEventEditingDidBegin]; - [self addTarget:self action:@selector(didEndEditing) - forControlEvents:UIControlEventEditingDidEnd]; - - [super setDelegate:_internal]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [_dataSource.model.delegates removeObject:self]; - _tableView.delegate = nil; - TT_RELEASE_SAFELY(_dataSource); - TT_RELEASE_SAFELY(_internal); - TT_RELEASE_SAFELY(_tableView); - TT_RELEASE_SAFELY(_shadowView); - TT_RELEASE_SAFELY(_screenView); - TT_RELEASE_SAFELY(_previousNavigationItem); - TT_RELEASE_SAFELY(_previousRightBarButtonItem); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showDoneButton:(BOOL)show { - UIViewController* controller = [TTNavigator navigator].visibleViewController; - if (controller) { - if (show) { - _previousNavigationItem = [controller.navigationItem retain]; - _previousRightBarButtonItem = [controller.navigationItem.rightBarButtonItem retain]; - - UIBarButtonItem* doneButton = [[[UIBarButtonItem alloc] - initWithBarButtonSystemItem:UIBarButtonSystemItemDone - target:self action:@selector(doneAction)] autorelease]; - [controller.navigationItem setRightBarButtonItem:doneButton animated:YES]; - - } else { - [_previousNavigationItem setRightBarButtonItem:_previousRightBarButtonItem animated:YES]; - TT_RELEASE_SAFELY(_previousRightBarButtonItem); - TT_RELEASE_SAFELY(_previousNavigationItem); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showDarkScreen:(BOOL)show { - if (show && !_screenView) { - _screenView = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; - _screenView.backgroundColor = TTSTYLEVAR(screenBackgroundColor); - _screenView.frame = [self rectForSearchResults:NO]; - _screenView.alpha = 0; - [_screenView addTarget:self action:@selector(doneAction) - forControlEvents:UIControlEventTouchUpInside]; - } - - if (show) { - [self.superviewForSearchResults addSubview:_screenView]; - } - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(screenAnimationDidStop)]; - - _screenView.alpha = show ? 1 : 0; - - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)searchText { - if (!self.hasText) { - return @""; - - } else { - NSCharacterSet* whitespace = [NSCharacterSet whitespaceCharacterSet]; - return [self.text stringByTrimmingCharactersInSet:whitespace]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)autoSearch { - if (_searchesAutomatically && self.text.length) { - [self search]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dispatchUpdate:(NSTimer*)timer { - _searchTimer = nil; - [self autoSearch]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)delayedUpdate { - [_searchTimer invalidate]; - _searchTimer = [NSTimer scheduledTimerWithTimeInterval:0 target:self - selector:@selector(dispatchUpdate:) userInfo:nil repeats:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasSearchResults { - return (![_dataSource respondsToSelector:@selector(numberOfSectionsInTableView:)] - || [_dataSource numberOfSectionsInTableView:_tableView]) - && [_dataSource tableView:_tableView numberOfRowsInSection:0]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reloadTable { - [_dataSource tableViewDidLoadModel:self.tableView]; - - if ([self hasSearchResults]) { - [self layoutIfNeeded]; - [self showSearchResults:YES]; - [self.tableView reloadData]; - - } else { - [self showSearchResults:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)screenAnimationDidStop { - if (_screenView.alpha == 0) { - [_screenView removeFromSuperview]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)doneAction { - [self resignFirstResponder]; - - if (self.dataSource) { - self.text = @""; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITextField - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)delegate { - return _internal.delegate; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDelegate:(id)delegate { - _internal.delegate = delegate; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(NSString*)text { - [super setText:text]; - [self autoSearch]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)tableView:(UITableView*)tableView heightForRowAtIndexPath:(NSIndexPath*)indexPath { - if (_rowHeight) { - return _rowHeight; - - } else { - id object = [_dataSource tableView:tableView objectForRowAtIndexPath:indexPath]; - Class cls = [_dataSource tableView:tableView cellClassForObject:object]; - return [cls tableView:_tableView rowHeightForObject:object]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath { - if ([_internal.delegate respondsToSelector:@selector(textField:didSelectObject:)]) { - id object = [_dataSource tableView:tableView objectForRowAtIndexPath:indexPath]; - UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath]; - if (cell.selectionStyle != UITableViewCellSeparatorStyleNone) { - [_internal.delegate performSelector:@selector(textField:didSelectObject:) withObject:self - withObject:object]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidStartLoad:(id)model { - if (!_searchesAutomatically) { - [self reloadTable]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidFinishLoad:(id)model { - [self reloadTable]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidChange:(id)model { - [self reloadTable]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didFailLoadWithError:(NSError*)error { - [self reloadTable]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIControlEvents - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didBeginEditing { - if (_dataSource) { - UIScrollView* scrollView = (UIScrollView*)[self ancestorOrSelfWithClass:[UIScrollView class]]; - scrollView.scrollEnabled = NO; - scrollView.scrollsToTop = NO; - - if (_showsDoneButton) { - [self showDoneButton:YES]; - } - if (_showsDarkScreen) { - [self showDarkScreen:YES]; - } - if (self.hasText && self.hasSearchResults) { - [self showSearchResults:YES]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didEndEditing { - if (_dataSource) { - UIScrollView* scrollView = (UIScrollView*)[self ancestorOrSelfWithClass:[UIScrollView class]]; - scrollView.scrollEnabled = YES; - scrollView.scrollsToTop = YES; - - [self showSearchResults:NO]; - - if (_showsDoneButton) { - [self showDoneButton:NO]; - } - if (_showsDarkScreen) { - [self showDarkScreen:NO]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDataSource:(id)dataSource { - if (dataSource != _dataSource) { - [_dataSource.model.delegates removeObject:self]; - [_dataSource release]; - _dataSource = [dataSource retain]; - [_dataSource.model.delegates addObject:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITableView*)tableView { - if (!_tableView) { - _tableView = [[TTTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; - _tableView.backgroundColor = TTSTYLEVAR(searchTableBackgroundColor); - _tableView.separatorColor = TTSTYLEVAR(searchTableSeparatorColor); - _tableView.rowHeight = _rowHeight; - _tableView.dataSource = _dataSource; - _tableView.delegate = self; - _tableView.scrollsToTop = NO; - } - - return _tableView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSearchesAutomatically:(BOOL)searchesAutomatically { - _searchesAutomatically = searchesAutomatically; - if (searchesAutomatically) { - self.returnKeyType = UIReturnKeyDone; - self.enablesReturnKeyAutomatically = NO; - - } else { - self.returnKeyType = UIReturnKeySearch; - self.enablesReturnKeyAutomatically = YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasText { - return self.text.length; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)search { - if (_dataSource) { - NSString* text = self.searchText; - [_dataSource search:text]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showSearchResults:(BOOL)show { - if (show && _dataSource) { - self.tableView; - - if (!_shadowView) { - _shadowView = [[TTView alloc] init]; - _shadowView.style = TTSTYLE(searchTableShadow); - _shadowView.backgroundColor = [UIColor clearColor]; - _shadowView.userInteractionEnabled = NO; - } - - if (!_tableView.superview) { - _tableView.frame = [self rectForSearchResults:YES]; - _shadowView.frame = CGRectMake(_tableView.left, _tableView.top-1, - _tableView.width, kShadowHeight); - - UIView* superview = self.superviewForSearchResults; - [superview addSubview:_tableView]; - - if (_tableView.separatorStyle != UITableViewCellSeparatorStyleNone) { - [superview addSubview:_shadowView]; - } - } - - [_tableView deselectRowAtIndexPath:_tableView.indexPathForSelectedRow animated:NO]; - - } else { - [_tableView removeFromSuperview]; - [_shadowView removeFromSuperview]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)superviewForSearchResults { - UIScrollView* scrollView = (UIScrollView*)[self ancestorOrSelfWithClass:[UIScrollView class]]; - if (scrollView) { - return scrollView; - - } else { - for (UIView* view = self.superview; view; view = view.superview) { - if (view.height > kDesiredTableHeight) { - return view; - } - } - - return self.superview; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)rectForSearchResults:(BOOL)withKeyboard { - UIView* superview = self.superviewForSearchResults; - - CGFloat y = 0; - UIView* view = self; - while (view != superview) { - y += view.top; - view = view.superview; - } - - CGFloat height = self.height; - CGFloat keyboardHeight = withKeyboard ? TTKeyboardHeight() : 0; - CGFloat tableHeight = self.window.height - (self.ttScreenY + height + keyboardHeight); - - return CGRectMake(0, y + self.height-1, superview.frame.size.width, tableHeight+1); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldUpdate:(BOOL)emptyText { - [self delayedUpdate]; - return YES; -} - - -@end diff --git a/src/Three20UI/Sources/TTSearchTextFieldInternal.m b/src/Three20UI/Sources/TTSearchTextFieldInternal.m deleted file mode 100644 index 71812c9a95..0000000000 --- a/src/Three20UI/Sources/TTSearchTextFieldInternal.m +++ /dev/null @@ -1,141 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTSearchTextFieldInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/TTSearchTextField.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -TT_FIX_CATEGORY_BUG(TTSearchTextFieldInternal) - -@implementation TTSearchTextFieldInternal - -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTextField:(TTSearchTextField*)textField { - if (self = [super init]) { - _textField = textField; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITextFieldDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textFieldShouldBeginEditing:(UITextField*)textField { - if ([_delegate respondsToSelector:@selector(textFieldShouldBeginEditing:)]) { - return [_delegate textFieldShouldBeginEditing:textField]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textFieldDidBeginEditing:(UITextField*)textField { - if ([_delegate respondsToSelector:@selector(textFieldDidBeginEditing:)]) { - [_delegate textFieldDidBeginEditing:textField]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textFieldShouldEndEditing:(UITextField*)textField { - if ([_delegate respondsToSelector:@selector(textFieldShouldEndEditing:)]) { - return [_delegate textFieldShouldEndEditing:textField]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textFieldDidEndEditing:(UITextField*)textField { - if ([_delegate respondsToSelector:@selector(textFieldDidEndEditing:)]) { - [_delegate textFieldDidEndEditing:textField]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL) textField: (UITextField*)textField - shouldChangeCharactersInRange: (NSRange)range - replacementString: (NSString*)string { - if (![_textField shouldUpdate:!string.length]) { - return NO; - } - - SEL sel = @selector(textField:shouldChangeCharactersInRange:replacementString:); - if ([_delegate respondsToSelector:sel]) { - return [_delegate textField:textField shouldChangeCharactersInRange:range - replacementString:string]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textFieldShouldClear:(UITextField*)textField { - [_textField shouldUpdate:YES]; - - if ([_delegate respondsToSelector:@selector(textFieldShouldClear:)]) { - return [_delegate textFieldShouldClear:textField]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textFieldShouldReturn:(UITextField*)textField { - BOOL shouldReturn = YES; - if ([_delegate respondsToSelector:@selector(textFieldShouldReturn:)]) { - shouldReturn = [_delegate textFieldShouldReturn:textField]; - } - - if (shouldReturn) { - if (!_textField.searchesAutomatically) { - [_textField search]; - - } else { - [_textField performSelector:@selector(doneAction)]; - } - } - return shouldReturn; -} - - -@end diff --git a/src/Three20UI/Sources/TTSearchlightLabel.m b/src/Three20UI/Sources/TTSearchlightLabel.m deleted file mode 100644 index d0ee7d696d..0000000000 --- a/src/Three20UI/Sources/TTSearchlightLabel.m +++ /dev/null @@ -1,234 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTSearchlightLabel.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSearchlightLabel - -@synthesize text = _text; -@synthesize font = _font; -@synthesize textColor = _textColor; -@synthesize spotlightColor = _spotlightColor; -@synthesize textAlignment = _textAlignment; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.text = @""; - self.font = TTSTYLEVAR(font); - self.textColor = [UIColor colorWithWhite:0.25 alpha:1]; - self.spotlightColor = [UIColor whiteColor]; - self.textAlignment = UITextAlignmentLeft; - self.backgroundColor = [UIColor clearColor]; - self.contentMode = UIViewContentModeCenter; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [self stopAnimating]; - TT_RELEASE_SAFELY(_text); - TT_RELEASE_SAFELY(_font); - TT_RELEASE_SAFELY(_textColor); - TT_RELEASE_SAFELY(_spotlightColor); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)newMask { - CGRect rect = self.frame; - CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); - int bitmapBytesPerRow = (rect.size.width * 4); - int bitmapByteCount = (bitmapBytesPerRow * rect.size.height); - _maskData = malloc(bitmapByteCount); - _maskContext = CGBitmapContextCreate(_maskData, rect.size.width, rect.size.height, - 8, bitmapBytesPerRow, space, kCGImageAlphaPremultipliedLast); - CGColorSpaceRelease(space); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)releaseMask { - CGContextRelease(_maskContext); - free(_maskData); - _maskContext = nil; - _maskData = nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGImageRef)newSpotlightMask:(CGRect)rect origin:(CGPoint)origin radius:(CGFloat)radius { - CGContextClearRect(_maskContext, rect); - - CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); - CGFloat components[] = {1, 1, 1, 1, 0, 0, 0, 0}; - CGFloat locations[] = {0, 1}; - CGGradientRef gradient = CGGradientCreateWithColorComponents(space, components, locations, 2); - CGContextDrawRadialGradient(_maskContext, gradient, origin, 0, origin, radius, 0); - CGGradientRelease(gradient); - CGColorSpaceRelease(space); - - return CGBitmapContextCreateImage(_maskContext); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateSpotlight { - _spotlightPoint += 1.3/32; - if (_spotlightPoint > 2) { - _spotlightPoint = -0.5; - } - if (_spotlightPoint <= 1.5) { - [self setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - CGContextRef context = UIGraphicsGetCurrentContext(); - - CGSize textSize = [self sizeThatFits:CGSizeZero]; - - CGFloat x = 0; - if (_textAlignment == UITextAlignmentRight) { - x = self.frame.size.width - textSize.width; - - } else if (_textAlignment == UITextAlignmentCenter) { - x = ceil(self.frame.size.width/2 - textSize.width/2); - } - - CGFloat y = 0; - if (self.contentMode == UIViewContentModeCenter) { - y = ceil(rect.size.height/2 + _font.capHeight/2); - - } else if (self.contentMode == UIViewContentModeBottom) { - y = rect.size.height + _font.descender; - - } else { - y = _font.capHeight; - } - - CGContextSelectFont(context, [_font.fontName UTF8String], _font.pointSize, kCGEncodingMacRoman); - CGContextSetTextDrawingMode(context, kCGTextFill); - CGContextSetTextMatrix(context, CGAffineTransformScale(CGAffineTransformIdentity, 1, -1)); - - CGContextSetFillColorWithColor(context, _textColor.CGColor); - CGContextShowTextAtPoint(context, x, y, [self.text UTF8String], self.text.length); - - if (_timer) { - CGPoint spotOrigin = CGPointMake(x + (textSize.width * _spotlightPoint), - y - ceil(self.font.capHeight/2)); - CGFloat spotRadius = self.font.capHeight*2; - - CGImageRef mask = [self newSpotlightMask:rect origin:spotOrigin radius:spotRadius]; - CGContextClipToMask(context, rect, mask); - CGImageRelease(mask); - - [_spotlightColor setFill]; - CGContextShowTextAtPoint(context, x, y, [self.text UTF8String], self.text.length); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - return [self.text sizeWithFont:self.font constrainedToSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAccessibility - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isAccessibilityElement { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString *)accessibilityLabel { - return _text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIAccessibilityTraits)accessibilityTraits { - return [super accessibilityTraits] | UIAccessibilityTraitStaticText; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)startAnimating { - if (!_timer) { - _timer = [NSTimer scheduledTimerWithTimeInterval:1.0/32 target:self - selector:@selector(updateSpotlight) userInfo:nil repeats:YES]; - _spotlightPoint = -0.5; - [self newMask]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)stopAnimating { - if (_timer) { - [_timer invalidate]; - _timer = nil; - [self releaseMask]; - } - [self setNeedsDisplay]; -} - - -@end diff --git a/src/Three20UI/Sources/TTSectionedDataSource.m b/src/Three20UI/Sources/TTSectionedDataSource.m deleted file mode 100644 index 055c55da24..0000000000 --- a/src/Three20UI/Sources/TTSectionedDataSource.m +++ /dev/null @@ -1,242 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTSectionedDataSource.h" - -// UI -#import "Three20UI/TTTableItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSectionedDataSource - -@synthesize items = _items; -@synthesize sections = _sections; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithItems:(NSArray*)items sections:(NSArray*)sections { - if (self = [self init]) { - _items = [items mutableCopy]; - _sections = [sections mutableCopy]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_items); - TT_RELEASE_SAFELY(_sections); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTSectionedDataSource*)dataSourceWithObjects:(id)object,... { - NSMutableArray* items = [NSMutableArray array]; - NSMutableArray* sections = [NSMutableArray array]; - NSMutableArray* section = nil; - va_list ap; - va_start(ap, object); - while (object) { - if ([object isKindOfClass:[NSString class]]) { - [sections addObject:object]; - section = [NSMutableArray array]; - [items addObject:section]; - - } else { - [section addObject:object]; - } - object = va_arg(ap, id); - } - va_end(ap); - - return [[[self alloc] initWithItems:items sections:sections] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTSectionedDataSource*)dataSourceWithArrays:(id)object,... { - NSMutableArray* items = [NSMutableArray array]; - NSMutableArray* sections = [NSMutableArray array]; - va_list ap; - va_start(ap, object); - while (object) { - if ([object isKindOfClass:[NSString class]]) { - [sections addObject:object]; - - } else { - [items addObject:object]; - } - object = va_arg(ap, id); - } - va_end(ap); - - return [[[self alloc] initWithItems:items sections:sections] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTSectionedDataSource*)dataSourceWithItems:(NSArray*)items sections:(NSArray*)sections { - return [[[self alloc] initWithItems:items sections:sections] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { - return _sections ? _sections.count : 1; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - if (_sections) { - NSArray* items = [_items objectAtIndex:section]; - return items.count; - - } else { - return _items.count; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { - if (_sections.count) { - return [_sections objectAtIndex:section]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)tableView:(UITableView*)tableView objectForRowAtIndexPath:(NSIndexPath*)indexPath { - if (_sections) { - NSArray* section = [_items objectAtIndex:indexPath.section]; - return [section objectAtIndex:indexPath.row]; - - } else { - return [_items objectAtIndex:indexPath.row]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSIndexPath*)tableView:(UITableView*)tableView indexPathForObject:(id)object { - if (_sections) { - for (int i = 0; i < _items.count; ++i) { - NSMutableArray* section = [_items objectAtIndex:i]; - NSUInteger objectIndex = [section indexOfObject:object]; - if (objectIndex != NSNotFound) { - return [NSIndexPath indexPathForRow:objectIndex inSection:i]; - } - } - - } else { - NSUInteger objectIndex = [_items indexOfObject:object]; - if (objectIndex != NSNotFound) { - return [NSIndexPath indexPathForRow:objectIndex inSection:0]; - } - } - - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSIndexPath*)indexPathOfItemWithUserInfo:(id)userInfo { - if (_sections.count) { - for (NSInteger i = 0; i < _items.count; ++i) { - NSArray* items = [_items objectAtIndex:i]; - for (NSInteger j = 0; j < items.count; ++j) { - TTTableItem* item = [items objectAtIndex:j]; - if (item.userInfo == userInfo) { - return [NSIndexPath indexPathForRow:j inSection:i]; - } - } - } - - } else { - for (NSInteger i = 0; i < _items.count; ++i) { - TTTableItem* item = [_items objectAtIndex:i]; - if (item.userInfo == userInfo) { - return [NSIndexPath indexPathForRow:i inSection:0]; - } - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeItemAtIndexPath:(NSIndexPath*)indexPath { - [self removeItemAtIndexPath:indexPath andSectionIfEmpty:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)removeItemAtIndexPath:(NSIndexPath*)indexPath andSectionIfEmpty:(BOOL)andSection { - if (_sections.count) { - NSMutableArray* items = [_items objectAtIndex:indexPath.section]; - [items removeObjectAtIndex:indexPath.row]; - if (andSection && !items.count) { - [_sections removeObjectAtIndex:indexPath.section]; - [_items removeObjectAtIndex:indexPath.section]; - return YES; - } - - } else if (!indexPath.section) { - [_items removeObjectAtIndex:indexPath.row]; - } - return NO; -} - - -@end diff --git a/src/Three20UI/Sources/TTSplitViewController.m b/src/Three20UI/Sources/TTSplitViewController.m deleted file mode 100644 index 79a1063c2e..0000000000 --- a/src/Three20UI/Sources/TTSplitViewController.m +++ /dev/null @@ -1,192 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTSplitViewController.h" - -// UI -#import "Three20UI/TTNavigator.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTSplitViewController - -@synthesize leftNavigator = _leftNavigator; -@synthesize rightNavigator = _rightNavigator; -@synthesize splitViewButton = _splitViewButton; -@synthesize popoverSplitController = _popoverSplitController; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.delegate = self; - - self.viewControllers = [NSArray arrayWithObjects: - [[[UINavigationController alloc] initWithNibName: nil - bundle: nil] autorelease], - [[[UINavigationController alloc] initWithNibName: nil - bundle: nil] autorelease], - nil]; - - _leftNavigator = [[TTNavigator alloc] init]; - _leftNavigator.rootContainer = self; - _leftNavigator.persistenceKey = @"splitNavPersistenceLeft"; - - _rightNavigator = [[TTNavigator alloc] init]; - _rightNavigator.rootContainer = self; - _rightNavigator.persistenceKey = @"splitNavPersistenceRight"; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - self.delegate = nil; - TT_RELEASE_SAFELY(_leftNavigator); - TT_RELEASE_SAFELY(_rightNavigator); - TT_RELEASE_SAFELY(_splitViewButton); - TT_RELEASE_SAFELY(_popoverSplitController); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateSplitViewButton { - if (nil != _rightNavigator.rootViewController) { - - if (nil != _leftNavigator.rootViewController) { - UINavigationController* navController = - (UINavigationController*)_leftNavigator.rootViewController; - UIViewController* topViewController = navController.topViewController; - if (nil != topViewController) { - self.splitViewButton.title = topViewController.title; - } - } - - if (nil == self.splitViewButton.title) { - self.splitViewButton.title = @"Default Title"; - } - - UINavigationController* navController = - (UINavigationController*)_rightNavigator.rootViewController; - UIViewController* topViewController = navController.topViewController; - UINavigationItem* navItem = topViewController.navigationItem; - - navItem.leftBarButtonItem = _splitViewButton; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - - [self updateSplitViewButton]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTNavigatorRootContainer - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTBaseNavigator*)getNavigatorForController:(UIViewController*)controller { - if (controller == [self.viewControllers objectAtIndex:0]) { - return _leftNavigator; - - } else if (controller == [self.viewControllers objectAtIndex:1]) { - return _rightNavigator; - } - - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)navigator:(TTBaseNavigator*)navigator setRootViewController:(UIViewController*)controller { - if (_rightNavigator == navigator) { - self.viewControllers = [NSArray arrayWithObjects: - [self.viewControllers objectAtIndex:0], - controller, - nil]; - - [self updateSplitViewButton]; - - } else if (_leftNavigator == navigator) { - self.viewControllers = [NSArray arrayWithObjects: - controller, - [self.viewControllers objectAtIndex:1], - nil]; - - [self updateSplitViewButton]; - - } else { - // Invalid navigator sent here. - TTDASSERT(NO); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UISplitViewControllerDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)splitViewController: (UISplitViewController*)svc - willHideViewController: (UIViewController *)aViewController - withBarButtonItem: (UIBarButtonItem*)barButtonItem - forPopoverController: (UIPopoverController*)pc { - self.splitViewButton = barButtonItem; - - [self updateSplitViewButton]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)splitViewController: (UISplitViewController*)svc - willShowViewController: (UIViewController *)aViewController - invalidatingBarButtonItem: (UIBarButtonItem *)barButtonItem { - self.splitViewButton = nil; - - [self updateSplitViewButton]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)splitViewController: (UISplitViewController*)svc - popoverController: (UIPopoverController*)pc - willPresentViewController: (UIViewController *)aViewController { - self.popoverSplitController = pc; - - pc.contentViewController = aViewController; -} - - -@end - diff --git a/src/Three20UI/Sources/TTStyledTextLabel.m b/src/Three20UI/Sources/TTStyledTextLabel.m deleted file mode 100644 index 51eef17a12..0000000000 --- a/src/Three20UI/Sources/TTStyledTextLabel.m +++ /dev/null @@ -1,528 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTStyledTextLabel.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTTableView.h" -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyledText.h" -#import "Three20Style/TTStyledNode.h" -#import "Three20Style/TTStyleSheet.h" -#import "Three20Style/TTStyledElement.h" -#import "Three20Style/TTStyledLinkNode.h" -#import "Three20Style/TTStyledButtonNode.h" -#import "Three20Style/TTStyledTextNode.h" - -// - Styled frames -#import "Three20Style/TTStyledInlineFrame.h" -#import "Three20Style/TTStyledTextFrame.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" - -static const CGFloat kCancelHighlightThreshold = 4; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledTextLabel - -@synthesize text = _text; -@synthesize textColor = _textColor; -@synthesize highlightedTextColor = _highlightedTextColor; -@synthesize font = _font; -@synthesize textAlignment = _textAlignment; -@synthesize contentInset = _contentInset; -@synthesize highlighted = _highlighted; -@synthesize highlightedNode = _highlightedNode; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _textAlignment = UITextAlignmentLeft; - _contentInset = UIEdgeInsetsZero; - - self.font = TTSTYLEVAR(font); - self.backgroundColor = TTSTYLEVAR(backgroundColor); - self.contentMode = UIViewContentModeRedraw; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - _text.delegate = nil; - TT_RELEASE_SAFELY(_text); - TT_RELEASE_SAFELY(_font); - TT_RELEASE_SAFELY(_textColor); - TT_RELEASE_SAFELY(_highlightedTextColor); - TT_RELEASE_SAFELY(_highlightedNode); - TT_RELEASE_SAFELY(_highlightedFrame); - TT_RELEASE_SAFELY(_accessibilityElements); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * UITableView looks for this function and crashes if it is not found when you select a cell - */ -- (BOOL)isHighlighted { - return _highlighted; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setStyle:(TTStyle*)style forFrame:(TTStyledBoxFrame*)frame { - if ([frame isKindOfClass:[TTStyledInlineFrame class]]) { - TTStyledInlineFrame* inlineFrame = (TTStyledInlineFrame*)frame; - while (inlineFrame.inlinePreviousFrame) { - inlineFrame = inlineFrame.inlinePreviousFrame; - } - while (inlineFrame) { - inlineFrame.style = style; - inlineFrame = inlineFrame.inlineNextFrame; - } - - } else { - frame.style = style; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHighlightedFrame:(TTStyledBoxFrame*)frame{ - if (frame != _highlightedFrame) { - TTTableView* tableView = (TTTableView*)[self ancestorOrSelfWithClass:[TTTableView class]]; - - TTStyledBoxFrame* affectFrame = frame ? frame : _highlightedFrame; - NSString* className = affectFrame.element.className; - if (!className && [affectFrame.element isKindOfClass:[TTStyledLinkNode class]]) { - className = @"linkText:"; - } - - if (className && [className rangeOfString:@":"].location != NSNotFound) { - if (frame) { - TTStyle* style = [TTSTYLESHEET styleWithSelector:className - forState:UIControlStateHighlighted]; - [self setStyle:style forFrame:frame]; - - [_highlightedFrame release]; - _highlightedFrame = [frame retain]; - [_highlightedNode release]; - _highlightedNode = [frame.element retain]; - tableView.highlightedLabel = self; - - } else { - TTStyle* style = [TTSTYLESHEET styleWithSelector:className forState:UIControlStateNormal]; - [self setStyle:style forFrame:_highlightedFrame]; - - TT_RELEASE_SAFELY(_highlightedFrame); - TT_RELEASE_SAFELY(_highlightedNode); - tableView.highlightedLabel = nil; - } - - [self setNeedsDisplay]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)combineTextFromFrame:(TTStyledTextFrame*)fromFrame - toFrame:(TTStyledTextFrame*)toFrame { - NSMutableArray* strings = [NSMutableArray array]; - for (TTStyledTextFrame* frame = fromFrame; frame && frame != toFrame; - frame = (TTStyledTextFrame*)frame.nextFrame) { - [strings addObject:frame.text]; - } - return [strings componentsJoinedByString:@""]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addAccessibilityElementFromFrame:(TTStyledTextFrame*)fromFrame - toFrame:(TTStyledTextFrame*)toFrame withEdges:(UIEdgeInsets)edges { - CGRect rect = CGRectMake(edges.left, edges.top, - edges.right-edges.left, edges.bottom-edges.top); - - UIAccessibilityElement* acc = [[[UIAccessibilityElement alloc] - initWithAccessibilityContainer:self] autorelease]; - acc.accessibilityFrame = CGRectOffset(rect, self.screenViewX, self.screenViewY); - acc.accessibilityTraits = UIAccessibilityTraitStaticText; - if (fromFrame == toFrame) { - acc.accessibilityLabel = fromFrame.text; - - } else { - acc.accessibilityLabel = [self combineTextFromFrame:fromFrame toFrame:toFrame]; - } - [_accessibilityElements addObject:acc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIEdgeInsets)edgesForRect:(CGRect)rect { - return UIEdgeInsetsMake(rect.origin.y, rect.origin.x, - rect.origin.y+rect.size.height, - rect.origin.x+rect.size.width); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addAccessibilityElementsForNode:(TTStyledNode*)node { - if ([node isKindOfClass:[TTStyledLinkNode class]]) { - UIAccessibilityElement* acc = [[[UIAccessibilityElement alloc] - initWithAccessibilityContainer:self] autorelease]; - TTStyledFrame* frame = [_text getFrameForNode:node]; - acc.accessibilityFrame = CGRectOffset(frame.bounds, self.screenViewX, self.screenViewY); - acc.accessibilityTraits = UIAccessibilityTraitLink; - acc.accessibilityLabel = [node outerText]; - [_accessibilityElements addObject:acc]; - - } else if ([node isKindOfClass:[TTStyledTextNode class]]) { - TTStyledTextFrame* startFrame = (TTStyledTextFrame*)[_text getFrameForNode:node]; - UIEdgeInsets edges = [self edgesForRect:startFrame.bounds]; - - TTStyledTextFrame* frame = (TTStyledTextFrame*)startFrame.nextFrame; - for (; - [frame isKindOfClass:[TTStyledTextFrame class]]; - frame = (TTStyledTextFrame*)frame.nextFrame) { - if (frame.bounds.origin.x < edges.left) { - [self addAccessibilityElementFromFrame:startFrame toFrame:frame withEdges:edges]; - edges = [self edgesForRect:frame.bounds]; - startFrame = frame; - - } else { - if (frame.bounds.origin.x+frame.bounds.size.width > edges.right) { - edges.right = frame.bounds.origin.x+frame.bounds.size.width; - } - if (frame.bounds.origin.y+frame.bounds.size.height > edges.bottom) { - edges.bottom = frame.bounds.origin.y+frame.bounds.size.height; - } - } - } - - if (frame != startFrame) { - [self addAccessibilityElementFromFrame:startFrame toFrame:frame withEdges:edges]; - } - - } else if ([node isKindOfClass:[TTStyledElement class]]) { - TTStyledElement* element = (TTStyledElement*)node; - for (TTStyledNode* child = element.firstChild; child; child = child.nextSibling) { - [self addAccessibilityElementsForNode:child]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableArray*)accessibilityElements { - if (!_accessibilityElements) { - _accessibilityElements = [[NSMutableArray alloc] init]; - [self addAccessibilityElementsForNode:_text.rootNode]; - } - return _accessibilityElements; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - -/* -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canBecomeFirstResponder { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)becomeFirstResponder { - BOOL became = [super becomeFirstResponder]; - - UIMenuController* menu = [UIMenuController sharedMenuController]; - [menu setTargetRect:self.frame inView:self.superview]; - [menu setMenuVisible:YES animated:YES]; - - self.highlighted = YES; - return became; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)resignFirstResponder { - self.highlighted = NO; - BOOL resigned = [super resignFirstResponder]; - [[UIMenuController sharedMenuController] setMenuVisible:NO]; - return resigned; -} -*/ - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { - UITouch* touch = [touches anyObject]; - CGPoint point = [touch locationInView:self]; - point.x -= _contentInset.left; - point.y -= _contentInset.top; - - TTStyledBoxFrame* frame = [_text hitTest:point]; - if (frame) { - [self setHighlightedFrame:frame]; - } - - //[self performSelector:@selector(becomeFirstResponder) withObject:nil afterDelay:0.5]; - - [super touchesBegan:touches withEvent:event]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { - [super touchesMoved:touches withEvent:event]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { - TTTableView* tableView = (TTTableView*)[self ancestorOrSelfWithClass:[TTTableView class]]; - if (!tableView) { - if (_highlightedNode) { - // This is a dirty hack to decouple the UI from Style. TTOpenURL was originally within - // the node implementation. One potential fix would be to provide some protocol for these - // nodes to converse with. - if ([_highlightedNode isKindOfClass:[TTStyledLinkNode class]]) { - TTOpenURL([(TTStyledLinkNode*)_highlightedNode URL]); - - } else if ([_highlightedNode isKindOfClass:[TTStyledButtonNode class]]) { - TTOpenURL([(TTStyledButtonNode*)_highlightedNode URL]); - - } else { - [_highlightedNode performDefaultAction]; - } - [self setHighlightedFrame:nil]; - } - } - - // We definitely don't want to call this if the label is inside a TTTableView, because - // it winds up calling touchesEnded on the table twice, triggering the link twice - [super touchesEnded:touches withEvent:event]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event { - [super touchesCancelled:touches withEvent:event]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - if (_highlighted) { - [self.highlightedTextColor setFill]; - - } else { - [self.textColor setFill]; - } - - CGPoint origin = CGPointMake(rect.origin.x + _contentInset.left, - rect.origin.y + _contentInset.top); - [_text drawAtPoint:origin highlighted:_highlighted]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - CGFloat newWidth = self.width - (_contentInset.left + _contentInset.right); - if (newWidth != _text.width) { - // Remove the highlighted node+frame when resizing the text - self.highlightedNode = nil; - } - - _text.width = newWidth; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - [self layoutIfNeeded]; - return CGSizeMake(_text.width + (_contentInset.left + _contentInset.right), - _text.height+ (_contentInset.top + _contentInset.bottom)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAccessibilityContainer - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)accessibilityElementAtIndex:(NSInteger)elementIndex { - return [[self accessibilityElements] objectAtIndex:elementIndex]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)accessibilityElementCount { - return [self accessibilityElements].count; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)indexOfAccessibilityElement:(id)element { - return [[self accessibilityElements] indexOfObject:element]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponderStandardEditActions - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)copy:(id)sender { - NSString* text = _text.rootNode.outerText; - UIPasteboard* pasteboard = [UIPasteboard generalPasteboard]; - [pasteboard setValue:text forPasteboardType:@"public.utf8-plain-text"]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTStyledTextDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)styledTextNeedsDisplay:(TTStyledText*)text { - [self setNeedsDisplay]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(TTStyledText*)text { - if (text != _text) { - _text.delegate = nil; - [_text release]; - TT_RELEASE_SAFELY(_accessibilityElements); - _text = [text retain]; - _text.delegate = self; - _text.font = _font; - [self setNeedsLayout]; - [self setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)html { - return [_text description]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHtml:(NSString*)html { - self.text = [TTStyledText textFromXHTML:html]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - if (font != _font) { - [_font release]; - _font = [font retain]; - _text.font = _font; - [self setNeedsLayout]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)textColor { - if (!_textColor) { - _textColor = [TTSTYLEVAR(textColor) retain]; - } - return _textColor; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTextColor:(UIColor*)textColor { - if (textColor != _textColor) { - [_textColor release]; - _textColor = [textColor retain]; - [self setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)highlightedTextColor { - if (!_highlightedTextColor) { - _highlightedTextColor = [TTSTYLEVAR(highlightedTextColor) retain]; - } - return _highlightedTextColor; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHighlightedNode:(TTStyledElement*)node { - if (node != _highlightedNode) { - if (!node) { - [self setHighlightedFrame:nil]; - - } else { - [_highlightedNode release]; - _highlightedNode = [node retain]; - } - } -} - - -@end diff --git a/src/Three20UI/Sources/TTStyledTextTableCell.m b/src/Three20UI/Sources/TTStyledTextTableCell.m deleted file mode 100644 index 1ea05dd33a..0000000000 --- a/src/Three20UI/Sources/TTStyledTextTableCell.m +++ /dev/null @@ -1,121 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTStyledTextTableCell.h" - -// UI -#import "Three20UI/TTStyledTextLabel.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20UI/UITableViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/TTStyledText.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledTextTableCell - -@synthesize label = _label; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:style reuseIdentifier:identifier]) { - _label = [[TTStyledTextLabel alloc] init]; - _label.contentMode = UIViewContentModeLeft; - [self.contentView addSubview:_label]; - - self.selectionStyle = UITableViewCellSelectionStyleNone; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_label); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - TTStyledText* text = object; - if (!text.font) { - text.font = TTSTYLEVAR(font); - } - text.width = tableView.width - [tableView tableCellMargin]*2; - return text.height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - _label.frame = self.contentView.bounds; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToSuperview { - [super didMoveToSuperview]; - if (self.superview) { - _label.backgroundColor = self.backgroundColor; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)object { - return _label.text; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (self.object != object) { - _label.text = object; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTStyledTextTableItemCell.m b/src/Three20UI/Sources/TTStyledTextTableItemCell.m deleted file mode 100644 index 51b1ebc365..0000000000 --- a/src/Three20UI/Sources/TTStyledTextTableItemCell.m +++ /dev/null @@ -1,131 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTStyledTextTableItemCell.h" - -// UI -#import "Three20UI/TTStyledTextLabel.h" -#import "Three20UI/TTTableStyledTextItem.h" -#import "Three20UI/UITableViewAdditions.h" -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/TTStyledText.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kDisclosureIndicatorWidth = 23; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTStyledTextTableItemCell - -@synthesize label = _label; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:style reuseIdentifier:identifier]) { - _label = [[TTStyledTextLabel alloc] init]; - _label.contentMode = UIViewContentModeLeft; - [self.contentView addSubview:_label]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_label); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - TTTableStyledTextItem* item = object; - if (!item.text.font) { - item.text.font = TTSTYLEVAR(font); - } - - CGFloat padding = [tableView tableCellMargin]*2 + item.padding.left + item.padding.right; - if (item.URL) { - padding += kDisclosureIndicatorWidth; - } - - item.text.width = tableView.width - padding; - - return item.text.height + item.padding.top + item.padding.bottom; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - TTTableStyledTextItem* item = self.object; - _label.frame = CGRectOffset(self.contentView.bounds, item.margin.left, item.margin.top); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToSuperview { - [super didMoveToSuperview]; - if (self.superview) { - _label.backgroundColor = self.backgroundColor; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableStyledTextItem* item = object; - _label.text = item.text; - _label.contentInset = item.padding; - [self setNeedsLayout]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTab.m b/src/Three20UI/Sources/TTTab.m deleted file mode 100644 index 39d4cb1355..0000000000 --- a/src/Three20UI/Sources/TTTab.m +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTab.h" - -// UI -#import "Three20UI/TTTabItem.h" -#import "Three20UI/TTLabel.h" -#import "Three20UI/UIViewAdditions.h" - -// UI (private) -#import "Three20UI/private/TTTabBarInternal.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTab - -@synthesize tabItem = _tabItem; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithItem:(TTTabItem*)tabItem tabBar:(TTTabBar*)tabBar { - if (self = [self init]) { - self.tabItem = tabItem; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_tabItem); - TT_RELEASE_SAFELY(_badge); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateBadgeNumber { - if (_tabItem.badgeNumber) { - if (!_badge) { - _badge = [[TTLabel alloc] init]; - _badge.style = TTSTYLE(badge); - _badge.backgroundColor = [UIColor clearColor]; - _badge.userInteractionEnabled = NO; - [self addSubview:_badge]; - } - if (_tabItem.badgeNumber <= kMaxBadgeNumber) { - _badge.text = [NSString stringWithFormat:@"%d", _tabItem.badgeNumber]; - - } else { - _badge.text = [NSString stringWithFormat:@"%d+", kMaxBadgeNumber]; - } - [_badge sizeToFit]; - - _badge.frame = CGRectMake(self.width - _badge.width-1, 1, _badge.width, _badge.height); - _badge.hidden = NO; - - } else { - _badge.hidden = YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTabItemDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tabItem:(TTTabItem*)item badgeNumberChangedTo:(int)value { - [self updateBadgeNumber]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTabItem:(TTTabItem*)tabItem { - if (tabItem != _tabItem) { - [_tabItem performSelector:@selector(setTabBar:) withObject:nil]; - [_tabItem release]; - _tabItem = [tabItem retain]; - [_tabItem performSelector:@selector(setTabBar:) withObject:self]; - - [self setTitle:_tabItem.title forState:UIControlStateNormal]; - [self setImage:_tabItem.icon forState:UIControlStateNormal]; - - if (_tabItem.badgeNumber) { - [self updateBadgeNumber]; - } - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTabBar.m b/src/Three20UI/Sources/TTTabBar.m deleted file mode 100644 index 0912b2d3e9..0000000000 --- a/src/Three20UI/Sources/TTTabBar.m +++ /dev/null @@ -1,207 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTabBar.h" - -// UI -#import "Three20UI/TTTab.h" -#import "Three20UI/TTTabDelegate.h" - -// UI (private) -#import "Three20UI/private/TTTabBarInternal.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTabBar - -@synthesize tabItems = _tabItems; -@synthesize tabViews = _tabViews; -@synthesize tabStyle = _tabStyle; - -@synthesize selectedTabIndex = _selectedTabIndex; - -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _selectedTabIndex = NSIntegerMax; - _tabViews = [[NSMutableArray alloc] init]; - - self.style = TTSTYLE(tabBar); - self.tabStyle = @"tab:"; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_tabStyle); - TT_RELEASE_SAFELY(_tabItems); - TT_RELEASE_SAFELY(_tabViews); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTab:(TTTab*)tab { - [self addSubview:tab]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tabTouchedUp:(TTTab*)tab { - self.selectedTabView = tab; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - [self layoutTabs]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTTabItem*)selectedTabItem { - if (_selectedTabIndex != NSIntegerMax) { - return [_tabItems objectAtIndex:_selectedTabIndex]; - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSelectedTabItem:(TTTabItem*)tabItem { - self.selectedTabIndex = [_tabItems indexOfObject:tabItem]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTTab*)selectedTabView { - if (_selectedTabIndex != NSIntegerMax && _selectedTabIndex < _tabViews.count) { - return [_tabViews objectAtIndex:_selectedTabIndex]; - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSelectedTabView:(TTTab*)tab { - self.selectedTabIndex = [_tabViews indexOfObject:tab]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSelectedTabIndex:(NSInteger)selectedTabIndex { - if (selectedTabIndex != _selectedTabIndex) { - if (_selectedTabIndex != NSIntegerMax) { - self.selectedTabView.selected = NO; - } - - _selectedTabIndex = selectedTabIndex; - - if (_selectedTabIndex != NSIntegerMax) { - self.selectedTabView.selected = YES; - } - - if ([_delegate respondsToSelector:@selector(tabBar:tabSelected:)]) { - [_delegate tabBar:self tabSelected:_selectedTabIndex]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTabItems:(NSArray*)tabItems { - [_tabItems release]; - _tabItems = [tabItems retain]; - - for (int i = 0; i < _tabViews.count; ++i) { - TTTab* tab = [_tabViews objectAtIndex:i]; - [tab removeFromSuperview]; - } - - [_tabViews removeAllObjects]; - - if (_selectedTabIndex >= _tabViews.count) { - _selectedTabIndex = 0; - } - - for (int i = 0; i < _tabItems.count; ++i) { - TTTabItem* tabItem = [_tabItems objectAtIndex:i]; - TTTab* tab = [[[TTTab alloc] initWithItem:tabItem tabBar:self] autorelease]; - [tab setStylesWithSelector:self.tabStyle]; - [tab addTarget: self - action: @selector(tabTouchedUp:) - forControlEvents: UIControlEventTouchUpInside]; - [self addTab:tab]; - [_tabViews addObject:tab]; - if (i == _selectedTabIndex) { - tab.selected = YES; - } - } - - [self setNeedsLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showTabAtIndex:(NSInteger)tabIndex { - TTTab* tab = [_tabViews objectAtIndex:tabIndex]; - tab.hidden = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)hideTabAtIndex:(NSInteger)tabIndex { - TTTab* tab = [_tabViews objectAtIndex:tabIndex]; - tab.hidden = YES; -} - - -@end diff --git a/src/Three20UI/Sources/TTTabBarInternal.m b/src/Three20UI/Sources/TTTabBarInternal.m deleted file mode 100644 index 45be631ea3..0000000000 --- a/src/Three20UI/Sources/TTTabBarInternal.m +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTTabBarInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/TTTab.h" -#import "Three20UI/UIViewAdditions.h" - - CGFloat kTabMargin = 10; -const NSInteger kMaxBadgeNumber = 99; -static CGFloat kPadding = 10; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -TT_FIX_CATEGORY_BUG(TTTabBarInternal) - -@implementation TTTabBar (TTInternal) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)layoutTabs { - CGFloat x = kTabMargin; - - if (self.contentMode == UIViewContentModeScaleToFill) { - CGFloat maxTextWidth = self.width - (kTabMargin*2 + kPadding*2*_tabViews.count); - CGFloat totalTextWidth = 0; - CGFloat totalTabWidth = kTabMargin*2; - CGFloat maxTabWidth = 0; - for (int i = 0; i < _tabViews.count; ++i) { - TTTab* tab = [_tabViews objectAtIndex:i]; - [tab sizeToFit]; - totalTextWidth += tab.width - kPadding*2; - totalTabWidth += tab.width; - if (tab.width > maxTabWidth) { - maxTabWidth = tab.width; - } - } - - if (totalTextWidth > maxTextWidth) { - CGFloat shrinkFactor = maxTextWidth/totalTextWidth; - for (int i = 0; i < _tabViews.count; ++i) { - TTTab* tab = [_tabViews objectAtIndex:i]; - CGFloat textWidth = tab.width - kPadding*2; - tab.frame = CGRectMake(x, 0, ceil(textWidth * shrinkFactor) + kPadding*2 , self.height); - x += tab.width; - } - - } else { - CGFloat averageTabWidth = ceil((self.width - kTabMargin*2)/_tabViews.count); - if (maxTabWidth > averageTabWidth && self.width - totalTabWidth < kTabMargin) { - for (int i = 0; i < _tabViews.count; ++i) { - TTTab* tab = [_tabViews objectAtIndex:i]; - tab.frame = CGRectMake(x, 0, tab.width, self.height); - x += tab.width; - } - - } else { - for (int i = 0; i < _tabViews.count; ++i) { - TTTab* tab = [_tabViews objectAtIndex:i]; - tab.frame = CGRectMake(x, 0, averageTabWidth, self.height); - x += tab.width; - } - } - } - - } else { - for (int i = 0; i < _tabViews.count; ++i) { - TTTab* tab = [_tabViews objectAtIndex:i]; - [tab sizeToFit]; - tab.frame = CGRectMake(x, 0, tab.width, self.height); - x += tab.width; - } - } - - return CGSizeMake(x, self.height); -} - - -@end diff --git a/src/Three20UI/Sources/TTTabGrid.m b/src/Three20UI/Sources/TTTabGrid.m deleted file mode 100644 index e5369de572..0000000000 --- a/src/Three20UI/Sources/TTTabGrid.m +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTabGrid.h" - -// UI -#import "Three20UI/TTButton.h" -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" -#import "Three20Style/TTGridLayout.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTabGrid - -@synthesize columnCount = _columnCount; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.style = TTSTYLE(tabGrid); - _columnCount = 3; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)rowCount { - return ceil((float)self.tabViews.count / self.columnCount); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateTabStyles { - CGFloat columnCount = [self columnCount]; - int rowCount = [self rowCount]; - int cellCount = rowCount * columnCount; - - if (self.tabViews.count > columnCount) { - int column = 0; - for (TTTab* tab in self.tabViews) { - if (column == 0) { - [tab setStylesWithSelector:@"tabGridTabTopLeft:"]; - - } else if (column == columnCount-1) { - [tab setStylesWithSelector:@"tabGridTabTopRight:"]; - - } else if (column == cellCount - columnCount) { - [tab setStylesWithSelector:@"tabGridTabBottomLeft:"]; - - } else if (column == cellCount - 1) { - [tab setStylesWithSelector:@"tabGridTabBottomRight:"]; - - } else { - [tab setStylesWithSelector:@"tabGridTabCenter:"]; - } - ++column; - } - - } else { - int column = 0; - for (TTTab* tab in self.tabViews) { - if (column == 0) { - [tab setStylesWithSelector:@"tabGridTabLeft:"]; - - } else if (column == columnCount-1) { - [tab setStylesWithSelector:@"tabGridTabRight:"]; - - } else { - [tab setStylesWithSelector:@"tabGridTabCenter:"]; - } - ++column; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)layoutTabs { - if (self.width && self.height) { - TTGridLayout* layout = [[[TTGridLayout alloc] init] autorelease]; - layout.padding = 1; - layout.columnCount = [self columnCount]; - return [layout layoutSubviews:self.tabViews forView:self]; - - } else { - return self.frame.size; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - CGSize styleSize = [super sizeThatFits:size]; - for (TTTab* tab in self.tabViews) { - CGSize tabSize = [tab sizeThatFits:CGSizeZero]; - NSInteger rowCount = [self rowCount]; - return CGSizeMake(size.width, - rowCount ? tabSize.height * [self rowCount] + styleSize.height : 0); - } - return size; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTabItems:(NSArray*)tabItems { - [super setTabItems:tabItems]; - [self updateTabStyles]; -} - - -@end diff --git a/src/Three20UI/Sources/TTTabItem.m b/src/Three20UI/Sources/TTTabItem.m deleted file mode 100644 index 27e8b1ae46..0000000000 --- a/src/Three20UI/Sources/TTTabItem.m +++ /dev/null @@ -1,76 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTabItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTabItem - -@synthesize title = _title; -@synthesize icon = _icon; -@synthesize object = _object; -@synthesize badgeNumber = _badgeNumber; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title { - if (self = [self init]) { - self.title = title; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_title); - TT_RELEASE_SAFELY(_icon); - TT_RELEASE_SAFELY(_object); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTabBar:(TTTabBar*)tabBar { - _tabBar = tabBar; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setBadgeNumber:(int)value { - value = value < 0 ? 0 : value; - _badgeNumber = value; - [_tabBar performSelector:@selector(tabItem:badgeNumberChangedTo:) withObject:self - withObject:(id)value]; -} - - -@end diff --git a/src/Three20UI/Sources/TTTabStrip.m b/src/Three20UI/Sources/TTTabStrip.m deleted file mode 100644 index 638cc4b233..0000000000 --- a/src/Three20UI/Sources/TTTabStrip.m +++ /dev/null @@ -1,165 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTabStrip.h" - -// UI -#import "Three20UI/TTTab.h" -#import "Three20UI/UIViewAdditions.h" - -// UI (private) -#import "Three20UI/private/TTTabBarInternal.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTabStrip - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _scrollView = [[UIScrollView alloc] init]; - _scrollView.scrollEnabled = YES; - _scrollView.scrollsToTop = NO; - _scrollView.showsVerticalScrollIndicator = NO; - _scrollView.showsHorizontalScrollIndicator = NO; - [self addSubview:_scrollView]; - - self.style = TTSTYLE(tabStrip); - self.tabStyle = @"tabRound:"; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_overflowLeft); - TT_RELEASE_SAFELY(_overflowRight); - TT_RELEASE_SAFELY(_scrollView); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addTab:(TTTab*)tab { - [_scrollView addSubview:tab]; - _contentSizeCached = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateOverflow { - if (_scrollView.contentOffset.x < (_scrollView.contentSize.width-self.width)) { - if (!_overflowRight) { - _overflowRight = [[TTView alloc] init]; - _overflowRight.style = TTSTYLE(tabOverflowRight); - _overflowRight.userInteractionEnabled = NO; - _overflowRight.backgroundColor = [UIColor clearColor]; - [_overflowRight sizeToFit]; - [self addSubview:_overflowRight]; - } - - _overflowRight.left = self.width-_overflowRight.width; - _overflowRight.hidden = NO; - - } else { - _overflowRight.hidden = YES; - } - if (_scrollView.contentOffset.x > 0) { - if (!_overflowLeft) { - _overflowLeft = [[TTView alloc] init]; - _overflowLeft.style = TTSTYLE(tabOverflowLeft); - _overflowLeft.userInteractionEnabled = NO; - _overflowLeft.backgroundColor = [UIColor clearColor]; - [_overflowLeft sizeToFit]; - [self addSubview:_overflowLeft]; - } - - _overflowLeft.hidden = NO; - - } else { - _overflowLeft.hidden = YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)layoutTabs { - if (_contentSizeCached) { - return _contentSize; - } - - CGSize size = [super layoutTabs]; - - CGPoint contentOffset = _scrollView.contentOffset; - _scrollView.frame = self.bounds; - _scrollView.contentSize = CGSizeMake(size.width + kTabMargin, self.height); - _scrollView.contentOffset = contentOffset; - - _contentSize = size; - _contentSizeCached = YES; - - return size; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - [self updateOverflow]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTabBar - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTabItems:(NSArray*)tabItems { - [super setTabItems:tabItems]; - _contentSizeCached = NO; - [self updateOverflow]; -} - - -@end - diff --git a/src/Three20UI/Sources/TTTableActivityItem.m b/src/Three20UI/Sources/TTTableActivityItem.m deleted file mode 100644 index 30eb916d5c..0000000000 --- a/src/Three20UI/Sources/TTTableActivityItem.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableActivityItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableActivityItem - -@synthesize text = _text; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_text); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text { - TTTableActivityItem* item = [[[self alloc] init] autorelease]; - item.text = text; - return item; -} - - -@end diff --git a/src/Three20UI/Sources/TTTableActivityItemCell.m b/src/Three20UI/Sources/TTTableActivityItemCell.m deleted file mode 100644 index 70932bc078..0000000000 --- a/src/Three20UI/Sources/TTTableActivityItemCell.m +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableActivityItemCell.h" - -// UI -#import "Three20UI/TTActivityLabel.h" -#import "Three20UI/TTTableActivityItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableActivityItemCell - -@synthesize activityLabel = _activityLabel; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:style reuseIdentifier:identifier]) { - _activityLabel = [[TTActivityLabel alloc] initWithStyle:TTActivityLabelStyleGray]; - [self.contentView addSubview:_activityLabel]; - - self.accessoryType = UITableViewCellAccessoryNone; - self.selectionStyle = UITableViewCellSelectionStyleNone; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_activityLabel); - TT_RELEASE_SAFELY(_item); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - UITableView* tableView = (UITableView*)self.superview; - if (tableView.style == UITableViewStylePlain) { - _activityLabel.frame = self.contentView.bounds; - - } else { - _activityLabel.frame = CGRectInset(self.contentView.bounds, -1, -1); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [_item release]; - _item = [object retain]; - - TTTableActivityItem* item = object; - _activityLabel.text = item.text; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableButton.m b/src/Three20UI/Sources/TTTableButton.m deleted file mode 100644 index 205341da48..0000000000 --- a/src/Three20UI/Sources/TTTableButton.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableButton.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableButton - -@end - diff --git a/src/Three20UI/Sources/TTTableCaptionItem.m b/src/Three20UI/Sources/TTTableCaptionItem.m deleted file mode 100644 index 04a99d01a0..0000000000 --- a/src/Three20UI/Sources/TTTableCaptionItem.m +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableCaptionItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableCaptionItem - -@synthesize caption = _caption; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_caption); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text caption:(NSString*)caption { - TTTableCaptionItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.caption = caption; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text caption:(NSString*)caption URL:(NSString*)URL { - TTTableCaptionItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.caption = caption; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text caption:(NSString*)caption URL:(NSString*)URL - accessoryURL:(NSString*)accessoryURL { - TTTableCaptionItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.caption = caption; - item.URL = URL; - item.accessoryURL = accessoryURL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.caption = [decoder decodeObjectForKey:@"caption"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.caption) { - [encoder encodeObject:self.caption forKey:@"caption"]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableCaptionItemCell.m b/src/Three20UI/Sources/TTTableCaptionItemCell.m deleted file mode 100644 index 8f99d69e2b..0000000000 --- a/src/Three20UI/Sources/TTTableCaptionItemCell.m +++ /dev/null @@ -1,139 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableCaptionItemCell.h" - -// UI -#import "Three20UI/TTTableCaptionItem.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20Style/UIFontAdditions.h" -#import "Three20UI/UITableViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -static const CGFloat kKeySpacing = 12; -static const CGFloat kKeyWidth = 75; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableCaptionItemCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:identifier]) { - self.textLabel.font = TTSTYLEVAR(tableTitleFont); - self.textLabel.textColor = TTSTYLEVAR(linkTextColor); - self.textLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.textLabel.textAlignment = UITextAlignmentRight; - self.textLabel.lineBreakMode = UILineBreakModeTailTruncation; - self.textLabel.numberOfLines = 1; - self.textLabel.adjustsFontSizeToFitWidth = YES; - - self.detailTextLabel.font = TTSTYLEVAR(tableSmallFont); - self.detailTextLabel.textColor = TTSTYLEVAR(textColor); - self.detailTextLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.detailTextLabel.adjustsFontSizeToFitWidth = YES; - self.detailTextLabel.minimumFontSize = 8; - self.detailTextLabel.lineBreakMode = UILineBreakModeWordWrap; - self.detailTextLabel.numberOfLines = 0; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - TTTableCaptionItem* item = object; - - CGFloat margin = [tableView tableCellMargin]; - CGFloat width = tableView.width - (kKeyWidth + kKeySpacing + kTableCellHPadding*2 + margin*2); - - CGSize detailTextSize = [item.text sizeWithFont:TTSTYLEVAR(tableSmallFont) - constrainedToSize:CGSizeMake(width, CGFLOAT_MAX) - lineBreakMode:UILineBreakModeWordWrap]; - - CGSize captionTextSize = [item.caption sizeWithFont:TTSTYLEVAR(tableTitleFont) - constrainedToSize:CGSizeMake(kKeyWidth, CGFLOAT_MAX) - lineBreakMode:UILineBreakModeTailTruncation]; - - return MAX(detailTextSize.height, captionTextSize.height) + kTableCellVPadding*2; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - self.textLabel.frame = CGRectMake(kTableCellHPadding, kTableCellVPadding, - kKeyWidth, self.textLabel.font.ttLineHeight); - - CGFloat valueWidth = self.contentView.width - (kTableCellHPadding*2 + kKeyWidth + kKeySpacing); - CGFloat innerHeight = self.contentView.height - kTableCellVPadding*2; - self.detailTextLabel.frame = CGRectMake(kTableCellHPadding + kKeyWidth + kKeySpacing, - kTableCellVPadding, - valueWidth, innerHeight); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableCaptionItem* item = object; - self.textLabel.text = item.caption; - self.detailTextLabel.text = item.text; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UILabel*)captionLabel { - return self.textLabel; -} - - -@end diff --git a/src/Three20UI/Sources/TTTableControlCell.m b/src/Three20UI/Sources/TTTableControlCell.m deleted file mode 100644 index 41feb9a0eb..0000000000 --- a/src/Three20UI/Sources/TTTableControlCell.m +++ /dev/null @@ -1,217 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableControlCell.h" - -// UI -#import "Three20UI/TTTableControlItem.h" -#import "Three20UI/TTTextEditor.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20Style/UIFontAdditions.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kDefaultTextViewLines = 5; -static const CGFloat kControlPadding = 8; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableControlCell - -@synthesize item = _item; -@synthesize control = _control; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:style reuseIdentifier:identifier]) { - self.selectionStyle = UITableViewCellSelectionStyleNone; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_item); - TT_RELEASE_SAFELY(_control); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (BOOL)shouldConsiderControlIntrinsicSize:(UIView*)view { - return [view isKindOfClass:[UISwitch class]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (BOOL)shouldSizeControlToFit:(UIView*)view { - return [view isKindOfClass:[UITextView class]] - || [view isKindOfClass:[TTTextEditor class]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (BOOL)shouldRespectControlPadding:(UIView*)view { - return [view isKindOfClass:[UITextField class]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - UIView* view = nil; - - if ([object isKindOfClass:[UIView class]]) { - view = object; - - } else { - TTTableControlItem* controlItem = object; - view = controlItem.control; - } - - CGFloat height = view.height; - if (!height) { - if ([view isKindOfClass:[UITextView class]]) { - UITextView* textView = (UITextView*)view; - CGFloat ttLineHeight = textView.font.ttLineHeight; - height = ttLineHeight * kDefaultTextViewLines; - - } else if ([view isKindOfClass:[TTTextEditor class]]) { - TTTextEditor* textEditor = (TTTextEditor*)view; - CGFloat ttLineHeight = textEditor.font.ttLineHeight; - height = ttLineHeight * kDefaultTextViewLines; - - } else if ([view isKindOfClass:[UITextField class]]) { - UITextField* textField = (UITextField*)view; - CGFloat ttLineHeight = textField.font.ttLineHeight; - height = ttLineHeight + kTableCellSmallMargin*2; - - } else { - [view sizeToFit]; - height = view.height; - } - } - - if (height < TT_ROW_HEIGHT) { - return TT_ROW_HEIGHT; - - } else { - return height; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - if ([TTTableControlCell shouldSizeControlToFit:_control]) { - _control.frame = CGRectInset(self.contentView.bounds, 2, kTableCellSpacing / 2); - - } else { - CGFloat minX = kControlPadding; - CGFloat contentWidth = self.contentView.width - kControlPadding; - if (![TTTableControlCell shouldRespectControlPadding:_control]) { - contentWidth -= kControlPadding; - } - if (self.textLabel.text.length) { - CGSize textSize = [self.textLabel sizeThatFits:self.contentView.bounds.size]; - contentWidth -= textSize.width + kTableCellSpacing; - minX += textSize.width + kTableCellSpacing; - } - - if (!_control.height) { - [_control sizeToFit]; - } - - if ([TTTableControlCell shouldConsiderControlIntrinsicSize:_control]) { - minX += contentWidth - _control.width; - } - - // XXXjoe For some reason I need to re-add the control as a subview or else - // the re-use of the cell will cause the control to fail to paint itself on occasion - [self.contentView addSubview:_control]; - _control.frame = CGRectMake(minX, floor(self.contentView.height/2 - _control.height/2), - contentWidth, _control.height); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)object { - return _item ? _item : (id)_control; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (object != _control && object != _item) { - [_control removeFromSuperview]; - TT_RELEASE_SAFELY(_control); - TT_RELEASE_SAFELY(_item); - - if ([object isKindOfClass:[UIView class]]) { - _control = [object retain]; - - } else if ([object isKindOfClass:[TTTableControlItem class]]) { - _item = [object retain]; - _control = [_item.control retain]; - } - - _control.backgroundColor = [UIColor clearColor]; - self.textLabel.text = _item.caption; - - if (_control) { - [self.contentView addSubview:_control]; - } - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableControlItem.m b/src/Three20UI/Sources/TTTableControlItem.m deleted file mode 100644 index 780555639e..0000000000 --- a/src/Three20UI/Sources/TTTableControlItem.m +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableControlItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableControlItem - -@synthesize caption = _caption; -@synthesize control = _control; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_caption); - TT_RELEASE_SAFELY(_control); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithCaption:(NSString*)caption control:(UIControl*)control { - TTTableControlItem* item = [[[self alloc] init] autorelease]; - item.caption = caption; - item.control = control; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.caption = [decoder decodeObjectForKey:@"caption"]; - self.control = [decoder decodeObjectForKey:@"control"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.caption) { - [encoder encodeObject:self.caption forKey:@"caption"]; - } - if (self.control) { - [encoder encodeObject:self.control forKey:@"control"]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableFlushViewCell.m b/src/Three20UI/Sources/TTTableFlushViewCell.m deleted file mode 100644 index 7c6b18a156..0000000000 --- a/src/Three20UI/Sources/TTTableFlushViewCell.m +++ /dev/null @@ -1,114 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableFlushViewCell.h" - -// UI -#import "Three20UI/TTTableViewItem.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableFlushViewCell - -@synthesize item = _item; -@synthesize view = _view; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:style reuseIdentifier:identifier]) { - self.selectionStyle = UITableViewCellSelectionStyleNone; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_item); - TT_RELEASE_SAFELY(_view); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - return TT_ROW_HEIGHT; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - _view.frame = self.contentView.bounds; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)object { - return _item ? _item : (id)_view; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (object != _view && object != _item) { - [_view removeFromSuperview]; - TT_RELEASE_SAFELY(_view); - TT_RELEASE_SAFELY(_item); - - if ([object isKindOfClass:[UIView class]]) { - _view = [object retain]; - - } else if ([object isKindOfClass:[TTTableViewItem class]]) { - _item = [object retain]; - _view = [_item.view retain]; - } - - [self.contentView addSubview:_view]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableFooterInfiniteScrollView.m b/src/Three20UI/Sources/TTTableFooterInfiniteScrollView.m deleted file mode 100644 index 2c9280db51..0000000000 --- a/src/Three20UI/Sources/TTTableFooterInfiniteScrollView.m +++ /dev/null @@ -1,92 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#import "Three20UI/TTTableFooterInfiniteScrollView.h" - -// UI -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Network -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTGlobalCoreLocale.h" - -#import - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableFooterInfiniteScrollView - -@synthesize indicator = _indicator; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if ((self = [super initWithFrame:frame])) { - self.indicator = [[[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] - autorelease]; - self.indicator.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | - UIViewAutoresizingFlexibleRightMargin; - - [self addSubview:self.indicator]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect{ - CGContextRef contextRef = UIGraphicsGetCurrentContext(); - CGContextSetRGBFillColor(contextRef, 1, 1, 1, 1); - CGContextFillRect(contextRef, rect); - if (!_loading) { - CGFloat dotSize = 5; - CGFloat x = roundf((self.width / 2) - (dotSize / 2)); - CGFloat y = roundf((self.height / 2) - (dotSize / 2)); - CGContextSetRGBFillColor(contextRef, 0.75, 0.75, 0.75, 1.0); - CGContextFillEllipseInRect(contextRef, CGRectMake(x, y, dotSize, dotSize)); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - self.indicator.left = roundf((self.width / 2) - (self.indicator.width / 2)); - self.indicator.top = roundf((self.height / 2) - (self.indicator.height / 2)); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setLoading:(BOOL)loading { - _loading = loading; - if (_loading) { - [self.indicator startAnimating]; - - } else { - [self.indicator stopAnimating]; - } - [self setNeedsDisplay]; -} - -@end diff --git a/src/Three20UI/Sources/TTTableGrayTextItem.m b/src/Three20UI/Sources/TTTableGrayTextItem.m deleted file mode 100644 index 1f87c86eec..0000000000 --- a/src/Three20UI/Sources/TTTableGrayTextItem.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableGrayTextItem.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableGrayTextItem - -@end - diff --git a/src/Three20UI/Sources/TTTableHeaderDragRefreshView.m b/src/Three20UI/Sources/TTTableHeaderDragRefreshView.m deleted file mode 100644 index 9bc82d197f..0000000000 --- a/src/Three20UI/Sources/TTTableHeaderDragRefreshView.m +++ /dev/null @@ -1,224 +0,0 @@ -// -// Created by Devin Doty on 10/14/09. -// http://github.com/enormego/EGOTableViewPullRefresh -// Copyright 2009 enormego. All rights reserved. -// -// Modifications copyright 2010 Facebook. -// -// 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. -// - -#import "Three20UI/TTTableHeaderDragRefreshView.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet+DragRefreshHeader.h" - -// Network -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTGlobalCoreLocale.h" -#import "Three20Core/TTCorePreprocessorMacros.h" - -#import - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableHeaderDragRefreshView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showActivity:(BOOL)shouldShow animated:(BOOL)animated { - if (shouldShow) { - [_activityView startAnimating]; - - } else { - [_activityView stopAnimating]; - } - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:(animated ? ttkDefaultFastTransitionDuration : 0.0)]; - _arrowImage.alpha = (shouldShow ? 0.0 : 1.0); - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setImageFlipped:(BOOL)flipped { - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultFastTransitionDuration]; - [_arrowImage layer].transform = (flipped ? - CATransform3DMakeRotation(M_PI * 2, 0.0f, 0.0f, 1.0f) : - CATransform3DMakeRotation(M_PI, 0.0f, 0.0f, 1.0f)); - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.autoresizingMask = UIViewAutoresizingFlexibleWidth; - - _lastUpdatedLabel = [[UILabel alloc] - initWithFrame:CGRectMake(0.0f, frame.size.height - 30.0f, - frame.size.width, 20.0f)]; - _lastUpdatedLabel.autoresizingMask = - UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin; - _lastUpdatedLabel.font = TTSTYLEVAR(tableRefreshHeaderLastUpdatedFont); - _lastUpdatedLabel.textColor = TTSTYLEVAR(tableRefreshHeaderTextColor); - _lastUpdatedLabel.shadowColor = TTSTYLEVAR(tableRefreshHeaderTextShadowColor); - _lastUpdatedLabel.shadowOffset = TTSTYLEVAR(tableRefreshHeaderTextShadowOffset); - _lastUpdatedLabel.backgroundColor = [UIColor clearColor]; - _lastUpdatedLabel.textAlignment = UITextAlignmentCenter; - [self addSubview:_lastUpdatedLabel]; - - _statusLabel = [[UILabel alloc] - initWithFrame:CGRectMake(0.0f, frame.size.height - 48.0f, - frame.size.width, 20.0f )]; - _statusLabel.autoresizingMask = - UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin; - _statusLabel.font = TTSTYLEVAR(tableRefreshHeaderStatusFont); - _statusLabel.textColor = TTSTYLEVAR(tableRefreshHeaderTextColor); - _statusLabel.shadowColor = TTSTYLEVAR(tableRefreshHeaderTextShadowColor); - _statusLabel.shadowOffset = TTSTYLEVAR(tableRefreshHeaderTextShadowOffset); - _statusLabel.backgroundColor = [UIColor clearColor]; - _statusLabel.textAlignment = UITextAlignmentCenter; - [self setStatus:TTTableHeaderDragRefreshPullToReload]; - [self addSubview:_statusLabel]; - - UIImage* arrowImage = TTSTYLEVAR(tableRefreshHeaderArrowImage); - _arrowImage = [[UIImageView alloc] - initWithFrame:CGRectMake(25.0f, frame.size.height - 60.0f, - arrowImage.size.width, arrowImage.size.height)]; - _arrowImage.image = arrowImage; - [_arrowImage layer].transform = CATransform3DMakeRotation(M_PI, 0.0f, 0.0f, 1.0f); - [self addSubview:_arrowImage]; - - _activityView = [[UIActivityIndicatorView alloc] - initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; - _activityView.frame = CGRectMake( 30.0f, frame.size.height - 38.0f, 20.0f, 20.0f ); - _activityView.hidesWhenStopped = YES; - [self addSubview:_activityView]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_activityView); - TT_RELEASE_SAFELY(_statusLabel); - TT_RELEASE_SAFELY(_arrowImage); - TT_RELEASE_SAFELY(_lastUpdatedLabel); - TT_RELEASE_SAFELY(_lastUpdatedDate); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setUpdateDate:(NSDate*)newDate { - if (newDate) { - if (_lastUpdatedDate != newDate) { - [_lastUpdatedDate release]; - } - - _lastUpdatedDate = [newDate retain]; - - NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; - [formatter setDateStyle:NSDateFormatterShortStyle]; - [formatter setTimeStyle:NSDateFormatterShortStyle]; - _lastUpdatedLabel.text = [NSString stringWithFormat: - TTLocalizedString(@"Last updated: %@", - @"The last time the table view was updated."), - [formatter stringFromDate:_lastUpdatedDate]]; - [formatter release]; - - } else { - _lastUpdatedDate = nil; - _lastUpdatedLabel.text = TTLocalizedString(@"Last updated: never", - @"The table view has never been updated"); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setCurrentDate { - [self setUpdateDate:[NSDate date]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setStatus:(TTTableHeaderDragRefreshStatus)status { - switch (status) { - case TTTableHeaderDragRefreshReleaseToReload: { - [self showActivity:NO animated:NO]; - [self setImageFlipped:YES]; - _statusLabel.text = TTLocalizedString(@"Release to update...", - @"Release the table view to update the contents."); - break; - } - - case TTTableHeaderDragRefreshPullToReload: { - [self showActivity:NO animated:NO]; - [self setImageFlipped:NO]; - _statusLabel.text = TTLocalizedString(@"Pull down to update...", - @"Drag the table view down to update the contents."); - break; - } - - case TTTableHeaderDragRefreshLoading: { - [self showActivity:YES animated:YES]; - [self setImageFlipped:NO]; - _statusLabel.text = TTLocalizedString(@"Updating...", - @"Updating the contents of a table view."); - break; - } - - default: { - break; - } - } -} - -@end diff --git a/src/Three20UI/Sources/TTTableHeaderView.m b/src/Three20UI/Sources/TTTableHeaderView.m deleted file mode 100644 index b4c7cb690b..0000000000 --- a/src/Three20UI/Sources/TTTableHeaderView.m +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableHeaderView.h" - -// UI -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableHeaderView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTitle:(NSString*)title { - if (self = [super init]) { - self.backgroundColor = [UIColor clearColor]; - self.style = TTSTYLE(tableHeader); - - _label = [[UILabel alloc] init]; - _label.text = title; - _label.backgroundColor = [UIColor clearColor]; - _label.textColor = TTSTYLEVAR(tableHeaderTextColor) - ? TTSTYLEVAR(tableHeaderTextColor) - : TTSTYLEVAR(linkTextColor); - _label.shadowColor = TTSTYLEVAR(tableHeaderShadowColor) - ? TTSTYLEVAR(tableHeaderShadowColor) - : [UIColor clearColor]; - _label.shadowOffset = TTSTYLEVAR(tableHeaderShadowOffset); - _label.font = TTSTYLEVAR(tableHeaderPlainFont); - [self addSubview:_label]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_label); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - _label.size = [_label sizeThatFits:CGSizeMake(self.bounds.size.width - 12, - self.bounds.size.height)]; - _label.origin = CGPointMake(12, floorf((self.bounds.size.height - _label.size.height)/2.f)); -} - - -@end diff --git a/src/Three20UI/Sources/TTTableImageItem.m b/src/Three20UI/Sources/TTTableImageItem.m deleted file mode 100644 index 3a3b30320f..0000000000 --- a/src/Three20UI/Sources/TTTableImageItem.m +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableImageItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableImageItem - -@synthesize imageURL = _imageURL; -@synthesize defaultImage = _defaultImage; -@synthesize imageStyle = _imageStyle; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_imageURL); - TT_RELEASE_SAFELY(_defaultImage); - TT_RELEASE_SAFELY(_imageStyle); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text imageURL:(NSString*)imageURL { - TTTableImageItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.imageURL = imageURL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text imageURL:(NSString*)imageURL URL:(NSString*)URL { - TTTableImageItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.imageURL = imageURL; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text imageURL:(NSString*)imageURL defaultImage:(UIImage*)defaultImage - URL:(NSString*)URL { - TTTableImageItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.imageURL = imageURL; - item.defaultImage = defaultImage; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text imageURL:(NSString*)imageURL defaultImage:(UIImage*)defaultImage - imageStyle:(TTStyle*)imageStyle URL:(NSString*)URL { - TTTableImageItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.imageURL = imageURL; - item.defaultImage = defaultImage; - item.imageStyle = imageStyle; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.imageURL = [decoder decodeObjectForKey:@"imageURL"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.imageURL) { - [encoder encodeObject:self.imageURL forKey:@"imageURL"]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableImageItemCell.m b/src/Three20UI/Sources/TTTableImageItemCell.m deleted file mode 100644 index 9a05a05ee2..0000000000 --- a/src/Three20UI/Sources/TTTableImageItemCell.m +++ /dev/null @@ -1,247 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableImageItemCell.h" - -// UI -#import "Three20UI/TTImageView.h" -#import "Three20UI/TTTableImageItem.h" -#import "Three20UI/TTTableRightImageItem.h" -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/TTImageStyle.h" - -// Network -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kKeySpacing = 12; -static const CGFloat kDefaultImageSize = 50; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableImageItemCell - -@synthesize imageView2 = _imageView2; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:style reuseIdentifier:identifier]) { - _imageView2 = [[TTImageView alloc] init]; - [self.contentView addSubview:_imageView2]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_imageView2); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private helpers - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (UIFont*)fontForImageItem:(id)imageItem { - if ([imageItem isKindOfClass:[TTTableRightImageItem class]]) { - return TTSTYLEVAR(tableSmallFont); - - } else { - return TTSTYLEVAR(tableFont); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - TTTableImageItem* imageItem = object; - - UIImage* image = imageItem.imageURL - ? [[TTURLCache sharedCache] imageForURL:imageItem.imageURL] : nil; - if (!image) { - image = imageItem.defaultImage; - } - - CGFloat imageHeight, imageWidth; - TTImageStyle* style = [imageItem.imageStyle firstStyleOfClass:[TTImageStyle class]]; - if (style && !CGSizeEqualToSize(style.size, CGSizeZero)) { - imageWidth = style.size.width + kKeySpacing; - imageHeight = style.size.height; - - } else { - imageWidth = image - ? image.size.width + kKeySpacing - : (imageItem.imageURL ? kDefaultImageSize + kKeySpacing : 0); - imageHeight = image - ? image.size.height - : (imageItem.imageURL ? kDefaultImageSize : 0); - } - - CGFloat maxWidth = tableView.width - (imageWidth + kTableCellHPadding*2 + kTableCellMargin*2); - - CGSize textSize = [imageItem.text sizeWithFont:[self fontForImageItem:imageItem] - constrainedToSize:CGSizeMake(maxWidth, CGFLOAT_MAX) - lineBreakMode:UILineBreakModeTailTruncation]; - - CGFloat contentHeight = textSize.height > imageHeight ? textSize.height : imageHeight; - return contentHeight + kTableCellVPadding*2; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - TTTableImageItem* item = self.object; - UIImage* image = item.imageURL ? [[TTURLCache sharedCache] imageForURL:item.imageURL] : nil; - if (!image) { - image = item.defaultImage; - } - - if ([_item isKindOfClass:[TTTableRightImageItem class]]) { - CGFloat imageWidth = image - ? image.size.width - : (item.imageURL ? kDefaultImageSize : 0); - CGFloat imageHeight = image - ? image.size.height - : (item.imageURL ? kDefaultImageSize : 0); - - if (_imageView2.urlPath) { - CGFloat innerWidth = self.contentView.width - (kTableCellHPadding*2 - + imageWidth + kKeySpacing); - CGFloat innerHeight = self.contentView.height - kTableCellVPadding*2; - self.textLabel.frame = CGRectMake(kTableCellHPadding, kTableCellVPadding, - innerWidth, innerHeight); - - _imageView2.frame = CGRectMake(self.textLabel.right + kKeySpacing, - floor(self.height/2 - imageHeight/2), - imageWidth, imageHeight); - - } else { - self.textLabel.frame = CGRectInset(self.contentView.bounds, - kTableCellHPadding, kTableCellVPadding); - _imageView2.frame = CGRectZero; - } - - } else { - if (_imageView2.urlPath) { - CGFloat iconWidth = image - ? image.size.width - : (item.imageURL ? kDefaultImageSize : 0); - CGFloat iconHeight = image - ? image.size.height - : (item.imageURL ? kDefaultImageSize : 0); - - TTImageStyle* style = [item.imageStyle firstStyleOfClass:[TTImageStyle class]]; - if (style) { - _imageView2.contentMode = style.contentMode; - _imageView2.clipsToBounds = YES; - _imageView2.backgroundColor = [UIColor clearColor]; - if (style.size.width) { - iconWidth = style.size.width; - } - if (style.size.height) { - iconHeight = style.size.height; - } - } - - _imageView2.frame = CGRectMake(kTableCellHPadding, floor(self.height/2 - iconHeight/2), - iconWidth, iconHeight); - - CGFloat innerWidth = self.contentView.width - (kTableCellHPadding*2 - + iconWidth + kKeySpacing); - CGFloat innerHeight = self.contentView.height - kTableCellVPadding*2; - self.textLabel.frame = CGRectMake(kTableCellHPadding + iconWidth + kKeySpacing, - kTableCellVPadding, - innerWidth, innerHeight); - - } else { - self.textLabel.frame = CGRectInset(self.contentView.bounds, - kTableCellHPadding, kTableCellVPadding); - _imageView2.frame = CGRectZero; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToSuperview { - [super didMoveToSuperview]; - - if (self.superview) { - _imageView2.backgroundColor = self.backgroundColor; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableImageItem* item = object; - _imageView2.style = item.imageStyle; - _imageView2.defaultImage = item.defaultImage; - _imageView2.urlPath = item.imageURL; - - self.textLabel.font = [[self class] fontForImageItem:item]; - - if ([_item isKindOfClass:[TTTableRightImageItem class]]) { - self.textLabel.textAlignment = UITextAlignmentCenter; - self.accessoryType = UITableViewCellAccessoryNone; - - } else { - self.textLabel.textAlignment = UITextAlignmentLeft; - } - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableItem.m b/src/Three20UI/Sources/TTTableItem.m deleted file mode 100644 index 6d4de51108..0000000000 --- a/src/Three20UI/Sources/TTTableItem.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableItem - -@synthesize userInfo = _userInfo; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_userInfo); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [self init]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { -} - - -@end diff --git a/src/Three20UI/Sources/TTTableLink.m b/src/Three20UI/Sources/TTTableLink.m deleted file mode 100644 index a93919711e..0000000000 --- a/src/Three20UI/Sources/TTTableLink.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableLink.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableLink - -@end - diff --git a/src/Three20UI/Sources/TTTableLinkedItem.m b/src/Three20UI/Sources/TTTableLinkedItem.m deleted file mode 100644 index cd7eeb5cd7..0000000000 --- a/src/Three20UI/Sources/TTTableLinkedItem.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableLinkedItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableLinkedItem - -@synthesize URL = _URL; -@synthesize accessoryURL = _accessoryURL; -@synthesize delegate = _delegate; -@synthesize selector = _selector; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_URL); - TT_RELEASE_SAFELY(_accessoryURL); - _delegate = nil; - _selector = nil; - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.URL = [decoder decodeObjectForKey:@"URL"]; - self.accessoryURL = [decoder decodeObjectForKey:@"accessoryURL"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.URL) { - [encoder encodeObject:self.URL forKey:@"URL"]; - } - if (self.accessoryURL) { - [encoder encodeObject:self.accessoryURL forKey:@"accessoryURL"]; - } -} - - -@end - diff --git a/src/Three20UI/Sources/TTTableLinkedItemCell.m b/src/Three20UI/Sources/TTTableLinkedItemCell.m deleted file mode 100644 index c373e599fc..0000000000 --- a/src/Three20UI/Sources/TTTableLinkedItemCell.m +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableLinkedItemCell.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTTableLinkedItem.h" - -// UINavigator -#import "Three20UINavigator/TTURLMap.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableLinkedItemCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_item); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)object { - return _item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [_item release]; - _item = [object retain]; - - TTTableLinkedItem* item = object; - - if (item.URL) { - TTNavigationMode navigationMode = [[TTNavigator navigator].URLMap - navigationModeForURL:item.URL]; - if (item.accessoryURL) { - self.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; - - } else if (navigationMode == TTNavigationModeCreate || - navigationMode == TTNavigationModeShare) { - self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - - } else { - self.accessoryType = UITableViewCellAccessoryNone; - } - - self.selectionStyle = TTSTYLEVAR(tableSelectionStyle); - - } else if (nil != item.delegate && nil != item.selector) { - self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; - self.selectionStyle = TTSTYLEVAR(tableSelectionStyle); - - } else { - self.accessoryType = UITableViewCellAccessoryNone; - self.selectionStyle = UITableViewCellSelectionStyleNone; - } - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableLongTextItem.m b/src/Three20UI/Sources/TTTableLongTextItem.m deleted file mode 100644 index 228349c77b..0000000000 --- a/src/Three20UI/Sources/TTTableLongTextItem.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableLongTextItem.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableLongTextItem - -@end - diff --git a/src/Three20UI/Sources/TTTableMessageItem.m b/src/Three20UI/Sources/TTTableMessageItem.m deleted file mode 100644 index 0849ebff27..0000000000 --- a/src/Three20UI/Sources/TTTableMessageItem.m +++ /dev/null @@ -1,114 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableMessageItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableMessageItem - -@synthesize title = _title; -@synthesize caption = _caption; -@synthesize timestamp = _timestamp; -@synthesize imageURL = _imageURL; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_title); - TT_RELEASE_SAFELY(_caption); - TT_RELEASE_SAFELY(_timestamp); - TT_RELEASE_SAFELY(_imageURL); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithTitle:(NSString*)title caption:(NSString*)caption text:(NSString*)text - timestamp:(NSDate*)timestamp URL:(NSString*)URL { - TTTableMessageItem* item = [[[self alloc] init] autorelease]; - item.title = title; - item.caption = caption; - item.text = text; - item.timestamp = timestamp; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithTitle:(NSString*)title caption:(NSString*)caption text:(NSString*)text - timestamp:(NSDate*)timestamp imageURL:(NSString*)imageURL URL:(NSString*)URL { - TTTableMessageItem* item = [[[self alloc] init] autorelease]; - item.title = title; - item.caption = caption; - item.text = text; - item.timestamp = timestamp; - item.imageURL = imageURL; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.title = [decoder decodeObjectForKey:@"title"]; - self.caption = [decoder decodeObjectForKey:@"caption"]; - self.timestamp = [decoder decodeObjectForKey:@"timestamp"]; - self.imageURL = [decoder decodeObjectForKey:@"imageURL"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.title) { - [encoder encodeObject:self.title forKey:@"title"]; - } - if (self.caption) { - [encoder encodeObject:self.caption forKey:@"caption"]; - } - if (self.timestamp) { - [encoder encodeObject:self.timestamp forKey:@"timestamp"]; - } - if (self.imageURL) { - [encoder encodeObject:self.imageURL forKey:@"imageURL"]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableMessageItemCell.m b/src/Three20UI/Sources/TTTableMessageItemCell.m deleted file mode 100644 index 645eddc4f5..0000000000 --- a/src/Three20UI/Sources/TTTableMessageItemCell.m +++ /dev/null @@ -1,256 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableMessageItemCell.h" - -// UI -#import "Three20UI/TTImageView.h" -#import "Three20UI/TTTableMessageItem.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20Style/UIFontAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/NSDateAdditions.h" - -static const NSInteger kMessageTextLineCount = 2; -static const CGFloat kDefaultMessageImageWidth = 34; -static const CGFloat kDefaultMessageImageHeight = 34; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableMessageItemCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:identifier]) { - self.textLabel.font = TTSTYLEVAR(font); - self.textLabel.textColor = TTSTYLEVAR(textColor); - self.textLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.textLabel.textAlignment = UITextAlignmentLeft; - self.textLabel.lineBreakMode = UILineBreakModeTailTruncation; - self.textLabel.adjustsFontSizeToFitWidth = YES; - self.textLabel.contentMode = UIViewContentModeLeft; - - self.detailTextLabel.font = TTSTYLEVAR(font); - self.detailTextLabel.textColor = TTSTYLEVAR(tableSubTextColor); - self.detailTextLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.detailTextLabel.textAlignment = UITextAlignmentLeft; - self.detailTextLabel.contentMode = UIViewContentModeTop; - self.detailTextLabel.lineBreakMode = UILineBreakModeTailTruncation; - self.detailTextLabel.numberOfLines = kMessageTextLineCount; - self.detailTextLabel.contentMode = UIViewContentModeLeft; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_titleLabel); - TT_RELEASE_SAFELY(_timestampLabel); - TT_RELEASE_SAFELY(_imageView2); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - // XXXjoe Compute height based on font sizes - return 90; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)prepareForReuse { - [super prepareForReuse]; - [_imageView2 unsetImage]; - _titleLabel.text = nil; - _timestampLabel.text = nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - CGFloat left = 0; - if (_imageView2) { - _imageView2.frame = CGRectMake(kTableCellSmallMargin, kTableCellSmallMargin, - kDefaultMessageImageWidth, kDefaultMessageImageHeight); - left += kTableCellSmallMargin + kDefaultMessageImageHeight + kTableCellSmallMargin; - - } else { - left = kTableCellMargin; - } - - CGFloat width = self.contentView.width - left; - CGFloat top = kTableCellSmallMargin; - - if (_titleLabel.text.length) { - _titleLabel.frame = CGRectMake(left, top, width, _titleLabel.font.ttLineHeight); - top += _titleLabel.height; - - } else { - _titleLabel.frame = CGRectZero; - } - - if (self.captionLabel.text.length) { - self.captionLabel.frame = CGRectMake(left, top, width, self.captionLabel.font.ttLineHeight); - top += self.captionLabel.height; - - } else { - self.captionLabel.frame = CGRectZero; - } - - if (self.detailTextLabel.text.length) { - CGFloat textHeight = self.detailTextLabel.font.ttLineHeight * kMessageTextLineCount; - self.detailTextLabel.frame = CGRectMake(left, top, width, textHeight); - - } else { - self.detailTextLabel.frame = CGRectZero; - } - - if (_timestampLabel.text.length) { - _timestampLabel.alpha = !self.showingDeleteConfirmation; - [_timestampLabel sizeToFit]; - _timestampLabel.left = self.contentView.width - (_timestampLabel.width + kTableCellSmallMargin); - _timestampLabel.top = _titleLabel.top; - _titleLabel.width -= _timestampLabel.width + kTableCellSmallMargin*2; - - } else { - _timestampLabel.frame = CGRectZero; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToSuperview { - [super didMoveToSuperview]; - - if (self.superview) { - _imageView2.backgroundColor = self.backgroundColor; - _titleLabel.backgroundColor = self.backgroundColor; - _timestampLabel.backgroundColor = self.backgroundColor; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableMessageItem* item = object; - if (item.title.length) { - self.titleLabel.text = item.title; - } - if (item.caption.length) { - self.captionLabel.text = item.caption; - } - if (item.text.length) { - self.detailTextLabel.text = item.text; - } - if (item.timestamp) { - self.timestampLabel.text = [item.timestamp formatShortTime]; - } - if (item.imageURL) { - self.imageView2.urlPath = item.imageURL; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UILabel*)titleLabel { - if (!_titleLabel) { - _titleLabel = [[UILabel alloc] init]; - _titleLabel.textColor = [UIColor blackColor]; - _titleLabel.highlightedTextColor = [UIColor whiteColor]; - _titleLabel.font = TTSTYLEVAR(tableFont); - _titleLabel.contentMode = UIViewContentModeLeft; - [self.contentView addSubview:_titleLabel]; - } - return _titleLabel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UILabel*)captionLabel { - return self.textLabel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UILabel*)timestampLabel { - if (!_timestampLabel) { - _timestampLabel = [[UILabel alloc] init]; - _timestampLabel.font = TTSTYLEVAR(tableTimestampFont); - _timestampLabel.textColor = TTSTYLEVAR(timestampTextColor); - _timestampLabel.highlightedTextColor = [UIColor whiteColor]; - _timestampLabel.contentMode = UIViewContentModeLeft; - [self.contentView addSubview:_timestampLabel]; - } - return _timestampLabel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTImageView*)imageView2 { - if (!_imageView2) { - _imageView2 = [[TTImageView alloc] init]; - // _imageView2.defaultImage = TTSTYLEVAR(personImageSmall); - // _imageView2.style = TTSTYLE(threadActorIcon); - [self.contentView addSubview:_imageView2]; - } - return _imageView2; -} - - -@end diff --git a/src/Three20UI/Sources/TTTableMoreButton.m b/src/Three20UI/Sources/TTTableMoreButton.m deleted file mode 100644 index f0dddb5d39..0000000000 --- a/src/Three20UI/Sources/TTTableMoreButton.m +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableMoreButton.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableMoreButton - -@synthesize isLoading = _isLoading; -@synthesize model = _model; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - self.model = nil; - - [super dealloc]; -} - - -@end diff --git a/src/Three20UI/Sources/TTTableMoreButtonCell.m b/src/Three20UI/Sources/TTTableMoreButtonCell.m deleted file mode 100644 index 8912b8894f..0000000000 --- a/src/Three20UI/Sources/TTTableMoreButtonCell.m +++ /dev/null @@ -1,164 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableMoreButtonCell.h" - -// UI -#import "Three20UI/TTTableMoreButton.h" -#import "Three20UI/UIViewAdditions.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kMoreButtonMargin = 40; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableMoreButtonCell - -@synthesize animating = _animating; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier]) { - self.textLabel.font = TTSTYLEVAR(tableSmallFont); - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_activityIndicatorView); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - CGFloat height = [super tableView:tableView rowHeightForObject:object]; - CGFloat minHeight = TT_ROW_HEIGHT * 1.5; - - if (height < minHeight) { - return minHeight; - - } else { - return height; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - _activityIndicatorView.left = kMoreButtonMargin - (_activityIndicatorView.width - + kTableCellSmallMargin); - _activityIndicatorView.top = floor(self.contentView.height/2 - _activityIndicatorView.height/2); - - self.textLabel.frame = CGRectMake(kMoreButtonMargin, self.textLabel.top, - self.contentView.width - (kMoreButtonMargin - + kTableCellSmallMargin), - self.textLabel.height); - self.detailTextLabel.frame = CGRectMake(kMoreButtonMargin, self.detailTextLabel.top, - self.contentView.width - (kMoreButtonMargin - + kTableCellSmallMargin), - self.detailTextLabel.height); - -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableMoreButton* item = object; - self.animating = item.isLoading; - - self.textLabel.textColor = TTSTYLEVAR(moreLinkTextColor); - self.selectionStyle = TTSTYLEVAR(tableSelectionStyle); - self.accessoryType = UITableViewCellAccessoryNone; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIActivityIndicatorView*)activityIndicatorView { - if (!_activityIndicatorView) { - _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: - UIActivityIndicatorViewStyleGray]; - [self.contentView addSubview:_activityIndicatorView]; - } - - return _activityIndicatorView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setAnimating:(BOOL)animating { - if (_animating != animating) { - _animating = animating; - - if (_animating) { - [self.activityIndicatorView startAnimating]; - - } else { - [_activityIndicatorView stopAnimating]; - } - - [self setNeedsLayout]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableRightCaptionItem.m b/src/Three20UI/Sources/TTTableRightCaptionItem.m deleted file mode 100644 index a13b270865..0000000000 --- a/src/Three20UI/Sources/TTTableRightCaptionItem.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableRightCaptionItem.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableRightCaptionItem - -@end - diff --git a/src/Three20UI/Sources/TTTableRightCaptionItemCell.m b/src/Three20UI/Sources/TTTableRightCaptionItemCell.m deleted file mode 100644 index d0dcfe237e..0000000000 --- a/src/Three20UI/Sources/TTTableRightCaptionItemCell.m +++ /dev/null @@ -1,110 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableRightCaptionItemCell.h" - -// UI -#import "Three20UI/TTTableCaptionItem.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableRightCaptionItemCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:identifier]) { - self.textLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.textLabel.lineBreakMode = UILineBreakModeWordWrap; - self.textLabel.numberOfLines = 0; - - self.detailTextLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - - // XXXjoe TODO - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - // XXXjoe TODO - return TT_ROW_HEIGHT; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - // XXXjoe TODO -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableCaptionItem* item = object; - self.textLabel.text = item.caption; - self.detailTextLabel.text = item.text; - // XXXjoe TODO - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UILabel*)captionLabel { - return self.textLabel; -} - - -@end diff --git a/src/Three20UI/Sources/TTTableRightImageItem.m b/src/Three20UI/Sources/TTTableRightImageItem.m deleted file mode 100644 index d74d13b2e5..0000000000 --- a/src/Three20UI/Sources/TTTableRightImageItem.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableRightImageItem.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableRightImageItem - -@end - diff --git a/src/Three20UI/Sources/TTTableStyledTextItem.m b/src/Three20UI/Sources/TTTableStyledTextItem.m deleted file mode 100644 index c06ee7a497..0000000000 --- a/src/Three20UI/Sources/TTTableStyledTextItem.m +++ /dev/null @@ -1,109 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableStyledTextItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableStyledTextItem - -@synthesize text = _text; -@synthesize margin = _margin; -@synthesize padding = _padding; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - _margin = UIEdgeInsetsZero; - _padding = UIEdgeInsetsMake(6, 6, 6, 6); - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_text); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(TTStyledText*)text { - TTTableStyledTextItem* item = [[[self alloc] init] autorelease]; - item.text = text; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(TTStyledText*)text URL:(NSString*)URL { - TTTableStyledTextItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(TTStyledText*)text URL:(NSString*)URL accessoryURL:(NSString*)accessoryURL { - TTTableStyledTextItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.URL = URL; - item.accessoryURL = accessoryURL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.text = [decoder decodeObjectForKey:@"text"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.text) { - [encoder encodeObject:self.text forKey:@"text"]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableSubtextItem.m b/src/Three20UI/Sources/TTTableSubtextItem.m deleted file mode 100644 index 6f560b8f2b..0000000000 --- a/src/Three20UI/Sources/TTTableSubtextItem.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableSubtextItem.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableSubtextItem - -@end - diff --git a/src/Three20UI/Sources/TTTableSubtextItemCell.m b/src/Three20UI/Sources/TTTableSubtextItemCell.m deleted file mode 100644 index 35d38a5b5d..0000000000 --- a/src/Three20UI/Sources/TTTableSubtextItemCell.m +++ /dev/null @@ -1,143 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableSubtextItemCell.h" - -// UI -#import "Three20UI/TTTableSubtextItem.h" -#import "Three20UI/UITableViewAdditions.h" -#import "Three20UI/UIViewAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableSubtextItemCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:identifier]) { - self.detailTextLabel.font = TTSTYLEVAR(tableFont); - self.detailTextLabel.textColor = TTSTYLEVAR(textColor); - self.detailTextLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.detailTextLabel.adjustsFontSizeToFitWidth = YES; - - self.textLabel.font = TTSTYLEVAR(font); - self.textLabel.textColor = TTSTYLEVAR(tableSubTextColor); - self.textLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.textLabel.textAlignment = UITextAlignmentLeft; - self.textLabel.contentMode = UIViewContentModeTop; - self.textLabel.lineBreakMode = UILineBreakModeWordWrap; - self.textLabel.numberOfLines = 0; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - TTTableSubtextItem* item = object; - - CGFloat width = tableView.width - [tableView tableCellMargin]*2 - kTableCellHPadding*2; - - CGSize detailTextSize = [item.text sizeWithFont:TTSTYLEVAR(tableFont) - constrainedToSize:CGSizeMake(width, CGFLOAT_MAX) - lineBreakMode:UILineBreakModeTailTruncation]; - - CGSize textSize = [item.caption sizeWithFont:TTSTYLEVAR(font) - constrainedToSize:CGSizeMake(width, CGFLOAT_MAX) - lineBreakMode:UILineBreakModeWordWrap]; - - return kTableCellVPadding*2 + detailTextSize.height + textSize.height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - if (!self.textLabel.text.length) { - CGFloat titleHeight = self.textLabel.height + self.detailTextLabel.height; - - [self.detailTextLabel sizeToFit]; - self.detailTextLabel.top = floor(self.contentView.height/2 - titleHeight/2); - self.detailTextLabel.left = self.detailTextLabel.top*2; - - } else { - [self.detailTextLabel sizeToFit]; - self.detailTextLabel.left = kTableCellHPadding; - self.detailTextLabel.top = kTableCellVPadding; - - CGFloat maxWidth = self.contentView.width - kTableCellHPadding*2; - CGSize captionSize = - [self.textLabel.text sizeWithFont:self.textLabel.font - constrainedToSize:CGSizeMake(maxWidth, CGFLOAT_MAX) - lineBreakMode:self.textLabel.lineBreakMode]; - self.textLabel.frame = CGRectMake(kTableCellHPadding, self.detailTextLabel.bottom, - captionSize.width, captionSize.height); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableSubtextItem* item = object; - self.textLabel.text = item.caption; - self.detailTextLabel.text = item.text; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UILabel*)captionLabel { - return self.textLabel; -} - - -@end diff --git a/src/Three20UI/Sources/TTTableSubtitleItem.m b/src/Three20UI/Sources/TTTableSubtitleItem.m deleted file mode 100644 index 64969305c4..0000000000 --- a/src/Three20UI/Sources/TTTableSubtitleItem.m +++ /dev/null @@ -1,134 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableSubtitleItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableSubtitleItem - -@synthesize subtitle = _subtitle; -@synthesize imageURL = _imageURL; -@synthesize defaultImage = _defaultImage; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_subtitle); - TT_RELEASE_SAFELY(_imageURL); - TT_RELEASE_SAFELY(_defaultImage); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle { - TTTableSubtitleItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.subtitle = subtitle; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle URL:(NSString*)URL { - TTTableSubtitleItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.subtitle = subtitle; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle - URL:(NSString*)URL accessoryURL:(NSString*)accessoryURL { - TTTableSubtitleItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.subtitle = subtitle; - item.URL = URL; - item.accessoryURL = accessoryURL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle imageURL:(NSString*)imageURL - URL:(NSString*)URL { - TTTableSubtitleItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.subtitle = subtitle; - item.imageURL = imageURL; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text subtitle:(NSString*)subtitle imageURL:(NSString*)imageURL - defaultImage:(UIImage*)defaultImage URL:(NSString*)URL accessoryURL:(NSString*)accessoryURL { - TTTableSubtitleItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.subtitle = subtitle; - item.imageURL = imageURL; - item.defaultImage = defaultImage; - item.URL = URL; - item.accessoryURL = accessoryURL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.subtitle = [decoder decodeObjectForKey:@"subtitle"]; - self.imageURL = [decoder decodeObjectForKey:@"imageURL"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.subtitle) { - [encoder encodeObject:self.subtitle forKey:@"subtitle"]; - } - if (self.imageURL) { - [encoder encodeObject:self.imageURL forKey:@"imageURL"]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableSubtitleItemCell.m b/src/Three20UI/Sources/TTTableSubtitleItemCell.m deleted file mode 100644 index dbd4a1f05b..0000000000 --- a/src/Three20UI/Sources/TTTableSubtitleItemCell.m +++ /dev/null @@ -1,178 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableSubtitleItemCell.h" - -// UI -#import "Three20UI/TTImageView.h" -#import "Three20UI/TTTableSubtitleItem.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20Style/UIFontAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableSubtitleItemCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:identifier]) { - self.textLabel.font = TTSTYLEVAR(tableFont); - self.textLabel.textColor = TTSTYLEVAR(textColor); - self.textLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.textLabel.textAlignment = UITextAlignmentLeft; - self.textLabel.lineBreakMode = UILineBreakModeTailTruncation; - self.textLabel.adjustsFontSizeToFitWidth = YES; - - self.detailTextLabel.font = TTSTYLEVAR(font); - self.detailTextLabel.textColor = TTSTYLEVAR(tableSubTextColor); - self.detailTextLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.detailTextLabel.textAlignment = UITextAlignmentLeft; - self.detailTextLabel.contentMode = UIViewContentModeTop; - self.detailTextLabel.lineBreakMode = UILineBreakModeTailTruncation; - self.detailTextLabel.numberOfLines = kTableMessageTextLineCount; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_imageView2); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - TTTableSubtitleItem* item = object; - - CGFloat height = TTSTYLEVAR(tableFont).ttLineHeight + kTableCellVPadding*2; - if (item.subtitle) { - height += TTSTYLEVAR(font).ttLineHeight; - } - - return height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - CGFloat height = self.contentView.height; - CGFloat width = self.contentView.width - (height + kTableCellSmallMargin); - CGFloat left = 0; - - if (_imageView2) { - _imageView2.frame = CGRectMake(0, 0, height, height); - left = _imageView2.right + kTableCellSmallMargin; - - } else { - left = kTableCellHPadding; - } - - if (self.detailTextLabel.text.length) { - CGFloat textHeight = self.textLabel.font.ttLineHeight; - CGFloat subtitleHeight = self.detailTextLabel.font.ttLineHeight; - CGFloat paddingY = floor((height - (textHeight + subtitleHeight))/2); - - self.textLabel.frame = CGRectMake(left, paddingY, width, textHeight); - self.detailTextLabel.frame = CGRectMake(left, self.textLabel.bottom, width, subtitleHeight); - - } else { - self.textLabel.frame = CGRectMake(_imageView2.right + kTableCellSmallMargin, 0, width, height); - self.detailTextLabel.frame = CGRectZero; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableSubtitleItem* item = object; - if (item.text.length) { - self.textLabel.text = item.text; - } - if (item.subtitle.length) { - self.detailTextLabel.text = item.subtitle; - } - if (item.defaultImage) { - self.imageView2.defaultImage = item.defaultImage; - } - if (item.imageURL) { - self.imageView2.urlPath = item.imageURL; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UILabel*)subtitleLabel { - return self.detailTextLabel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTImageView*)imageView2 { - if (!_imageView2) { - _imageView2 = [[TTImageView alloc] init]; - // _imageView2.defaultImage = TTSTYLEVAR(personImageSmall); - // _imageView2.style = TTSTYLE(threadActorIcon); - [self.contentView addSubview:_imageView2]; - } - return _imageView2; -} - - -@end diff --git a/src/Three20UI/Sources/TTTableSummaryItem.m b/src/Three20UI/Sources/TTTableSummaryItem.m deleted file mode 100644 index 91a1d15680..0000000000 --- a/src/Three20UI/Sources/TTTableSummaryItem.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableSummaryItem.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableSummaryItem - -@end - diff --git a/src/Three20UI/Sources/TTTableTextItem.m b/src/Three20UI/Sources/TTTableTextItem.m deleted file mode 100644 index 5dcf2cff5c..0000000000 --- a/src/Three20UI/Sources/TTTableTextItem.m +++ /dev/null @@ -1,107 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableTextItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableTextItem - -@synthesize text = _text; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_text); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text { - TTTableTextItem* item = [[[self alloc] init] autorelease]; - item.text = text; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text URL:(NSString*)URL { - TTTableTextItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.URL = URL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text URL:(NSString*)URL accessoryURL:(NSString*)accessoryURL { - TTTableTextItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.URL = URL; - item.accessoryURL = accessoryURL; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithText:(NSString*)text delegate:(id)delegate selector:(SEL)selector { - TTTableTextItem* item = [[[self alloc] init] autorelease]; - item.text = text; - item.delegate = delegate; - item.selector = selector; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.text = [decoder decodeObjectForKey:@"text"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.text) { - [encoder encodeObject:self.text forKey:@"text"]; - } -} - - -@end - diff --git a/src/Three20UI/Sources/TTTableTextItemCell.m b/src/Three20UI/Sources/TTTableTextItemCell.m deleted file mode 100644 index 6581946932..0000000000 --- a/src/Three20UI/Sources/TTTableTextItemCell.m +++ /dev/null @@ -1,164 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableTextItemCell.h" - -// UI -#import "Three20UI/UIViewAdditions.h" -#import "Three20UI/UITableViewAdditions.h" - -// - Table items -#import "Three20UI/TTTableTextItem.h" -#import "Three20UI/TTTableLongTextItem.h" -#import "Three20UI/TTTableGrayTextItem.h" -#import "Three20UI/TTTableButton.h" -#import "Three20UI/TTTableLink.h" -#import "Three20UI/TTTableSummaryItem.h" - -// Style -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/TTGlobalStyle.h" - -static const CGFloat kMaxLabelHeight = 2000; -static const UILineBreakMode kLineBreakMode = UILineBreakModeWordWrap; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableTextItemCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:style reuseIdentifier:identifier]) { - self.textLabel.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); - self.textLabel.lineBreakMode = kLineBreakMode; - self.textLabel.numberOfLines = 0; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (UIFont*)textFontForItem:(TTTableTextItem*)item { - if ([item isKindOfClass:[TTTableLongTextItem class]]) { - return TTSTYLEVAR(font); - - } else if ([item isKindOfClass:[TTTableGrayTextItem class]]) { - return TTSTYLEVAR(font); - - } else { - return TTSTYLEVAR(tableFont); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - TTTableTextItem* item = object; - - CGFloat width = tableView.width - (kTableCellHPadding*2 + [tableView tableCellMargin]*2); - UIFont* font = [self textFontForItem:item]; - CGSize size = [item.text sizeWithFont:font - constrainedToSize:CGSizeMake(width, CGFLOAT_MAX) - lineBreakMode:kLineBreakMode]; - if (size.height > kMaxLabelHeight) { - size.height = kMaxLabelHeight; - } - - return size.height + kTableCellVPadding*2; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - self.textLabel.frame = CGRectInset(self.contentView.bounds, - kTableCellHPadding, kTableCellVPadding); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - if (_item != object) { - [super setObject:object]; - - TTTableTextItem* item = object; - self.textLabel.text = item.text; - - if ([object isKindOfClass:[TTTableButton class]]) { - self.textLabel.font = TTSTYLEVAR(tableButtonFont); - self.textLabel.textColor = TTSTYLEVAR(linkTextColor); - self.textLabel.textAlignment = UITextAlignmentCenter; - self.accessoryType = UITableViewCellAccessoryNone; - self.selectionStyle = TTSTYLEVAR(tableSelectionStyle); - - } else if ([object isKindOfClass:[TTTableLink class]]) { - self.textLabel.font = TTSTYLEVAR(tableFont); - self.textLabel.textColor = TTSTYLEVAR(linkTextColor); - self.textLabel.textAlignment = UITextAlignmentLeft; - - } else if ([object isKindOfClass:[TTTableSummaryItem class]]) { - self.textLabel.font = TTSTYLEVAR(tableSummaryFont); - self.textLabel.textColor = TTSTYLEVAR(tableSubTextColor); - self.textLabel.textAlignment = UITextAlignmentCenter; - - } else if ([object isKindOfClass:[TTTableLongTextItem class]]) { - self.textLabel.font = TTSTYLEVAR(font); - self.textLabel.textColor = TTSTYLEVAR(textColor); - self.textLabel.textAlignment = UITextAlignmentLeft; - - } else if ([object isKindOfClass:[TTTableGrayTextItem class]]) { - self.textLabel.font = TTSTYLEVAR(font); - self.textLabel.textColor = TTSTYLEVAR(tableSubTextColor); - self.textLabel.textAlignment = UITextAlignmentLeft; - - } else { - self.textLabel.font = TTSTYLEVAR(tableFont); - self.textLabel.textColor = TTSTYLEVAR(textColor); - self.textLabel.textAlignment = UITextAlignmentLeft; - } - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableView.m b/src/Three20UI/Sources/TTTableView.m deleted file mode 100644 index e2cd5de2eb..0000000000 --- a/src/Three20UI/Sources/TTTableView.m +++ /dev/null @@ -1,348 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableView.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTStyledTextLabel.h" -#import "Three20UI/UIViewAdditions.h" - -// UICommon -#import "Three20UICommon/UIWindowAdditions.h" - -// Style -#import "Three20Style/TTStyledNode.h" -#import "Three20Style/TTStyledButtonNode.h" -#import "Three20Style/TTStyledLinkNode.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kShadowHeight = 20.0; -static const CGFloat kShadowInverseHeight = 10.0; - -static const CGFloat kCancelHighlightThreshold = 4; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableView - -@synthesize highlightedLabel = _highlightedLabel; -@synthesize contentOrigin = _contentOrigin; -@synthesize showShadows = _showShadows; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { - if (self = [super initWithFrame:frame style:style]) { - _highlightStartPoint = CGPointZero; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_highlightedLabel); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { - [super touchesBegan:touches withEvent:event]; - - if ([self.delegate respondsToSelector:@selector(tableView:touchesBegan:withEvent:)]) { - id delegate = (id)self.delegate; - [delegate tableView:self touchesBegan:touches withEvent:event]; - } - - if (_highlightedLabel) { - UITouch* touch = [touches anyObject]; - _highlightStartPoint = [touch locationInView:self]; - } - -// if (_menuView) { -// UITouch* touch = [touches anyObject]; -// CGPoint point = [touch locationInView:_menuView]; -// if (point.y < 0 || point.y > _menuView.height) { -// [self hideMenu:YES]; - -// } else { -// UIView* hit = [_menuView hitTest:point withEvent:event]; -// if (![hit isKindOfClass:[UIControl class]]) { -// [self hideMenu:YES]; -// } -// } -// } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { - [super touchesEnded:touches withEvent:event]; - - if ([self.delegate respondsToSelector:@selector(tableView:touchesEnded:withEvent:)]) { - id delegate = (id)self.delegate; - [delegate tableView:self touchesEnded:touches withEvent:event]; - } - - if (_highlightedLabel) { - TTStyledElement* element = _highlightedLabel.highlightedNode; - // This is a dirty hack to decouple the UI from Style. TTOpenURL was originally within - // the node implementation. One potential fix would be to provide some protocol for these - // nodes to converse with. - if ([element isKindOfClass:[TTStyledLinkNode class]]) { - TTOpenURLFromView([(TTStyledLinkNode*)element URL], self); - - } else if ([element isKindOfClass:[TTStyledButtonNode class]]) { - TTOpenURLFromView([(TTStyledButtonNode*)element URL], self); - - - } else { - [element performDefaultAction]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIScrollView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setContentSize:(CGSize)size { - if (_contentOrigin) { - CGFloat minHeight = self.height + _contentOrigin; - if (size.height < minHeight) { - size.height = self.height + _contentOrigin; - } - } - - CGFloat y = self.contentOffset.y; - [super setContentSize:size]; - - if (_contentOrigin) { - // As described below in setContentOffset, UITableView insists on messing with the - // content offset sometimes when you change the content size or the height of the table - self.contentOffset = CGPointMake(0, y); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setContentOffset:(CGPoint)point { - // UITableView (and UIScrollView) are really stupid about resetting the content offset - // when the table view itself is resized. There are times when I scroll to a point and then - // disable scrolling, and I don't want the table view scrolling somewhere else just because - // it was resized. - if (self.scrollEnabled) { - if (!(_contentOrigin && self.contentOffset.y == _contentOrigin && point.y == 0)) { - [super setContentOffset:point]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)reloadData { - // -[UITableView reloadData] takes away first responder status if the first responder is a - // subview, so remember it and then restore it afterward to avoid awkward keyboard disappearance - UIResponder* firstResponder = [self.window findFirstResponderInView:self]; - - CGFloat y = self.contentOffset.y; - [super reloadData]; - - if (nil != firstResponder) { - [firstResponder becomeFirstResponder]; - } - - if (_highlightedLabel) { - self.highlightedLabel = nil; - } - - if (_contentOrigin) { - self.contentOffset = CGPointMake(0, y); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated - scrollPosition:(UITableViewScrollPosition)scrollPosition { - if (!_highlightedLabel) { - [super selectRowAtIndexPath:indexPath animated:animated scrollPosition:scrollPosition]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CAGradientLayer*)shadowAsInverse:(BOOL)inverse { - CAGradientLayer* newShadow = [[[CAGradientLayer alloc] init] autorelease]; - CGRect newShadowFrame = CGRectMake(0.0, 0.0, - self.frame.size.width, - inverse ? kShadowInverseHeight : kShadowHeight); - newShadow.frame = newShadowFrame; - - CGColorRef darkColor = [UIColor colorWithRed:0.0 - green:0.0 - blue:0.0 - alpha:inverse ? - (kShadowInverseHeight / kShadowHeight) * 0.5 - : 0.5].CGColor; - CGColorRef lightColor = [self.backgroundColor - colorWithAlphaComponent:0.0].CGColor; - - newShadow.colors = [NSArray arrayWithObjects: - (id)(inverse ? lightColor : darkColor), - (id)(inverse ? darkColor : lightColor), - nil]; - return newShadow; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - - if (!_showShadows || UITableViewStylePlain != self.style) { - return; - } - - // Initialize the shadow layers. - if (nil == _originShadow) { - _originShadow = [self shadowAsInverse:NO]; - [self.layer insertSublayer:_originShadow atIndex:0]; - - } else if (![[self.layer.sublayers objectAtIndex:0] isEqual:_originShadow]) { - [_originShadow removeFromSuperlayer]; - [self.layer insertSublayer:_originShadow atIndex:0]; - } - - [CATransaction begin]; - [CATransaction setValue: (id)kCFBooleanTrue - forKey: kCATransactionDisableActions]; - - CGRect originShadowFrame = _originShadow.frame; - originShadowFrame.size.width = self.frame.size.width; - originShadowFrame.origin.y = self.contentOffset.y; - _originShadow.frame = originShadowFrame; - - [CATransaction commit]; - - // Remove the table cell shadows if there aren't any cells. - NSArray* indexPathsForVisibleRows = [self indexPathsForVisibleRows]; - if (0 == [indexPathsForVisibleRows count]) { - [_topShadow removeFromSuperlayer]; - TT_RELEASE_SAFELY(_topShadow); - - [_bottomShadow removeFromSuperlayer]; - TT_RELEASE_SAFELY(_bottomShadow); - return; - } - - // Assumptions at this point: There are cells. - NSIndexPath* firstRow = [indexPathsForVisibleRows objectAtIndex:0]; - - // Check whether or not the very first row is visible. - if (0 == [firstRow section] - && 0 == [firstRow row]) { - UIView* cell = [self cellForRowAtIndexPath:firstRow]; - - // Create the top shadow if necessary. - if (nil == _topShadow) { - _topShadow = [[self shadowAsInverse:YES] retain]; - [cell.layer insertSublayer:_topShadow atIndex:0]; - - } else if ([cell.layer.sublayers indexOfObjectIdenticalTo:_topShadow] != 0) { - [_topShadow removeFromSuperlayer]; - [cell.layer insertSublayer:_topShadow atIndex:0]; - } - - CGRect shadowFrame = _topShadow.frame; - shadowFrame.size.width = cell.frame.size.width; - shadowFrame.origin.y = -kShadowInverseHeight; - _topShadow.frame = shadowFrame; - - } else { - [_topShadow removeFromSuperlayer]; - TT_RELEASE_SAFELY(_topShadow); - } - - NSIndexPath* lastRow = [indexPathsForVisibleRows lastObject]; - - // Check whether or not the very last row is visible. - if ([lastRow section] == [self numberOfSections] - 1 - && [lastRow row] == [self numberOfRowsInSection:[lastRow section]] - 1) { - UIView* cell = [self cellForRowAtIndexPath:lastRow]; - - if (nil == _bottomShadow) { - _bottomShadow = [[self shadowAsInverse:NO] retain]; - [cell.layer insertSublayer:_bottomShadow atIndex:0]; - - } else if ([cell.layer.sublayers indexOfObjectIdenticalTo:_bottomShadow] != 0) { - [_bottomShadow removeFromSuperlayer]; - [cell.layer insertSublayer:_bottomShadow atIndex:0]; - } - - CGRect shadowFrame = _bottomShadow.frame; - shadowFrame.size.width = cell.frame.size.width; - shadowFrame.origin.y = cell.frame.size.height; - _bottomShadow.frame = shadowFrame; - - } else { - [_bottomShadow removeFromSuperlayer]; - TT_RELEASE_SAFELY(_bottomShadow); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHighlightedLabel:(TTStyledTextLabel*)label { - if (label != _highlightedLabel) { - _highlightedLabel.highlightedNode = nil; - [_highlightedLabel release]; - _highlightedLabel = [label retain]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewCell.m b/src/Three20UI/Sources/TTTableViewCell.m deleted file mode 100644 index 6c2478fc4f..0000000000 --- a/src/Three20UI/Sources/TTTableViewCell.m +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewCell.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -const CGFloat kTableCellSmallMargin = 6; -const CGFloat kTableCellSpacing = 8; -const CGFloat kTableCellMargin = 10; -const CGFloat kTableCellHPadding = 10; -const CGFloat kTableCellVPadding = 10; - -const NSInteger kTableMessageTextLineCount = 2; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(id)object { - return TT_ROW_HEIGHT; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)prepareForReuse { - self.object = nil; - [super prepareForReuse]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)object { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewController.m b/src/Three20UI/Sources/TTTableViewController.m deleted file mode 100644 index 69295e3f91..0000000000 --- a/src/Three20UI/Sources/TTTableViewController.m +++ /dev/null @@ -1,934 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTActivityLabel.h" -#import "Three20UI/TTErrorView.h" -#import "Three20UI/TTListDataSource.h" -#import "Three20UI/TTTableView.h" -#import "Three20UI/TTTableViewDelegate.h" -#import "Three20UI/TTTableViewVarHeightDelegate.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20UI/UITableViewAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTURLObject.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreLocale.h" -#import "Three20Core/TTGlobalCoreRects.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewController - -@synthesize tableView = _tableView; -@synthesize tableBannerView = _tableBannerView; -@synthesize tableOverlayView = _tableOverlayView; -@synthesize loadingView = _loadingView; -@synthesize errorView = _errorView; -@synthesize emptyView = _emptyView; -@synthesize menuView = _menuView; -@synthesize tableViewStyle = _tableViewStyle; -@synthesize variableHeightRows = _variableHeightRows; -@synthesize showTableShadows = _showTableShadows; -@synthesize dataSource = _dataSource; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _lastInterfaceOrientation = self.interfaceOrientation; - _tableViewStyle = UITableViewStylePlain; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewStyle)style { - if (self = [self initWithNibName:nil bundle:nil]) { - _tableViewStyle = style; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - _tableView.delegate = nil; - _tableView.dataSource = nil; - TT_RELEASE_SAFELY(_tableDelegate); - TT_RELEASE_SAFELY(_dataSource); - TT_RELEASE_SAFELY(_tableView); - TT_RELEASE_SAFELY(_loadingView); - TT_RELEASE_SAFELY(_errorView); - TT_RELEASE_SAFELY(_emptyView); - TT_RELEASE_SAFELY(_tableOverlayView); - TT_RELEASE_SAFELY(_tableBannerView); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createInterstitialModel { - self.dataSource = [[[TTTableViewInterstitialDataSource alloc] init] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)defaultTitleForLoading { - return TTLocalizedString(@"Loading...", @""); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateTableDelegate { - if (!_tableView.delegate) { - [_tableDelegate release]; - _tableDelegate = [[self createDelegate] retain]; - - // You need to set it to nil before changing it or it won't have any effect - _tableView.delegate = nil; - _tableView.delegate = _tableDelegate; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addToOverlayView:(UIView*)view { - if (!_tableOverlayView) { - CGRect frame = [self rectForOverlayView]; - _tableOverlayView = [[UIView alloc] initWithFrame:frame]; - _tableOverlayView.autoresizesSubviews = YES; - _tableOverlayView.autoresizingMask = UIViewAutoresizingFlexibleWidth - | UIViewAutoresizingFlexibleBottomMargin; - NSInteger tableIndex = [_tableView.superview.subviews indexOfObject:_tableView]; - if (tableIndex != NSNotFound) { - [_tableView.superview addSubview:_tableOverlayView]; - } - } - - view.frame = _tableOverlayView.bounds; - view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - [_tableOverlayView addSubview:view]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)resetOverlayView { - if (_tableOverlayView && !_tableOverlayView.subviews.count) { - [_tableOverlayView removeFromSuperview]; - TT_RELEASE_SAFELY(_tableOverlayView); - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addSubviewOverTableView:(UIView*)view { - NSInteger tableIndex = [_tableView.superview.subviews - indexOfObject:_tableView]; - if (NSNotFound != tableIndex) { - [_tableView.superview addSubview:view]; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutOverlayView { - if (_tableOverlayView) { - _tableOverlayView.frame = [self rectForOverlayView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutBannerView { - if (_tableBannerView) { - _tableBannerView.frame = [self rectForBannerView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)fadeOutView:(UIView*)view { - [view retain]; - [UIView beginAnimations:nil context:view]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(fadingOutViewDidStop:finished:context:)]; - view.alpha = 0; - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)fadingOutViewDidStop:(NSString*)animationID finished:(NSNumber*)finished - context:(void*)context { - UIView* view = (UIView*)context; - [view removeFromSuperview]; - [view release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)hideMenuAnimationDidStop:(NSString*)animationID finished:(NSNumber*)finished - context:(void*)context { - UIView* menuView = (UIView*)context; - [menuView removeFromSuperview]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - [super loadView]; - self.tableView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidUnload { - [super viewDidUnload]; - _tableView.delegate = nil; - _tableView.dataSource = nil; - TT_RELEASE_SAFELY(_tableDelegate); - TT_RELEASE_SAFELY(_tableView); - [_tableBannerView removeFromSuperview]; - TT_RELEASE_SAFELY(_tableBannerView); - [_tableOverlayView removeFromSuperview]; - TT_RELEASE_SAFELY(_tableOverlayView); - [_loadingView removeFromSuperview]; - TT_RELEASE_SAFELY(_loadingView); - [_errorView removeFromSuperview]; - TT_RELEASE_SAFELY(_errorView); - [_emptyView removeFromSuperview]; - TT_RELEASE_SAFELY(_emptyView); - [_menuView removeFromSuperview]; - TT_RELEASE_SAFELY(_menuView); - [_menuCell removeFromSuperview]; - TT_RELEASE_SAFELY(_menuCell); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - if (_lastInterfaceOrientation != self.interfaceOrientation) { - _lastInterfaceOrientation = self.interfaceOrientation; - [_tableView reloadData]; - - } else if ([_tableView isKindOfClass:[TTTableView class]]) { - TTTableView* tableView = (TTTableView*)_tableView; - tableView.highlightedLabel = nil; - tableView.showShadows = _showTableShadows; - } - - [_tableView deselectRowAtIndexPath:[_tableView indexPathForSelectedRow] animated:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - if (_flags.isShowingModel) { - [_tableView flashScrollIndicators]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - [self hideMenu:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setEditing:(BOOL)editing animated:(BOOL)animated { - [super setEditing:editing animated:animated]; - [self.tableView setEditing:editing animated:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UTViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - CGFloat scrollY = _tableView.contentOffset.y; - [state setObject:[NSNumber numberWithFloat:scrollY] forKey:@"scrollOffsetY"]; - return [super persistView:state]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreView:(NSDictionary*)state { - CGFloat scrollY = [[state objectForKey:@"scrollOffsetY"] floatValue]; - if (scrollY) { - CGFloat maxY = _tableView.contentSize.height - _tableView.height; - if (scrollY <= maxY) { - _tableView.contentOffset = CGPointMake(0, scrollY); - - } else { - _tableView.contentOffset = CGPointMake(0, maxY); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardDidAppear:(BOOL)animated withBounds:(CGRect)bounds { - [super keyboardDidAppear:animated withBounds:bounds]; - self.tableView.frame = TTRectContract(self.tableView.frame, 0, bounds.size.height); - [self.tableView scrollFirstResponderIntoView]; - [self layoutOverlayView]; - [self layoutBannerView]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardWillDisappear:(BOOL)animated withBounds:(CGRect)bounds { - [super keyboardWillDisappear:animated withBounds:bounds]; - - // If we do this when there is currently no table view, we can get into a weird loop where the - // table view gets doubly-initialized. self.tableView will try to initialize it; this will call - // self.view, which will call -loadView, which often calls self.tableView, which initializes it. - if (_tableView) { - CGRect previousFrame = self.tableView.frame; - self.tableView.frame = TTRectContract(self.tableView.frame, 0, -bounds.size.height); - - // There's any number of edge cases wherein a table view controller will get this callback but - // it shouldn't resize itself -- e.g. when a controller has the keyboard up, and then drills - // down into this controller. This is a sanity check to avoid situations where the table - // extends way off the bottom of the screen and becomes unusable. - if (self.tableView.height > self.view.bounds.size.height) { - self.tableView.frame = previousFrame; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardDidDisappear:(BOOL)animated withBounds:(CGRect)bounds { - [super keyboardDidDisappear:animated withBounds:bounds]; - [self layoutOverlayView]; - [self layoutBannerView]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)beginUpdates { - [super beginUpdates]; - [_tableView beginUpdates]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endUpdates { - [super endUpdates]; - [_tableView endUpdates]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canShowModel { - if ([_dataSource respondsToSelector:@selector(numberOfSectionsInTableView:)]) { - NSInteger numberOfSections = [_dataSource numberOfSectionsInTableView:_tableView]; - if (!numberOfSections) { - return NO; - - } else if (numberOfSections == 1) { - NSInteger numberOfRows = [_dataSource tableView:_tableView numberOfRowsInSection:0]; - return numberOfRows > 0; - - } else { - return YES; - } - - } else { - NSInteger numberOfRows = [_dataSource tableView:_tableView numberOfRowsInSection:0]; - return numberOfRows > 0; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didLoadModel:(BOOL)firstTime { - [super didLoadModel:firstTime]; - [_dataSource tableViewDidLoadModel:_tableView]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didShowModel:(BOOL)firstTime { - [super didShowModel:firstTime]; - if (![self isViewAppearing] && firstTime) { - [_tableView flashScrollIndicators]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showModel:(BOOL)show { - [self hideMenu:YES]; - if (show) { - [self updateTableDelegate]; - _tableView.dataSource = _dataSource; - - } else { - _tableView.dataSource = nil; - } - [_tableView reloadData]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showLoading:(BOOL)show { - if (show) { - if (!self.model.isLoaded || ![self canShowModel]) { - NSString* title = _dataSource - ? [_dataSource titleForLoading:NO] - : [self defaultTitleForLoading]; - if (title.length) { - TTActivityLabel* label = - [[[TTActivityLabel alloc] initWithStyle:TTActivityLabelStyleWhiteBox] - autorelease]; - label.text = title; - label.backgroundColor = _tableView.backgroundColor; - self.loadingView = label; - } - } - - } else { - self.loadingView = nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showError:(BOOL)show { - if (show) { - if (!self.model.isLoaded || ![self canShowModel]) { - NSString* title = [_dataSource titleForError:_modelError]; - NSString* subtitle = [_dataSource subtitleForError:_modelError]; - UIImage* image = [_dataSource imageForError:_modelError]; - if (title.length || subtitle.length || image) { - TTErrorView* errorView = [[[TTErrorView alloc] initWithTitle:title - subtitle:subtitle - image:image] autorelease]; - errorView.backgroundColor = _tableView.backgroundColor; - self.errorView = errorView; - - } else { - self.errorView = nil; - } - _tableView.dataSource = nil; - [_tableView reloadData]; - } - - } else { - self.errorView = nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showEmpty:(BOOL)show { - if (show) { - NSString* title = [_dataSource titleForEmpty]; - NSString* subtitle = [_dataSource subtitleForEmpty]; - UIImage* image = [_dataSource imageForEmpty]; - if (title.length || subtitle.length || image) { - TTErrorView* errorView = [[[TTErrorView alloc] initWithTitle:title - subtitle:subtitle - image:image] autorelease]; - errorView.backgroundColor = _tableView.backgroundColor; - self.emptyView = errorView; - - } else { - self.emptyView = nil; - } - _tableView.dataSource = nil; - [_tableView reloadData]; - - } else { - self.emptyView = nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didUpdateObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - if (model == _model) { - if (_flags.isShowingModel) { - if ([_dataSource respondsToSelector:@selector(tableView:willUpdateObject:atIndexPath:)]) { - NSIndexPath* newIndexPath = [_dataSource tableView:_tableView willUpdateObject:object - atIndexPath:indexPath]; - if (newIndexPath) { - if (newIndexPath.length == 1) { - TTDCONDITIONLOG(TTDFLAG_TABLEVIEWMODIFICATIONS, - @"UPDATING SECTION AT %@", newIndexPath); - NSInteger sectionIndex = [newIndexPath indexAtPosition:0]; - [_tableView reloadSections:[NSIndexSet indexSetWithIndex:sectionIndex] - withRowAnimation:UITableViewRowAnimationTop]; - - } else if (newIndexPath.length == 2) { - TTDCONDITIONLOG(TTDFLAG_TABLEVIEWMODIFICATIONS, @"UPDATING ROW AT %@", newIndexPath); - [_tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] - withRowAnimation:UITableViewRowAnimationTop]; - } - [self invalidateView]; - - } else { - [_tableView reloadData]; - } - } - - } else { - [self refresh]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didInsertObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - if (model == _model) { - if (_flags.isShowingModel) { - if ([_dataSource respondsToSelector:@selector(tableView:willInsertObject:atIndexPath:)]) { - NSIndexPath* newIndexPath = [_dataSource tableView:_tableView willInsertObject:object - atIndexPath:indexPath]; - if (newIndexPath) { - if (newIndexPath.length == 1) { - TTDCONDITIONLOG(TTDFLAG_TABLEVIEWMODIFICATIONS, - @"INSERTING SECTION AT %@", newIndexPath); - NSInteger sectionIndex = [newIndexPath indexAtPosition:0]; - [_tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] - withRowAnimation:UITableViewRowAnimationTop]; - - } else if (newIndexPath.length == 2) { - TTDCONDITIONLOG(TTDFLAG_TABLEVIEWMODIFICATIONS, @"INSERTING ROW AT %@", newIndexPath); - [_tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] - withRowAnimation:UITableViewRowAnimationTop]; - - [_tableView scrollToRowAtIndexPath:newIndexPath - atScrollPosition:UITableViewScrollPositionNone animated:NO]; - } - [self invalidateView]; - - } else { - [_tableView reloadData]; - } - } - - } else { - [self refresh]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didDeleteObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - if (model == _model) { - if (_flags.isShowingModel) { - if ([_dataSource respondsToSelector:@selector(tableView:willRemoveObject:atIndexPath:)]) { - NSIndexPath* newIndexPath = [_dataSource tableView:_tableView willRemoveObject:object - atIndexPath:indexPath]; - if (newIndexPath) { - if (newIndexPath.length == 1) { - TTDCONDITIONLOG(TTDFLAG_TABLEVIEWMODIFICATIONS, - @"DELETING SECTION AT %@", newIndexPath); - NSInteger sectionIndex = [newIndexPath indexAtPosition:0]; - [_tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] - withRowAnimation:UITableViewRowAnimationLeft]; - - } else if (newIndexPath.length == 2) { - TTDCONDITIONLOG(TTDFLAG_TABLEVIEWMODIFICATIONS, @"DELETING ROW AT %@", newIndexPath); - [_tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] - withRowAnimation:UITableViewRowAnimationLeft]; - } - [self invalidateView]; - - } else { - [_tableView reloadData]; - } - } - - } else { - [self refresh]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITableView*)tableView { - if (nil == _tableView) { - _tableView = [[TTTableView alloc] initWithFrame:self.view.bounds style:_tableViewStyle]; - _tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth - | UIViewAutoresizingFlexibleHeight; - - UIColor* backgroundColor = _tableViewStyle == UITableViewStyleGrouped - ? TTSTYLEVAR(tableGroupedBackgroundColor) - : TTSTYLEVAR(tablePlainBackgroundColor); - if (backgroundColor) { - _tableView.backgroundColor = backgroundColor; - self.view.backgroundColor = backgroundColor; - } - [self.view addSubview:_tableView]; - } - return _tableView; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTableView:(UITableView*)tableView { - if (tableView != _tableView) { - [_tableView release]; - _tableView = [tableView retain]; - if (!_tableView) { - self.tableBannerView = nil; - self.tableOverlayView = nil; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTableBannerView:(UIView*)tableBannerView { - [self setTableBannerView:tableBannerView animated:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTableBannerView:(UIView*)tableBannerView animated:(BOOL)animated { - TT_INVALIDATE_TIMER(_bannerTimer); - if (tableBannerView != _tableBannerView) { - if (_tableBannerView) { - if (animated) { - [self fadeOutView:_tableBannerView]; - - } else { - [_tableBannerView removeFromSuperview]; - } - } - - [_tableBannerView release]; - _tableBannerView = [tableBannerView retain]; - - if (_tableBannerView) { - self.tableView.contentInset = UIEdgeInsetsMake(0, 0, TTSTYLEVAR(tableBannerViewHeight), 0); - self.tableView.scrollIndicatorInsets = self.tableView.contentInset; - _tableBannerView.frame = [self rectForBannerView]; - _tableBannerView.userInteractionEnabled = NO; - _tableBannerView.autoresizingMask = (UIViewAutoresizingFlexibleWidth - | UIViewAutoresizingFlexibleTopMargin); - [self addSubviewOverTableView:_tableBannerView]; - - - if (animated) { - _tableBannerView.top += TTSTYLEVAR(tableBannerViewHeight); - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; - _tableBannerView.top -= TTSTYLEVAR(tableBannerViewHeight); - [UIView commitAnimations]; - } - - } else { - self.tableView.contentInset = UIEdgeInsetsZero; - self.tableView.scrollIndicatorInsets = UIEdgeInsetsZero; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTableOverlayView:(UIView*)tableOverlayView animated:(BOOL)animated { - if (tableOverlayView != _tableOverlayView) { - if (_tableOverlayView) { - if (animated) { - [self fadeOutView:_tableOverlayView]; - - } else { - [_tableOverlayView removeFromSuperview]; - } - } - - [_tableOverlayView release]; - _tableOverlayView = [tableOverlayView retain]; - - if (_tableOverlayView) { - _tableOverlayView.frame = [self rectForOverlayView]; - [self addToOverlayView:_tableOverlayView]; - } - - // XXXjoe There seem to be cases where this gets left disable - must investigate - //_tableView.scrollEnabled = !_tableOverlayView; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDataSource:(id)dataSource { - if (dataSource != _dataSource) { - [_dataSource release]; - _dataSource = [dataSource retain]; - _tableView.dataSource = nil; - - self.model = dataSource.model; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setVariableHeightRows:(BOOL)variableHeightRows { - if (variableHeightRows != _variableHeightRows) { - _variableHeightRows = variableHeightRows; - - // Force the delegate to be re-created so that it supports the right kind of row measurement - _tableView.delegate = nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setLoadingView:(UIView*)view { - if (view != _loadingView) { - if (_loadingView) { - [_loadingView removeFromSuperview]; - TT_RELEASE_SAFELY(_loadingView); - } - _loadingView = [view retain]; - if (_loadingView) { - [self addToOverlayView:_loadingView]; - - } else { - [self resetOverlayView]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setErrorView:(UIView*)view { - if (view != _errorView) { - if (_errorView) { - [_errorView removeFromSuperview]; - TT_RELEASE_SAFELY(_errorView); - } - _errorView = [view retain]; - - if (_errorView) { - [self addToOverlayView:_errorView]; - - } else { - [self resetOverlayView]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setEmptyView:(UIView*)view { - if (view != _emptyView) { - if (_emptyView) { - [_emptyView removeFromSuperview]; - TT_RELEASE_SAFELY(_emptyView); - } - _emptyView = [view retain]; - if (_emptyView) { - [self addToOverlayView:_emptyView]; - - } else { - [self resetOverlayView]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)createDelegate { - if (_variableHeightRows) { - return [[[TTTableViewVarHeightDelegate alloc] initWithController:self] autorelease]; - - } else { - return [[[TTTableViewDelegate alloc] initWithController:self] autorelease]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showMenu:(UIView*)view forCell:(UITableViewCell*)cell animated:(BOOL)animated { - [self hideMenu:YES]; - - _menuView = [view retain]; - _menuCell = [cell retain]; - - // Insert the cell below all content subviews - [_menuCell.contentView insertSubview:_menuView atIndex:0]; - - if (animated) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; - } - - // Move each content subview down, revealing the menu - for (UIView* subview in _menuCell.contentView.subviews) { - if (subview != _menuView) { - subview.left -= _menuCell.contentView.width; - } - } - - if (animated) { - [UIView commitAnimations]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)hideMenu:(BOOL)animated { - if (_menuView) { - if (animated) { - [UIView beginAnimations:nil context:_menuView]; - [UIView setAnimationDuration:TT_FAST_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(hideMenuAnimationDidStop:finished:context:)]; - } - - for (UIView* view in _menuCell.contentView.subviews) { - if (view != _menuView) { - view.left += _menuCell.contentView.width; - } - } - - if (animated) { - [UIView commitAnimations]; - - } else { - [_menuView removeFromSuperview]; - } - - TT_RELEASE_SAFELY(_menuView); - TT_RELEASE_SAFELY(_menuCell); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath { - if ([object respondsToSelector:@selector(URLValue)]) { - NSString* URL = [object URLValue]; - if (URL) { - TTOpenURLFromView(URL, self.view); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldOpenURL:(NSString*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didBeginDragging { - [self hideMenu:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didEndDragging { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)rectForOverlayView { - return [_tableView frameWithKeyboardSubtracted:0]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)rectForBannerView { - CGRect tableFrame = [_tableView frameWithKeyboardSubtracted:0]; - const CGFloat bannerViewHeight = TTSTYLEVAR(tableBannerViewHeight); - return CGRectMake(tableFrame.origin.x, - (tableFrame.origin.y + tableFrame.size.height) - bannerViewHeight, - tableFrame.size.width, bannerViewHeight); -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewDataSource.m b/src/Three20UI/Sources/TTTableViewDataSource.m deleted file mode 100644 index 79b262268e..0000000000 --- a/src/Three20UI/Sources/TTTableViewDataSource.m +++ /dev/null @@ -1,458 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewDataSource.h" - -// UI -#import "Three20UI/TTTextEditor.h" - -// - Table Items -#import "Three20UI/TTTableItem.h" -#import "Three20UI/TTTableMoreButton.h" -#import "Three20UI/TTTableSubtextItem.h" -#import "Three20UI/TTTableRightCaptionItem.h" -#import "Three20UI/TTTableCaptionItem.h" -#import "Three20UI/TTTableSubtitleItem.h" -#import "Three20UI/TTTableMessageItem.h" -#import "Three20UI/TTTableImageItem.h" -#import "Three20UI/TTTableStyledTextItem.h" -#import "Three20UI/TTTableTextItem.h" -#import "Three20UI/TTTableActivityItem.h" -#import "Three20UI/TTTableControlItem.h" - -// - Table Cells -#import "Three20UI/TTTableMoreButtonCell.h" -#import "Three20UI/TTTableSubtextItemCell.h" -#import "Three20UI/TTTableRightCaptionItemCell.h" -#import "Three20UI/TTTableCaptionItemCell.h" -#import "Three20UI/TTTableSubtitleItemCell.h" -#import "Three20UI/TTTableMessageItemCell.h" -#import "Three20UI/TTTableImageItemCell.h" -#import "Three20UI/TTStyledTextTableItemCell.h" -#import "Three20UI/TTTableActivityItemCell.h" -#import "Three20UI/TTTableControlCell.h" -#import "Three20UI/TTTableTextItemCell.h" -#import "Three20UI/TTStyledTextTableCell.h" -#import "Three20UI/TTTableFlushViewCell.h" - -// Style -#import "Three20Style/TTStyledText.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreLocale.h" - -#import - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewDataSource - -@synthesize model = _model; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_model); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (NSArray*)lettersForSectionsWithSearch:(BOOL)search summary:(BOOL)summary { - NSMutableArray* titles = [NSMutableArray array]; - if (search) { - [titles addObject:UITableViewIndexSearch]; - } - - for (unichar c = 'A'; c <= 'Z'; ++c) { - NSString* letter = [NSString stringWithFormat:@"%c", c]; - [titles addObject:letter]; - } - - if (summary) { - [titles addObject:@"#"]; - } - - return titles; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITableViewCell*)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath { - id object = [self tableView:tableView objectForRowAtIndexPath:indexPath]; - - Class cellClass = [self tableView:tableView cellClassForObject:object]; - const char* className = class_getName(cellClass); - NSString* identifier = [[NSString alloc] initWithBytesNoCopy:(char*)className - length:strlen(className) - encoding:NSASCIIStringEncoding freeWhenDone:NO]; - - UITableViewCell* cell = - (UITableViewCell*)[tableView dequeueReusableCellWithIdentifier:identifier]; - if (cell == nil) { - cell = [[[cellClass alloc] initWithStyle:UITableViewCellStyleDefault - reuseIdentifier:identifier] autorelease]; - } - [identifier release]; - - if ([cell isKindOfClass:[TTTableViewCell class]]) { - [(TTTableViewCell*)cell setObject:object]; - } - - [self tableView:tableView cell:cell willAppearAtIndexPath:indexPath]; - - return cell; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSArray*)sectionIndexTitlesForTableView:(UITableView*)tableView { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)tableView:(UITableView*)tableView sectionForSectionIndexTitle:(NSString*)title - atIndex:(NSInteger)sectionIndex { - if (tableView.tableHeaderView) { - if (sectionIndex == 0) { - // This is a hack to get the table header to appear when the user touches the - // first row in the section index. By default, it shows the first row, which is - // not usually what you want. - [tableView scrollRectToVisible:tableView.tableHeaderView.bounds animated:NO]; - return -1; - } - } - - NSString* letter = [title substringToIndex:1]; - NSInteger sectionCount = [tableView numberOfSections]; - for (NSInteger i = 0; i < sectionCount; ++i) { - NSString* section = [tableView.dataSource tableView:tableView titleForHeaderInSection:i]; - if ([section hasPrefix:letter]) { - return i; - } - } - if (sectionIndex >= sectionCount) { - return sectionCount-1; - - } else { - return sectionIndex; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModel - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableArray*)delegates { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoaded { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoading { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoadingMore { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isOutdated { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidate:(BOOL)erase { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)model { - return _model ? _model : self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)tableView:(UITableView*)tableView objectForRowAtIndexPath:(NSIndexPath*)indexPath { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (Class)tableView:(UITableView*)tableView cellClassForObject:(id)object { - if ([object isKindOfClass:[TTTableItem class]]) { - if ([object isKindOfClass:[TTTableMoreButton class]]) { - return [TTTableMoreButtonCell class]; - - } else if ([object isKindOfClass:[TTTableSubtextItem class]]) { - return [TTTableSubtextItemCell class]; - - } else if ([object isKindOfClass:[TTTableRightCaptionItem class]]) { - return [TTTableRightCaptionItemCell class]; - - } else if ([object isKindOfClass:[TTTableCaptionItem class]]) { - return [TTTableCaptionItemCell class]; - - } else if ([object isKindOfClass:[TTTableSubtitleItem class]]) { - return [TTTableSubtitleItemCell class]; - - } else if ([object isKindOfClass:[TTTableMessageItem class]]) { - return [TTTableMessageItemCell class]; - - } else if ([object isKindOfClass:[TTTableImageItem class]]) { - return [TTTableImageItemCell class]; - - } else if ([object isKindOfClass:[TTTableStyledTextItem class]]) { - return [TTStyledTextTableItemCell class]; - - } else if ([object isKindOfClass:[TTTableActivityItem class]]) { - return [TTTableActivityItemCell class]; - - } else if ([object isKindOfClass:[TTTableControlItem class]]) { - return [TTTableControlCell class]; - - } else { - return [TTTableTextItemCell class]; - } - - } else if ([object isKindOfClass:[TTStyledText class]]) { - return [TTStyledTextTableCell class]; - - } else if ([object isKindOfClass:[UIControl class]] - || [object isKindOfClass:[UITextView class]] - || [object isKindOfClass:[TTTextEditor class]]) { - return [TTTableControlCell class]; - - } else if ([object isKindOfClass:[UIView class]]) { - return [TTTableFlushViewCell class]; - } - - // This will display an empty white table cell - probably not what you want, but it - // is better than crashing, which is what happens if you return nil here - return [TTTableViewCell class]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)tableView:(UITableView*)tableView labelForObject:(id)object { - if ([object isKindOfClass:[TTTableTextItem class]]) { - TTTableTextItem* item = object; - return item.text; - - } else { - return [NSString stringWithFormat:@"%@", object]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSIndexPath*)tableView:(UITableView*)tableView indexPathForObject:(id)object { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tableView:(UITableView*)tableView cell:(UITableViewCell*)cell - willAppearAtIndexPath:(NSIndexPath*)indexPath { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tableViewDidLoadModel:(UITableView*)tableView { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)search:(NSString*)text { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForLoading:(BOOL)reloading { - if (reloading) { - return TTLocalizedString(@"Updating...", @""); - - } else { - return TTLocalizedString(@"Loading...", @""); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)imageForEmpty { - return [self imageForError:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForEmpty { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)subtitleForEmpty { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)imageForError:(NSError*)error { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForError:(NSError*)error { - return TTDescriptionForError(error); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)subtitleForError:(NSError*)error { - return TTLocalizedString(@"Sorry, there was an error.", @""); -} - - -@end - - -#pragma mark - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewInterstitialDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)model { - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModel - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSMutableArray*)delegates { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoaded { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoading { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isLoadingMore { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isOutdated { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)invalidate:(BOOL)erase { -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewDelegate.m b/src/Three20UI/Sources/TTTableViewDelegate.m deleted file mode 100644 index 43568cf075..0000000000 --- a/src/Three20UI/Sources/TTTableViewDelegate.m +++ /dev/null @@ -1,248 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewDelegate.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTTableViewDataSource.h" -#import "Three20UI/TTTableViewController.h" -#import "Three20UI/TTTableHeaderView.h" -#import "Three20UI/TTTableView.h" -#import "Three20UI/TTStyledTextLabel.h" - -// - Table Items -#import "Three20UI/TTTableItem.h" -#import "Three20UI/TTTableLinkedItem.h" -#import "Three20UI/TTTableButton.h" -#import "Three20UI/TTTableMoreButton.h" - -// - Table Item Cells -#import "Three20UI/TTTableMoreButtonCell.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Network -#import "Three20Network/TTURLRequestQueue.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewDelegate - -@synthesize controller = _controller; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithController:(TTTableViewController*)controller { - if (self = [super init]) { - _controller = controller; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_headers); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * If tableHeaderTintColor has been specified in the global style sheet and this is a plain table - * (i.e. not a grouped one), then we create header view objects for each header and handle the - * drawing ourselves. - */ -- (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { - if (tableView.style == UITableViewStylePlain && TTSTYLEVAR(tableHeaderTintColor)) { - if ([tableView.dataSource respondsToSelector:@selector(tableView:titleForHeaderInSection:)]) { - NSString* title = [tableView.dataSource tableView:tableView titleForHeaderInSection:section]; - if (title.length > 0) { - TTTableHeaderView* header = [_headers objectForKey:title]; - - // If retrieved from cache, prepare for reuse here. - // We reset the the opacity to 1 because UITableView might set this property to 0 after - // removing it. - // TODO (jverkoey Feb 26, 2011): When does this happen, exactly? - if (nil != header) { - header.alpha = 1; - - } else { - if (nil == _headers) { - _headers = [[NSMutableDictionary alloc] init]; - } - header = [[[TTTableHeaderView alloc] initWithTitle:title] autorelease]; - [_headers setObject:header forKey:title]; - } - return header; - } - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * When the user taps a cell item, we check whether the tapped item has an attached URL and, if - * it has one, we navigate to it. This also handles the logic for "Load more" buttons. - */ -- (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath { - id dataSource = (id)tableView.dataSource; - id object = [dataSource tableView:tableView objectForRowAtIndexPath:indexPath]; - if ([object isKindOfClass:[TTTableLinkedItem class]]) { - TTTableLinkedItem* item = object; - if (item.URL && [_controller shouldOpenURL:item.URL]) { - TTOpenURLFromView(item.URL, tableView); - - } else if (item.delegate && item.selector) { - [item.delegate performSelector:item.selector withObject:object]; - } - - if ([object isKindOfClass:[TTTableButton class]]) { - [tableView deselectRowAtIndexPath:indexPath animated:YES]; - - } else if ([object isKindOfClass:[TTTableMoreButton class]]) { - TTTableMoreButton* moreLink = (TTTableMoreButton*)object; - moreLink.isLoading = YES; - TTTableMoreButtonCell* cell - = (TTTableMoreButtonCell*)[tableView cellForRowAtIndexPath:indexPath]; - cell.animating = YES; - [tableView deselectRowAtIndexPath:indexPath animated:YES]; - - if (moreLink.model) { - [moreLink.model load:TTURLRequestCachePolicyDefault more:YES]; - - } else { - [_controller.model load:TTURLRequestCachePolicyDefault more:YES]; - } - } - } - - [_controller didSelectObject:object atIndexPath:indexPath]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Similar logic to the above. If the user taps an accessory item and there is an associated URL, - * we navigate to that URL. - */ -- (void)tableView:(UITableView*)tableView - accessoryButtonTappedForRowWithIndexPath:(NSIndexPath*)indexPath { - id dataSource = (id)tableView.dataSource; - id object = [dataSource tableView:tableView objectForRowAtIndexPath:indexPath]; - if ([object isKindOfClass:[TTTableLinkedItem class]]) { - TTTableLinkedItem* item = object; - if (item.accessoryURL && [_controller shouldOpenURL:item.accessoryURL]) { - TTOpenURLFromView(item.accessoryURL, tableView); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIScrollViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView { - [TTURLRequestQueue mainQueue].suspended = YES; - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView { - [TTURLRequestQueue mainQueue].suspended = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidScroll:(UIScrollView *)scrollView { - if (_controller.menuView) { - [_controller hideMenu:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { - [TTURLRequestQueue mainQueue].suspended = YES; - - [_controller didBeginDragging]; - - if ([scrollView isKindOfClass:[TTTableView class]]) { - TTTableView* tableView = (TTTableView*)scrollView; - tableView.highlightedLabel.highlightedNode = nil; - tableView.highlightedLabel = nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { - if (!decelerate) { - [TTURLRequestQueue mainQueue].suspended = NO; - } - - [_controller didEndDragging]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { - [TTURLRequestQueue mainQueue].suspended = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tableView:(UITableView*)tableView touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { - if (_controller.menuView) { - [_controller hideMenu:YES]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewDragRefreshDelegate.m b/src/Three20UI/Sources/TTTableViewDragRefreshDelegate.m deleted file mode 100644 index a93267fb26..0000000000 --- a/src/Three20UI/Sources/TTTableViewDragRefreshDelegate.m +++ /dev/null @@ -1,217 +0,0 @@ -// -// Created by Devin Doty on 10/14/09. -// http://github.com/enormego/EGOTableViewPullRefresh -// Copyright 2009 enormego. All rights reserved. -// -// Modifications copyright 2010 Facebook. -// -// 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. -// - -#import "Three20UI/TTTableViewDragRefreshDelegate.h" - -// UI -#import "Three20UI/TTTableHeaderDragRefreshView.h" -#import "Three20UI/TTTableViewController.h" -#import "Three20UI/UIViewAdditions.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet+DragRefreshHeader.h" - -// Network -#import "Three20Network/TTModel.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// The number of pixels the table needs to be pulled down by in order to initiate the refresh. -static const CGFloat kRefreshDeltaY = -65.0f; - -// The height of the refresh header when it is in its "loading" state. -static const CGFloat kHeaderVisibleHeight = 60.0f; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewDragRefreshDelegate - -@synthesize headerView = _headerView; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithController:(TTTableViewController*)controller { - if (self = [super initWithController:controller]) { - // Add our refresh header - _headerView = [[TTTableHeaderDragRefreshView alloc] - initWithFrame:CGRectMake(0, - -_controller.tableView.bounds.size.height, - _controller.tableView.width, - _controller.tableView.bounds.size.height)]; - _headerView.autoresizingMask = UIViewAutoresizingFlexibleWidth; - _headerView.backgroundColor = TTSTYLEVAR(tableRefreshHeaderBackgroundColor); - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - [_controller.tableView addSubview:_headerView]; - - // Hook up to the model to listen for changes. - _model = [controller.model retain]; - [_model.delegates addObject:self]; - - // Grab the last refresh date if there is one. - if ([_model respondsToSelector:@selector(loadedTime)]) { - NSDate* date = [_model performSelector:@selector(loadedTime)]; - - if (nil != date) { - [_headerView setUpdateDate:date]; - } - } - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [_model.delegates removeObject:self]; - TT_RELEASE_SAFELY(_headerView); - TT_RELEASE_SAFELY(_model); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIScrollViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidScroll:(UIScrollView*)scrollView { - [super scrollViewDidScroll:scrollView]; - - if (scrollView.dragging && !_model.isLoading) { - if (scrollView.contentOffset.y > kRefreshDeltaY - && scrollView.contentOffset.y < 0.0f) { - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - - } else if (scrollView.contentOffset.y < kRefreshDeltaY) { - [_headerView setStatus:TTTableHeaderDragRefreshReleaseToReload]; - } - } - - // This is to prevent odd behavior with plain table section headers. They are affected by the - // content inset, so if the table is scrolled such that there might be a section header abutting - // the top, we need to clear the content inset. - if (_model.isLoading) { - if (scrollView.contentOffset.y >= 0) { - _controller.tableView.contentInset = UIEdgeInsetsZero; - - } else if (scrollView.contentOffset.y < 0) { - _controller.tableView.contentInset = UIEdgeInsetsMake(kHeaderVisibleHeight, 0, 0, 0); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidEndDragging:(UIScrollView*)scrollView willDecelerate:(BOOL)decelerate { - [super scrollViewDidEndDragging:scrollView willDecelerate:decelerate]; - - // If dragging ends and we are far enough to be fully showing the header view trigger a - // load as long as we arent loading already - if (scrollView.contentOffset.y <= kRefreshDeltaY && !_model.isLoading) { - [[NSNotificationCenter defaultCenter] - postNotificationName:@"DragRefreshTableReload" object:nil]; - [_model load:TTURLRequestCachePolicyNetwork more:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidStartLoad:(id)model { - [_headerView setStatus:TTTableHeaderDragRefreshLoading]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultFastTransitionDuration]; - if (_controller.tableView.contentOffset.y < 0) { - _controller.tableView.contentInset = UIEdgeInsetsMake(kHeaderVisibleHeight, 0.0f, 0.0f, 0.0f); - } - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidFinishLoad:(id)model { - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultTransitionDuration]; - _controller.tableView.contentInset = UIEdgeInsetsZero; - [UIView commitAnimations]; - - if ([model respondsToSelector:@selector(loadedTime)]) { - NSDate* date = [model performSelector:@selector(loadedTime)]; - [_headerView setUpdateDate:date]; - - } else { - [_headerView setCurrentDate]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didFailLoadWithError:(NSError*)error { - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultTransitionDuration]; - _controller.tableView.contentInset = UIEdgeInsetsZero; - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidCancelLoad:(id)model { - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultTransitionDuration]; - _controller.tableView.contentInset = UIEdgeInsetsZero; - [UIView commitAnimations]; -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewGroupedVarHeightDelegate.m b/src/Three20UI/Sources/TTTableViewGroupedVarHeightDelegate.m deleted file mode 100644 index b3e426ec75..0000000000 --- a/src/Three20UI/Sources/TTTableViewGroupedVarHeightDelegate.m +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewGroupedVarHeightDelegate.h" - -static const CGFloat kEmptyHeaderHeight = 1; -static const CGFloat kSectionHeaderHeight = 35; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewGroupedVarHeightDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section { - NSString* title = [tableView.dataSource tableView:tableView titleForHeaderInSection:section]; - if (!title.length) { - return kEmptyHeaderHeight; - - } else { - return kSectionHeaderHeight; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewItem.m b/src/Three20UI/Sources/TTTableViewItem.m deleted file mode 100644 index 0e1f7e97dd..0000000000 --- a/src/Three20UI/Sources/TTTableViewItem.m +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewItem.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewItem - -@synthesize caption = _caption; -@synthesize view = _view; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_caption); - TT_RELEASE_SAFELY(_view); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Class public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)itemWithCaption:(NSString*)caption view:(UIControl*)view { - TTTableViewItem* item = [[[self alloc] init] autorelease]; - item.caption = caption; - item.view = view; - return item; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoding - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithCoder:(NSCoder*)decoder { - if (self = [super initWithCoder:decoder]) { - self.caption = [decoder decodeObjectForKey:@"caption"]; - self.view = [decoder decodeObjectForKey:@"view"]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)encodeWithCoder:(NSCoder*)encoder { - [super encodeWithCoder:encoder]; - if (self.caption) { - [encoder encodeObject:self.caption forKey:@"caption"]; - } - if (self.view) { - [encoder encodeObject:self.view forKey:@"control"]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewNetworkEnabledDelegate.m b/src/Three20UI/Sources/TTTableViewNetworkEnabledDelegate.m deleted file mode 100644 index 105fdba721..0000000000 --- a/src/Three20UI/Sources/TTTableViewNetworkEnabledDelegate.m +++ /dev/null @@ -1,272 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewNetworkEnabledDelegate.h" - -// UI -#import "Three20UI/TTTableHeaderDragRefreshView.h" -#import "Three20UI/TTTableFooterInfiniteScrollView.h" -#import "Three20UI/TTTableViewController.h" -#import "Three20UI/UIViewAdditions.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Network -#import "Three20Network/TTModel.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet+DragRefreshHeader.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -// The number of pixels the table needs to be pulled down by in order to initiate the refresh. -static const CGFloat kRefreshDeltaY = -65.0f; - -// The height of the refresh header when it is in its "loading" state. -static const CGFloat kHeaderVisibleHeight = 60.0f; - -// The height of the infinite scroll footer view -static const CGFloat kInfiniteScrollFooterHeight = 40.0f; - -// The percentage of table scrolling to trigger infinite scroll agter -static const CGFloat kInfiniteScrollThreshold = 0.5; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewNetworkEnabledDelegate - -@synthesize headerView = _headerView, footerView = _footerView, - dragRefreshEnabled = _dragRefreshEnabled, - infiniteScrollEnabled = _infiniteScrollEnabled; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithController:(TTTableViewController*)controller - withDragRefresh:(BOOL)enableDragRefresh - withInfiniteScroll:(BOOL)enableInfiniteScroll { - if (self = [super initWithController:controller]) { - _dragRefreshEnabled = enableDragRefresh; - _infiniteScrollEnabled = enableInfiniteScroll; - - // Hook up to the model to listen for changes. - _model = [controller.model retain]; - [_model.delegates addObject:self]; - - if (_dragRefreshEnabled) { - // Add our refresh header - _headerView = [[TTTableHeaderDragRefreshView alloc] - initWithFrame:CGRectMake(0, - -_controller.tableView.bounds.size.height, - _controller.tableView.width, - _controller.tableView.bounds.size.height)]; - _headerView.autoresizingMask = UIViewAutoresizingFlexibleWidth; - _headerView.backgroundColor = TTSTYLEVAR(tableRefreshHeaderBackgroundColor); - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - [_controller.tableView addSubview:_headerView]; - - - // Grab the last refresh date if there is one. - if ([_model respondsToSelector:@selector(loadedTime)] && enableDragRefresh) { - NSDate* date = [_model performSelector:@selector(loadedTime)]; - - if (nil != date) { - [_headerView setUpdateDate:date]; - } - } - } - - if (_infiniteScrollEnabled) { - _footerView = [[TTTableFooterInfiniteScrollView alloc] - initWithFrame:CGRectMake(0, - 0, - _controller.tableView.width, - kInfiniteScrollFooterHeight)]; - _footerView.autoresizingMask = UIViewAutoresizingFlexibleWidth; - _controller.tableView.tableFooterView = _footerView; - } - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - _controller.tableView.tableFooterView = nil; - [_model.delegates removeObject:self]; - [_headerView removeFromSuperview]; - TT_RELEASE_SAFELY(_headerView); - TT_RELEASE_SAFELY(_footerView); - TT_RELEASE_SAFELY(_model); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIScrollViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidScroll:(UIScrollView*)scrollView { - [super scrollViewDidScroll:scrollView]; - - if (_dragRefreshEnabled) { - if (scrollView.dragging && !_model.isLoading) { - if (scrollView.contentOffset.y > kRefreshDeltaY - && scrollView.contentOffset.y < 0.0f) { - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - - } else if (scrollView.contentOffset.y < kRefreshDeltaY) { - [_headerView setStatus:TTTableHeaderDragRefreshReleaseToReload]; - } - } - - // This is to prevent odd behavior with plain table section headers. They are affected by the - // content inset, so if the table is scrolled such that there might be a section header abutting - // the top, we need to clear the content inset. - if (_model.isLoading) { - if (scrollView.contentOffset.y >= 0) { - _controller.tableView.contentInset = UIEdgeInsetsZero; - - } else if (scrollView.contentOffset.y < 0) { - _controller.tableView.contentInset = UIEdgeInsetsMake(kHeaderVisibleHeight, 0, 0, 0); - } - } - } - - if (_infiniteScrollEnabled && !_model.isLoading) { - CGFloat scrollRatio = scrollView.contentOffset.y / - (scrollView.contentSize.height - scrollView.height); - scrollRatio = MAX(MIN(scrollRatio, 1),0); - BOOL shouldLoad; - if ([_controller respondsToSelector:@selector(shouldLoadAtScrollRatio:)]) { - shouldLoad = [(id )_controller - shouldLoadAtScrollRatio:scrollRatio]; - - } else { - shouldLoad = scrollRatio > kInfiniteScrollThreshold; - } - - if (shouldLoad) { - [_model load:TTURLRequestCachePolicyDefault more:YES]; - [(TTTableFooterInfiniteScrollView*)_controller.tableView.tableFooterView setLoading:YES]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollViewDidEndDragging:(UIScrollView*)scrollView willDecelerate:(BOOL)decelerate { - [super scrollViewDidEndDragging:scrollView willDecelerate:decelerate]; - - if (_dragRefreshEnabled) { - // If dragging ends and we are far enough to be fully showing the header view trigger a - // load as long as we arent loading already - if (scrollView.contentOffset.y <= kRefreshDeltaY && !_model.isLoading) { - [[NSNotificationCenter defaultCenter] - postNotificationName:@"DragRefreshTableReload" object:nil]; - [_model load:TTURLRequestCachePolicyNetwork more:NO]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidStartLoad:(id)model { - if (_dragRefreshEnabled) { - [_headerView setStatus:TTTableHeaderDragRefreshLoading]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultFastTransitionDuration]; - if (_controller.tableView.contentOffset.y < 0) { - _controller.tableView.contentInset = UIEdgeInsetsMake(kHeaderVisibleHeight, 0.0f, 0.0f, 0.0f); - } - [UIView commitAnimations]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidFinishLoad:(id)model { - if (_dragRefreshEnabled) { - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultTransitionDuration]; - _controller.tableView.contentInset = UIEdgeInsetsZero; - [UIView commitAnimations]; - - if ([model respondsToSelector:@selector(loadedTime)]) { - NSDate* date = [model performSelector:@selector(loadedTime)]; - [_headerView setUpdateDate:date]; - - } else { - [_headerView setCurrentDate]; - } - } - - if (_infiniteScrollEnabled) { - [(TTTableFooterInfiniteScrollView*)_controller.tableView.tableFooterView setLoading:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)model:(id)model didFailLoadWithError:(NSError*)error { - if (_dragRefreshEnabled) { - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultTransitionDuration]; - _controller.tableView.contentInset = UIEdgeInsetsZero; - [UIView commitAnimations]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)modelDidCancelLoad:(id)model { - if (_dragRefreshEnabled) { - [_headerView setStatus:TTTableHeaderDragRefreshPullToReload]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:ttkDefaultTransitionDuration]; - _controller.tableView.contentInset = UIEdgeInsetsZero; - [UIView commitAnimations]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTableViewPlainDelegate.m b/src/Three20UI/Sources/TTTableViewPlainDelegate.m deleted file mode 100644 index 27148a11de..0000000000 --- a/src/Three20UI/Sources/TTTableViewPlainDelegate.m +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewPlainDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewPlainDelegate - -@end diff --git a/src/Three20UI/Sources/TTTableViewPlainVarHeightDelegate.m b/src/Three20UI/Sources/TTTableViewPlainVarHeightDelegate.m deleted file mode 100644 index c1484ccf63..0000000000 --- a/src/Three20UI/Sources/TTTableViewPlainVarHeightDelegate.m +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewPlainVarHeightDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewPlainVarHeightDelegate - -@end diff --git a/src/Three20UI/Sources/TTTableViewVarHeightDelegate.m b/src/Three20UI/Sources/TTTableViewVarHeightDelegate.m deleted file mode 100644 index e0e1049cf3..0000000000 --- a/src/Three20UI/Sources/TTTableViewVarHeightDelegate.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTableViewVarHeightDelegate.h" - -// UI -#import "Three20UI/TTTableViewDataSource.h" -#import "Three20UI/TTTableViewCell.h" // For tableView:rowHeightForObject: - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTableViewVarHeightDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)tableView:(UITableView*)tableView heightForRowAtIndexPath:(NSIndexPath*)indexPath { - id dataSource = (id)tableView.dataSource; - - id object = [dataSource tableView:tableView objectForRowAtIndexPath:indexPath]; - Class cls = [dataSource tableView:tableView cellClassForObject:object]; - return [cls tableView:tableView rowHeightForObject:object]; -} - - -@end diff --git a/src/Three20UI/Sources/TTTextBarController.m b/src/Three20UI/Sources/TTTextBarController.m deleted file mode 100644 index 2a2f13d0af..0000000000 --- a/src/Three20UI/Sources/TTTextBarController.m +++ /dev/null @@ -1,517 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTextBarController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTTextBarDelegate.h" -#import "Three20UI/TTButton.h" -#import "Three20UI/TTTextEditor.h" -#import "Three20UI/UIViewAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" -#import "Three20UICommon/UIView+TTUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTGlobalCoreLocale.h" -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/NSStringAdditions.h" -#import "Three20Core/TTGlobalCore.h" - -static CGFloat kMargin = 1; -static CGFloat kPadding = 5; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTextBarController - -@synthesize textEditor = _textEditor; -@synthesize postButton = _postButton; -@synthesize footerBar = _footerBar; - -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNavigatorURL:(NSURL*)URL query:(NSDictionary*)query { - if (self = [self initWithNibName:nil bundle:nil]) { - if (nil != query) { - _delegate = [query objectForKey:@"delegate"]; - _defaultText = [[query objectForKey:@"text"] copy]; - } - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNavigatorURL:nil query:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_result); - TT_RELEASE_SAFELY(_defaultText); - TT_RELEASE_SAFELY(_footerBar); - TT_RELEASE_SAFELY(_previousRightBarButtonItem); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showActivity:(NSString*)activityText { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showAnimationDidStop { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissAnimationDidStop { - [self release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissWithCancel { - if ([_delegate respondsToSelector:@selector(textBarDidCancel:)]) { - [_delegate textBarDidCancel:self]; - } - - [self dismissPopupViewControllerAnimated:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - CGSize screenSize = TTScreenBounds().size; - - self.view = [[[UIView alloc] init] autorelease]; - _textBar = [[TTView alloc] init]; - _textBar.style = TTSTYLE(textBar); - [self.view addSubview:_textBar]; - - [_textBar addSubview:self.textEditor]; - [_textBar addSubview:self.postButton]; - - [self.postButton sizeToFit]; - _postButton.frame = CGRectMake(screenSize.width - (_postButton.width + kPadding), - kMargin+kPadding, _postButton.width, 0); - - _textEditor.frame = CGRectMake(kPadding, kMargin, - screenSize.width - (_postButton.width+kPadding*2), 0); - [_textEditor sizeToFit]; - _postButton.height = _textEditor.size.height - 8; - - _textBar.frame = CGRectMake(0, 0, - screenSize.width, _textEditor.height+kMargin*2); - - self.view.frame = CGRectMake(0, screenSize.height - (TTKeyboardHeight() + _textEditor.height), - screenSize.width, _textEditor.height+kMargin*2); - - if (_footerBar) { - _footerBar.frame = CGRectMake(0, _textBar.height, screenSize.width, _footerBar.height); - [self.view addSubview:_footerBar]; - self.view.top -= _footerBar.height; - self.view.height += _footerBar.height; - } - - self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth - | UIViewAutoresizingFlexibleTopMargin; - _postButton.autoresizingMask = UIViewAutoresizingFlexibleTopMargin - | UIViewAutoresizingFlexibleLeftMargin; - _textEditor.autoresizingMask = UIViewAutoresizingFlexibleRightMargin; - _textBar.autoresizingMask = UIViewAutoresizingFlexibleWidth; - _footerBar.autoresizingMask = UIViewAutoresizingFlexibleWidth; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidUnload { - [super viewDidUnload]; - TT_RELEASE_SAFELY(_textBar); - TT_RELEASE_SAFELY(_textEditor); - TT_RELEASE_SAFELY(_postButton); - TT_RELEASE_SAFELY(_previousRightBarButtonItem); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - [state setObject:[NSNumber numberWithBool:YES] forKey:@"__important__"]; - - NSString* delegate = [[TTNavigator navigator] pathForObject:_delegate]; - if (delegate) { - [state setObject:delegate forKey:@"delegate"]; - } - [state setObject:_textEditor.text forKey:@"text"]; - - NSString* title = self.navigationItem.title; - - if (title) { - [state setObject:title forKey:@"title"]; - } - - return [super persistView:state]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreView:(NSDictionary*)state { - [super restoreView:state]; - NSString* delegate = [state objectForKey:@"delegate"]; - if (delegate) { - _delegate = [[TTNavigator navigator] objectForPath:delegate]; - } - NSString* title = [state objectForKey:@"title"]; - if (title) { - self.navigationItem.title = title; - } - _defaultText = [[state objectForKey:@"text"] retain]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTPopupViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showInView:(UIView*)view animated:(BOOL)animated { - self.view.transform = TTRotateTransformForOrientation(TTInterfaceOrientation()); - [view addSubview:self.view]; - - if (_defaultText) { - _textEditor.text = _defaultText; - TT_RELEASE_SAFELY(_defaultText); - - } else { - _defaultText = [_textEditor.text retain]; - } - - self.view.top = self.view.superview.height; - - [_textEditor becomeFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissPopupViewControllerAnimated:(BOOL)animated { - if (animated) { - [_textEditor resignFirstResponder]; - - } else { - UIViewController* superController = self.superController; - [self.view removeFromSuperview]; - superController.popupViewController = nil; - [superController viewWillAppear:animated]; - [superController viewDidAppear:animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTextEditorDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textEditorDidBeginEditing:(TTTextEditor*)textEditor { - [self retain]; - - _originTop = self.view.top; - - UIViewController* controller = self.view.viewController; - _previousRightBarButtonItem = [controller.navigationItem.rightBarButtonItem retain]; - [controller.navigationItem setRightBarButtonItem: - [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel - target:self action:@selector(cancel)] autorelease] animated:YES]; - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(showAnimationDidStop)]; - - CGRect rect = [self.view.superview frameWithKeyboardSubtracted:0]; - self.view.top = rect.size.height - self.view.height; - - [UIView commitAnimations]; - - if ([_delegate respondsToSelector:@selector(textBarDidBeginEditing:)]) { - [_delegate textBarDidBeginEditing:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textEditorDidEndEditing:(TTTextEditor*)textEditor { - UIViewController* controller = self.view.viewController; - [controller.navigationItem setRightBarButtonItem:_previousRightBarButtonItem animated:YES]; - TT_RELEASE_SAFELY(_previousRightBarButtonItem); - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(dismissAnimationDidStop)]; - - self.view.top = _originTop; - - [UIView commitAnimations]; - - if ([_delegate respondsToSelector:@selector(textBarDidEndEditing:)]) { - [_delegate textBarDidEndEditing:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textEditorDidChange:(TTTextEditor*)textEditor { - [_postButton setEnabled:textEditor.text.length > 0]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textEditor:(TTTextEditor*)textEditor shouldResizeBy:(CGFloat)height { - CGRect frame = self.view.frame; - frame.origin.y -= height; - frame.size.height += height; - _textBar.height += height; - _footerBar.top += height; - self.view.frame = frame; - - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAlertViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { - if (buttonIndex == 0) { - [self dismissWithCancel]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTTextEditor*)textEditor { - if (!_textEditor) { - _textEditor = [[TTTextEditor alloc] init]; - _textEditor.delegate = self; - _textEditor.style = TTSTYLE(textBarTextField); - _textEditor.backgroundColor = [UIColor clearColor]; - _textEditor.autoresizesToText = YES; - _textEditor.maxNumberOfLines = 6; - _textEditor.font = [UIFont systemFontOfSize:16]; - } - return _textEditor; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTButton*)postButton { - if (!_postButton) { - _postButton = [[TTButton buttonWithStyle:@"textBarPostButton:" - title:NSLocalizedString(@"Post", @"")] retain]; - [_postButton addTarget: self - action: @selector(post) - forControlEvents: UIControlEventTouchUpInside]; - [_postButton setEnabled:NO]; - } - return _postButton; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)post { - BOOL shouldDismiss = [self willPostText:_textEditor.text]; - if ([_delegate respondsToSelector:@selector(textBar:willPostText:)]) { - shouldDismiss = [_delegate textBar:self willPostText:_textEditor.text]; - } - - _textEditor.text = @""; - _postButton.enabled = NO; - - if (shouldDismiss) { - [self dismissWithResult:nil animated:YES]; - - } else { - [self showActivity:[self titleForActivity]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancel { - if (!TTIsStringWithAnyText(_textEditor.text) - && !_textEditor.text.isWhitespaceAndNewlines - && !(_defaultText && [_defaultText isEqualToString:_textEditor.text])) { - UIAlertView* cancelAlertView = [[[UIAlertView alloc] initWithTitle: - TTLocalizedString(@"Cancel", @"") - message:TTLocalizedString(@"Are you sure you want to cancel?", @"") - delegate:self cancelButtonTitle:TTLocalizedString(@"Yes", @"") - otherButtonTitles:TTLocalizedString(@"No", @""), nil] autorelease]; - [cancelAlertView show]; - - } else { - [self dismissWithCancel]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissWithResult:(id)result animated:(BOOL)animated { - [_result release]; - _result = [result retain]; - - [self dismissPopupViewControllerAnimated:YES]; - -// if (animated) { -// if ([_delegate respondsToSelector:@selector(textBar:willAnimateTowards:)]) { -// CGRect rect = [_delegate textBar:self willAnimateTowards:_originRect]; -// if (!CGRectIsEmpty(rect)) { -// _originRect = rect; -// } -// } -// -// CGRect originRect = _originRect; -// if (CGRectIsEmpty(originRect) && _originView) { -// originRect = _originView.screenFrame; -// } -// -// _originView.hidden = NO; -// _activityView.hidden = YES; -// _textEditor.hidden = YES; -// -// [UIView beginAnimations:nil context:nil]; -// [UIView setAnimationDuration:TT_TRANSITION_DURATION]; -// [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; -// [UIView setAnimationDelegate:self]; -// [UIView setAnimationDidStopSelector:@selector(dismissAnimationDidStop)]; -// -// if (!CGRectIsEmpty(originRect)) { -// _screenView.frame = CGRectOffset(originRect, 0, -TTStatusHeight()); -// -// } else { -// _screenView.transform = CGAffineTransformMakeScale(0.00001, 0.00001); -// } -// -// _innerView.alpha = 0; -// _navigationBar.alpha = 0; -// -// [UIView commitAnimations]; -// -// } else { -// [self dismissAnimationDidStop]; -// } -// -// [self hideKeyboard]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)failWithError:(NSError*)error { - [self showActivity:nil]; - - NSString* title = [self titleForError:error]; - if (title.length) { - UIAlertView* alertView = [[[UIAlertView alloc] initWithTitle:TTLocalizedString(@"Error", @"") - message:title delegate:nil cancelButtonTitle:TTLocalizedString(@"Ok", @"") - otherButtonTitles:nil] autorelease]; - [alertView show]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)willPostText:(NSString*)text { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForActivity { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForError:(NSError*)error { - return nil; -} - - -@end diff --git a/src/Three20UI/Sources/TTTextEditor.m b/src/Three20UI/Sources/TTTextEditor.m deleted file mode 100644 index 51c54a3dda..0000000000 --- a/src/Three20UI/Sources/TTTextEditor.m +++ /dev/null @@ -1,485 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTTextEditor.h" - -// UI -#import "Three20UI/TTTextEditorDelegate.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20Style/UIFontAdditions.h" - -// UI (private) -#import "Three20UI/private/TTTextView.h" -#import "Three20UI/private/TTTextEditorInternal.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreRects.h" - -static const CGFloat kPaddingX = 8; -static const CGFloat kPaddingY = 9; - -// XXXjoe This number is very sensitive - it is specifically calculated for precise word wrapping -// with 15pt normal helvetica. If you change this number at all, UITextView may wrap the text -// before or after the TTTextEditor expands or contracts its height to match. Obviously, -// hard-coding this value here sucks, and I need to implement a solution that works for any font. -static const CGFloat kTextViewInset = 31; - -static const CGFloat kUITextViewVerticalPadding = 6; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTextEditor - -@synthesize minNumberOfLines = _minNumberOfLines; -@synthesize maxNumberOfLines = _maxNumberOfLines; -@synthesize editing = _editing; -@synthesize autoresizesToText = _autoresizesToText; -@synthesize showsExtraLine = _showsExtraLine; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - _internal = [[TTTextEditorInternal alloc] initWithTextEditor:self]; - _autoresizesToText = YES; - - _textField = [[UITextField alloc] init]; - _textField.delegate = _internal; - [self addSubview:_textField]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_internal); - TT_RELEASE_SAFELY(_textField); - TT_RELEASE_SAFELY(_textView); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIResponder*)activeTextField { - if (_textView && !_textView.hidden) { - return _textView; - - } else { - return _textField; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)createTextView { - if (!_textView) { - _textView = [[TTTextView alloc] init]; - _textView.delegate = _internal; - _textView.editable = YES; - _textView.backgroundColor = [UIColor clearColor]; - _textView.scrollsToTop = NO; - _textView.showsHorizontalScrollIndicator = NO; - // UITextViews have extra padding on the top and bottom that we don't want, so we force - // the content to take up slightly more space. This allows us to mimic the padding of the - // UITextLabel control. - _textView.contentInset = UIEdgeInsetsMake( - -kUITextViewVerticalPadding, 0, - -kUITextViewVerticalPadding, 0); - _textView.font = _textField.font; - _textView.autoresizesToText = _autoresizesToText; - _textView.textColor = _textField.textColor; - _textView.autocapitalizationType = _textField.autocapitalizationType; - _textView.autocorrectionType = _textField.autocorrectionType; - _textView.enablesReturnKeyAutomatically = _textField.enablesReturnKeyAutomatically; - _textView.keyboardAppearance = _textField.keyboardAppearance; - _textView.keyboardType = _textField.keyboardType; - _textView.returnKeyType = _textField.returnKeyType; - _textView.secureTextEntry = _textField.secureTextEntry; - [self addSubview:_textView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)heightThatFits:(BOOL*)overflowed numberOfLines:(NSInteger*)numberOfLines { - CGFloat ttLineHeight = self.font.ttLineHeight; - CGFloat minHeight = _minNumberOfLines * ttLineHeight; - CGFloat maxHeight = _maxNumberOfLines * ttLineHeight; - CGFloat maxWidth = self.width - kTextViewInset; - - NSString* text = _textField.hidden ? _textView.text : _textField.text; - if (!text.length) { - text = @"M"; - } - - CGSize textSize = [text sizeWithFont:self.font - constrainedToSize:CGSizeMake(maxWidth, CGFLOAT_MAX) - lineBreakMode:UILineBreakModeWordWrap]; - - CGFloat newHeight = textSize.height; - if ([text characterAtIndex:text.length-1] == 10) { - newHeight += ttLineHeight; - } - if (_showsExtraLine) { - newHeight += ttLineHeight; - } - - if (overflowed) { - *overflowed = maxHeight && newHeight > maxHeight; - } - - if (numberOfLines) { - *numberOfLines = floor(newHeight / ttLineHeight); - } - - if (newHeight < minHeight) { - newHeight = minHeight; - } - if (maxHeight && newHeight > maxHeight) { - newHeight = maxHeight; - } - - return newHeight + kPaddingY*2; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)stopIgnoringBeginAndEnd { - _internal.ignoreBeginAndEnd = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)constrainToText { - NSInteger numberOfLines = 0; - CGFloat oldHeight = self.height; - CGFloat newHeight = [self heightThatFits:&_overflowed numberOfLines:&numberOfLines]; - CGFloat diff = newHeight - oldHeight; - - if (numberOfLines > 1 && !_textField.hidden) { - [self createTextView]; - _textField.hidden = YES; - _textView.hidden = NO; - _textView.text = _textField.text; - _internal.ignoreBeginAndEnd = YES; - [_textView becomeFirstResponder]; - [self performSelector:@selector(stopIgnoringBeginAndEnd) withObject:nil afterDelay:0]; - - } else if (numberOfLines == 1 && _textField.hidden) { - _textField.hidden = NO; - _textView.hidden = YES; - _textField.text = _textView.text; - _internal.ignoreBeginAndEnd = YES; - [_textField becomeFirstResponder]; - [self performSelector:@selector(stopIgnoringBeginAndEnd) withObject:nil afterDelay:0]; - } - - _textView.overflowed = _overflowed; - _textView.scrollEnabled = _overflowed; - - if (oldHeight && diff) { - if ([_delegate respondsToSelector:@selector(textEditor:shouldResizeBy:)]) { - if (![_delegate textEditor:self shouldResizeBy:diff]) { - return; - } - } - - self.frame = TTRectContract(self.frame, 0, -diff); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didBeginEditing { - _editing = YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didEndEditing { - _editing = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didChangeText:(BOOL)insertReturn { - if (insertReturn) { - [self createTextView]; - _textField.hidden = YES; - _textView.hidden = NO; - _textView.text = [_textField.text stringByAppendingString:@"\n"]; - _internal.ignoreBeginAndEnd = YES; - [_textView becomeFirstResponder]; - [self performSelector:@selector(stopIgnoringBeginAndEnd) withObject:nil afterDelay:0]; - } - if (_autoresizesToText) { - [self constrainToText]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIResponder - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isFirstResponder { - return [[self activeTextField] isFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canBecomeFirstResponder { - return [[self activeTextField] canBecomeFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)becomeFirstResponder { - return [[self activeTextField] becomeFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)resignFirstResponder { - return [[self activeTextField] resignFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - CGRect frame = CGRectMake(0, 2, self.width-kPaddingX*2, self.height); - _textView.frame = CGRectOffset(TTRectContract(frame, 0, 14), 0, 7); - _textField.frame = CGRectOffset(TTRectContract(frame, 9, 14), 9, 7); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - CGFloat height = [self heightThatFits:nil numberOfLines:nil]; - return CGSizeMake(size.width, height); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITextInputTraits - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITextAutocapitalizationType)autocapitalizationType { - return _textField.autocapitalizationType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setAutocapitalizationType:(UITextAutocapitalizationType)autocapitalizationType { - _textField.autocapitalizationType = autocapitalizationType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UITextAutocorrectionType)autocorrectionType { - return _textField.autocorrectionType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setAutocorrectionType:(UITextAutocorrectionType)autocorrectionType { - _textField.autocorrectionType = autocorrectionType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)enablesReturnKeyAutomatically { - return _textField.enablesReturnKeyAutomatically; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setEnablesReturnKeyAutomatically:(BOOL)enablesReturnKeyAutomatically { - _textField.enablesReturnKeyAutomatically = enablesReturnKeyAutomatically; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIKeyboardAppearance)keyboardAppearance { - return _textField.keyboardAppearance; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setKeyboardAppearance:(UIKeyboardAppearance)keyboardAppearance { - _textField.keyboardAppearance = keyboardAppearance; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIKeyboardType)keyboardType { - return _textField.keyboardType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setKeyboardType:(UIKeyboardType)keyboardType { - _textField.keyboardType = keyboardType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIReturnKeyType)returnKeyType { - return _textField.returnKeyType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setReturnKeyType:(UIReturnKeyType)returnKeyType { - _textField.returnKeyType = returnKeyType; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)secureTextEntry { - return _textField.secureTextEntry; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSecureTextEntry:(BOOL)secureTextEntry { - _textField.secureTextEntry = secureTextEntry; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDelegate:(id)delegate { - _delegate = delegate; - _internal.delegate = delegate; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)text { - if (_textView && !_textView.hidden) { - return _textView.text; - - } else { - return _textField.text; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setText:(NSString*)text { - _textField.text = _textView.text = text; - if (_autoresizesToText) { - [self constrainToText]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)placeholder { - return _textField.placeholder; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPlaceholder:(NSString*)placeholder { - _textField.placeholder = placeholder; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setAutoresizesToText:(BOOL)autoresizesToText { - _autoresizesToText = autoresizesToText; - _textView.autoresizesToText = _autoresizesToText; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return _textField.font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFont:(UIFont*)font { - _textField.font = font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)textColor { - return _textField.textColor; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTextColor:(UIColor*)textColor { - _textField.textColor = textColor; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollContainerToCursor:(UIScrollView*)scrollView { - if (_textView.hasText) { - if (scrollView.contentSize.height > scrollView.height) { - NSRange range = _textView.selectedRange; - if (range.location == _textView.text.length) { - [scrollView scrollRectToVisible:CGRectMake(0,scrollView.contentSize.height-1,1,1) - animated:NO]; - } - - } else { - [scrollView scrollRectToVisible:CGRectMake(0,0,1,1) animated:NO]; - } - } -} - - -@end diff --git a/src/Three20UI/Sources/TTTextEditorInternal.m b/src/Three20UI/Sources/TTTextEditorInternal.m deleted file mode 100644 index a082c5114b..0000000000 --- a/src/Three20UI/Sources/TTTextEditorInternal.m +++ /dev/null @@ -1,226 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTTextEditorInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/TTTextEditorDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -TT_FIX_CATEGORY_BUG(TTTextEditorInternal) - -@implementation TTTextEditorInternal - -@synthesize ignoreBeginAndEnd = _ignoreBeginAndEnd; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTextEditor:(TTTextEditor*)textEditor { - if (self = [super init]) { - _textEditor = textEditor; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITextViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textViewShouldBeginEditing:(UITextView *)textView { - if (!_ignoreBeginAndEnd - && [_delegate respondsToSelector:@selector(textEditorShouldBeginEditing:)]) { - return [_delegate textEditorShouldBeginEditing:_textEditor]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textViewShouldEndEditing:(UITextView *)textView { - if (!_ignoreBeginAndEnd - && [_delegate respondsToSelector:@selector(textEditorShouldEndEditing:)]) { - return [_delegate textEditorShouldEndEditing:_textEditor]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textViewDidBeginEditing:(UITextView *)textView { - if (!_ignoreBeginAndEnd) { - [_textEditor performSelector:@selector(didBeginEditing)]; - - if ([_delegate respondsToSelector:@selector(textEditorDidBeginEditing:)]) { - [_delegate textEditorDidBeginEditing:_textEditor]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textViewDidEndEditing:(UITextView *)textView { - if (!_ignoreBeginAndEnd) { - [_textEditor performSelector:@selector(didEndEditing)]; - - if ([_delegate respondsToSelector:@selector(textEditorDidEndEditing:)]) { - [_delegate textEditorDidEndEditing:_textEditor]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range - replacementText:(NSString *)text { - if ([text isEqualToString:@"\n"]) { - if ([_delegate respondsToSelector:@selector(textEditorShouldReturn:)]) { - if (![_delegate performSelector:@selector(textEditorShouldReturn:) withObject:_textEditor]) { - return NO; - } - } - } - - if ([_delegate respondsToSelector: - @selector(textEditor:shouldChangeTextInRange:replacementText:)]) { - return [_delegate textEditor:_textEditor shouldChangeTextInRange:range replacementText:text]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textViewDidChange:(UITextView *)textView { - [_textEditor performSelector:@selector(didChangeText:) withObject:NO]; - - if ([_delegate respondsToSelector:@selector(textEditorDidChange:)]) { - [_delegate textEditorDidChange:_textEditor]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textViewDidChangeSelection:(UITextView *)textView { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITextFieldDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textFieldShouldBeginEditing:(UITextField*)textField { - if (!_ignoreBeginAndEnd - && [_delegate respondsToSelector:@selector(textEditorShouldBeginEditing:)]) { - return [_delegate textEditorShouldBeginEditing:_textEditor]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textFieldShouldEndEditing:(UITextField*)textField { - if (!_ignoreBeginAndEnd - && [_delegate respondsToSelector:@selector(textEditorShouldEndEditing:)]) { - return [_delegate textEditorShouldEndEditing:_textEditor]; - - } else { - return YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textFieldDidBeginEditing:(UITextField*)textField { - if (!_ignoreBeginAndEnd) { - [_textEditor performSelector:@selector(didBeginEditing)]; - - if ([_delegate respondsToSelector:@selector(textEditorDidBeginEditing:)]) { - [_delegate textEditorDidBeginEditing:_textEditor]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)textFieldDidEndEditing:(UITextField*)textField { - if (!_ignoreBeginAndEnd) { - [_textEditor performSelector:@selector(didEndEditing)]; - - if ([_delegate respondsToSelector:@selector(textEditorDidEndEditing:)]) { - [_delegate textEditorDidEndEditing:_textEditor]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL) textField: (UITextField*)textField - shouldChangeCharactersInRange: (NSRange)range - replacementString: (NSString*)string { - BOOL shouldChange = YES; - if ([_delegate respondsToSelector: - @selector(textEditor:shouldChangeTextInRange:replacementText:)]) { - shouldChange = [_delegate textEditor:_textEditor shouldChangeTextInRange:range - replacementText:string]; - } - - if (shouldChange) { - [self performSelector:@selector(textViewDidChange:) withObject:nil afterDelay:0]; - } - return shouldChange; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)textFieldShouldReturn:(UITextField *)textField { - if ([_delegate respondsToSelector:@selector(textEditorShouldReturn:)]) { - if (![_delegate performSelector:@selector(textEditorShouldReturn:) withObject:_textEditor]) { - return NO; - } - } - - [_textEditor performSelector:@selector(didChangeText:) withObject:(id)YES]; - - if ([_delegate respondsToSelector:@selector(textEditorDidChange:)]) { - [_delegate textEditorDidChange:_textEditor]; - } - return YES; -} - - -@end diff --git a/src/Three20UI/Sources/TTTextView.m b/src/Three20UI/Sources/TTTextView.m deleted file mode 100644 index 9febd5e6fe..0000000000 --- a/src/Three20UI/Sources/TTTextView.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/private/TTTextView.h" - -// UI -#import "Three20UI/UIViewAdditions.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTTextView - -@synthesize autoresizesToText = _autoresizesToText; -@synthesize overflowed = _overflowed; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setContentOffset:(CGPoint)offset animated:(BOOL)animated { - if (_autoresizesToText) { - if (!_overflowed) { - // In autosizing mode, we don't ever allow the text view to scroll past zero - // unless it has past its maximum number of lines - [super setContentOffset:CGPointZero animated:animated]; - - } else { - // If there is an overflow, we force the text view to keep the cursor at the bottom of the - // view. - [super setContentOffset: CGPointMake(offset.x, self.contentSize.height - self.height) - animated: animated]; - } - - } else { - [super setContentOffset:offset animated:animated]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTThumbView.m b/src/Three20UI/Sources/TTThumbView.m deleted file mode 100644 index 004d7240e3..0000000000 --- a/src/Three20UI/Sources/TTThumbView.m +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTThumbView.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTThumbView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.backgroundColor = TTSTYLEVAR(thumbnailBackgroundColor); - self.clipsToBounds = YES; - - [self setStylesWithSelector:@"thumbView:"]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)thumbURL { - return [self imageForState:UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setThumbURL:(NSString*)URL { - [self setImage:URL forState:UIControlStateNormal]; -} - - -@end diff --git a/src/Three20UI/Sources/TTThumbsDataSource.m b/src/Three20UI/Sources/TTThumbsDataSource.m deleted file mode 100644 index b865834822..0000000000 --- a/src/Three20UI/Sources/TTThumbsDataSource.m +++ /dev/null @@ -1,210 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTThumbsDataSource.h" - -// UI -#import "Three20UI/TTPhotoSource.h" -#import "Three20UI/TTTableMoreButton.h" -#import "Three20UI/TTThumbsTableViewCell.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// Network -#import "Three20Network/TTGlobalNetwork.h" -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTGlobalCoreLocale.h" -#import "Three20Core/TTCorePreprocessorMacros.h" - -static CGFloat kThumbSize = 75; -static CGFloat kThumbSpacing = 4; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTThumbsDataSource - -@synthesize photoSource = _photoSource; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithPhotoSource:(id)photoSource - delegate:(id)delegate { - if (self = [super init]) { - _photoSource = [photoSource retain]; - _delegate = delegate; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_photoSource); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)hasMoreToLoad { - return _photoSource.maxPhotoIndex+1 < _photoSource.numberOfPhotos; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)columnCountForView:(UIView *)view { - CGFloat width = view.bounds.size.width; - return floorf((width - kThumbSpacing*2) / (kThumbSize+kThumbSpacing) + 0.1); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { - NSInteger maxIndex = _photoSource.maxPhotoIndex; - NSInteger columnCount = [self columnCountForView:tableView]; - if (maxIndex >= 0) { - maxIndex += 1; - NSInteger count = ceil((maxIndex / columnCount) + (maxIndex % columnCount ? 1 : 0)); - if (self.hasMoreToLoad) { - return count + 1; - - } else { - return count; - } - - } else { - return 0; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewDataSource - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)model { - return _photoSource; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)tableView:(UITableView*)tableView objectForRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.row == [tableView numberOfRowsInSection:0]-1 && self.hasMoreToLoad) { - NSString* text = TTLocalizedString(@"Load More Photos...", @""); - NSString* caption = nil; - if (_photoSource.numberOfPhotos == -1) { - caption = [NSString stringWithFormat:TTLocalizedString(@"Showing %@ Photos", @""), - TTFormatInteger(_photoSource.maxPhotoIndex+1)]; - - } else { - caption = [NSString stringWithFormat:TTLocalizedString(@"Showing %@ of %@ Photos", @""), - TTFormatInteger(_photoSource.maxPhotoIndex+1), - TTFormatInteger(_photoSource.numberOfPhotos)]; - } - - return [TTTableMoreButton itemWithText:text subtitle:caption]; - - } else { - NSInteger columnCount = [self columnCountForView:tableView]; - return [_photoSource photoAtIndex:indexPath.row * columnCount]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (Class)tableView:(UITableView*)tableView cellClassForObject:(id)object { - if ([object conformsToProtocol:@protocol(TTPhoto)]) { - return [TTThumbsTableViewCell class]; - - } else { - return [super tableView:tableView cellClassForObject:object]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) tableView: (UITableView*)tableView - cell: (UITableViewCell*)cell - willAppearAtIndexPath: (NSIndexPath*)indexPath { - if ([cell isKindOfClass:[TTThumbsTableViewCell class]]) { - TTThumbsTableViewCell* thumbsCell = (TTThumbsTableViewCell*)cell; - thumbsCell.delegate = _delegate; - thumbsCell.columnCount = [self columnCountForView:tableView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSIndexPath*)tableView:(UITableView*)tableView willInsertObject:(id)object - atIndexPath:(NSIndexPath*)indexPath { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSIndexPath*)tableView:(UITableView*)tableView willRemoveObject:(id)object - atIndexPath:(NSIndexPath*)indexPath { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)titleForEmpty { - return TTLocalizedString(@"No Photos", @""); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)subtitleForEmpty { - return TTLocalizedString(@"This photo set contains no photos.", @""); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIImage*)imageForError:(NSError*)error { - return TTIMAGE(@"bundle://Three20.bundle/images/photoDefault.png"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)subtitleForError:(NSError*)error { - return TTLocalizedString(@"Unable to load this photo set.", @""); -} - - -@end diff --git a/src/Three20UI/Sources/TTThumbsTableViewCell.m b/src/Three20UI/Sources/TTThumbsTableViewCell.m deleted file mode 100644 index 29f3318a77..0000000000 --- a/src/Three20UI/Sources/TTThumbsTableViewCell.m +++ /dev/null @@ -1,216 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTThumbsTableViewCell.h" - -// UI -#import "Three20UI/TTThumbView.h" -#import "Three20UI/TTThumbsTableViewCellDelegate.h" -#import "Three20UI/TTPhotoVersion.h" -#import "Three20UI/TTPhotoSource.h" -#import "Three20UI/TTPhoto.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static const CGFloat kSpacing = 4; -static const CGFloat kDefaultThumbSize = 75; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTThumbsTableViewCell - -@synthesize photo = _photo; -@synthesize thumbSize = _thumbSize; -@synthesize thumbOrigin = _thumbOrigin; -@synthesize columnCount = _columnCount; -@synthesize delegate = _delegate; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)identifier { - if (self = [super initWithStyle:style reuseIdentifier:identifier]) { - _thumbViews = [[NSMutableArray alloc] init]; - _thumbSize = kDefaultThumbSize; - _thumbOrigin = CGPointMake(kSpacing, 0); - - self.accessoryType = UITableViewCellAccessoryNone; - self.selectionStyle = UITableViewCellSelectionStyleNone; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_photo); - TT_RELEASE_SAFELY(_thumbViews); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)assignPhotoAtIndex:(int)photoIndex toView:(TTThumbView*)thumbView { - id photo = [_photo.photoSource photoAtIndex:photoIndex]; - if (photo) { - thumbView.thumbURL = [photo URLForVersion:TTPhotoVersionThumbnail]; - thumbView.hidden = NO; - - } else { - thumbView.thumbURL = nil; - thumbView.hidden = YES; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)thumbTouched:(TTThumbView*)thumbView { - NSUInteger thumbViewIndex = [_thumbViews indexOfObject:thumbView]; - NSInteger offsetIndex = _photo.index + thumbViewIndex; - - id photo = [_photo.photoSource photoAtIndex:offsetIndex]; - [_delegate thumbsTableViewCell:self didSelectPhoto:photo]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutThumbViews { - CGRect thumbFrame = CGRectMake(self.thumbOrigin.x, self.thumbOrigin.y, - self.thumbSize, self.thumbSize); - - for (TTThumbView* thumbView in _thumbViews) { - thumbView.frame = thumbFrame; - thumbFrame.origin.x += kSpacing + self.thumbSize; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [super layoutSubviews]; - [self layoutThumbViews]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewCell - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)object { - return _photo; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object { - [self setPhoto:object]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setThumbSize:(CGFloat)thumbSize { - _thumbSize = thumbSize; - [self setNeedsLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setThumbOrigin:(CGPoint)thumbOrigin { - _thumbOrigin = thumbOrigin; - [self setNeedsLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setColumnCount:(NSInteger)columnCount { - if (_columnCount != columnCount) { - for (TTThumbView* thumbView in _thumbViews) { - [thumbView removeFromSuperview]; - } - [_thumbViews removeAllObjects]; - - _columnCount = columnCount; - - for (NSInteger i = _thumbViews.count; i < _columnCount; ++i) { - TTThumbView* thumbView = [[[TTThumbView alloc] init] autorelease]; - [thumbView addTarget:self action:@selector(thumbTouched:) - forControlEvents:UIControlEventTouchUpInside]; - [self.contentView addSubview:thumbView]; - [_thumbViews addObject:thumbView]; - if (_photo) { - [self assignPhotoAtIndex:_photo.index+i toView:thumbView]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPhoto:(id)photo { - if (_photo != photo) { - [_photo release]; - _photo = [photo retain]; - - if (!_photo) { - for (TTThumbView* thumbView in _thumbViews) { - thumbView.thumbURL = nil; - } - return; - } - - NSInteger i = 0; - for (TTThumbView* thumbView in _thumbViews) { - [self assignPhotoAtIndex:_photo.index+i toView:thumbView]; - ++i; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)suspendLoading:(BOOL)suspended { - for (TTThumbView* thumbView in _thumbViews) { - [thumbView suspendLoadingImages:suspended]; - } -} - - -@end diff --git a/src/Three20UI/Sources/TTThumbsViewController.m b/src/Three20UI/Sources/TTThumbsViewController.m deleted file mode 100644 index baa6971fe4..0000000000 --- a/src/Three20UI/Sources/TTThumbsViewController.m +++ /dev/null @@ -1,325 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTThumbsViewController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTThumbsDataSource.h" -#import "Three20UI/TTThumbsTableViewCell.h" -#import "Three20UI/TTPhoto.h" -#import "Three20UI/TTPhotoSource.h" -#import "Three20UI/TTPhotoViewController.h" -#import "Three20UI/UIViewAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" - -// Core -#import "Three20Core/TTGlobalCoreLocale.h" -#import "Three20Core/TTGlobalCoreRects.h" -#import "Three20Core/TTCorePreprocessorMacros.h" - -static CGFloat kThumbnailRowHeight = 79; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTThumbsViewController - -@synthesize delegate = _delegate; -@synthesize photoSource = _photoSource; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.statusBarStyle = UIStatusBarStyleBlackTranslucent; - self.navigationBarStyle = UIBarStyleBlackTranslucent; - self.navigationBarTintColor = nil; - self.wantsFullScreenLayout = YES; - self.hidesBottomBarWhenPushed = YES; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithDelegate:(id)delegate { - if (self = [self initWithNibName:nil bundle:nil]) { - self.delegate = delegate; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithQuery:(NSDictionary*)query { - id delegate = [query objectForKey:@"delegate"]; - if (nil != delegate) { - self = [self initWithDelegate:delegate]; - - } else { - self = [self initWithNibName:nil bundle:nil]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNibName:nil bundle:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [_photoSource.delegates removeObject:self]; - TT_RELEASE_SAFELY(_photoSource); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)suspendLoadingThumbnails:(BOOL)suspended { - if (_photoSource.maxPhotoIndex >= 0) { - NSArray* cells = _tableView.visibleCells; - for (int i = 0; i < cells.count; ++i) { - TTThumbsTableViewCell* cell = [cells objectAtIndex:i]; - if ([cell isKindOfClass:[TTThumbsTableViewCell class]]) { - [cell suspendLoading:suspended]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateTableLayout { - self.tableView.contentInset = UIEdgeInsetsMake(TTBarsHeight()+4, 0, 0, 0); - self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(TTBarsHeight(), 0, 0, 0); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)URLForPhoto:(id)photo { - if ([photo respondsToSelector:@selector(URLValueWithName:)]) { - return [photo URLValueWithName:@"TTPhotoViewController"]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - [super loadView]; - - self.tableView.rowHeight = kThumbnailRowHeight; - self.tableView.autoresizingMask = - UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - self.tableView.backgroundColor = TTSTYLEVAR(backgroundColor); - self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; - [self updateTableLayout]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - [self suspendLoadingThumbnails:NO]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidDisappear:(BOOL)animated { - [self suspendLoadingThumbnails:YES]; - [super viewDidDisappear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return TTIsSupportedOrientation(interfaceOrientation); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [self updateTableLayout]; - [self.tableView reloadData]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - NSString* delegate = [[TTNavigator navigator] pathForObject:_delegate]; - if (delegate) { - [state setObject:delegate forKey:@"delegate"]; - } - return [super persistView:state]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreView:(NSDictionary*)state { - [super restoreView:state]; - NSString* delegate = [state objectForKey:@"delegate"]; - if (delegate) { - self.delegate = [[TTNavigator navigator] objectForPath:delegate]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setDelegate:(id)delegate { - _delegate = delegate; - - if (_delegate) { - self.navigationItem.leftBarButtonItem = - [[[UIBarButtonItem alloc] initWithCustomView:[[[UIView alloc] init] - autorelease]] - autorelease]; - self.navigationItem.rightBarButtonItem = - [[[UIBarButtonItem alloc] initWithTitle:TTLocalizedString(@"Done", @"") - style:UIBarButtonItemStyleBordered - target:self - action:@selector(removeFromSupercontroller)] autorelease]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTModelViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didRefreshModel { - [super didRefreshModel]; - self.title = _photoSource.title; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTTableViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)rectForOverlayView { - return TTRectContract(CGRectOffset([super rectForOverlayView], 0, TTBarsHeight()-_tableView.top), - 0, TTBarsHeight()); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTThumbsTableViewCellDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)thumbsTableViewCell:(TTThumbsTableViewCell*)cell didSelectPhoto:(id)photo { - [_delegate thumbsViewController:self didSelectPhoto:photo]; - - BOOL shouldNavigate = YES; - if ([_delegate respondsToSelector:@selector(thumbsViewController:shouldNavigateToPhoto:)]) { - shouldNavigate = [_delegate thumbsViewController:self shouldNavigateToPhoto:photo]; - } - - if (shouldNavigate) { - NSString* URL = [self URLForPhoto:photo]; - if (URL) { - TTOpenURLFromView(URL, self.view); - - } else { - TTPhotoViewController* controller = [self createPhotoViewController]; - controller.centerPhoto = photo; - [self.navigationController pushViewController:controller animated:YES]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPhotoSource:(id)photoSource { - if (photoSource != _photoSource) { - [_photoSource release]; - _photoSource = [photoSource retain]; - - self.title = _photoSource.title; - self.dataSource = [self createDataSource]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTPhotoViewController*)createPhotoViewController { - return [[[TTPhotoViewController alloc] init] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)createDataSource { - return [[[TTThumbsDataSource alloc] initWithPhotoSource:_photoSource delegate:self] autorelease]; -} - - -@end diff --git a/src/Three20UI/Sources/TTUnclippedView.m b/src/Three20UI/Sources/TTUnclippedView.m deleted file mode 100644 index 36c84c0f1d..0000000000 --- a/src/Three20UI/Sources/TTUnclippedView.m +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTUnclippedView.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTUnclippedView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didMoveToSuperview { - for (UIView* p = self; p; p = p.superview) { - // This allows the view to be shown "full screen", and not offset by the toolbar and status bar - p.clipsToBounds = NO; - //p.backgroundColor = self.backgroundColor; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFrame:(CGRect)rect { - [super setFrame:rect]; -} - -@end diff --git a/src/Three20UI/Sources/TTView.m b/src/Three20UI/Sources/TTView.m deleted file mode 100644 index 56c424be08..0000000000 --- a/src/Three20UI/Sources/TTView.m +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTView.h" - -// Style -#import "Three20Style/TTStyleContext.h" -#import "Three20Style/TTStyle.h" -#import "Three20Style/TTLayout.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTView - -@synthesize style = _style; -@synthesize layout = _layout; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - self.contentMode = UIViewContentModeRedraw; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_style); - TT_RELEASE_SAFELY(_layout); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawRect:(CGRect)rect { - TTStyle* style = self.style; - if (nil != style) { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - context.frame = self.bounds; - context.contentFrame = context.frame; - - [style draw:context]; - if (!context.didDrawContent) { - [self drawContent:self.bounds]; - } - - } else { - [self drawContent:self.bounds]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - TTLayout* layout = self.layout; - if (nil != layout) { - [layout layoutSubviews:self.subviews forView:self]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)sizeThatFits:(CGSize)size { - TTStyleContext* context = [[[TTStyleContext alloc] init] autorelease]; - context.delegate = self; - context.font = nil; - return [_style addToSize:CGSizeZero context:context]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setStyle:(TTStyle*)style { - if (style != _style) { - [_style release]; - _style = [style retain]; - - [self setNeedsDisplay]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)drawContent:(CGRect)rect { -} - - -@end diff --git a/src/Three20UI/Sources/TTViewController.m b/src/Three20UI/Sources/TTViewController.m deleted file mode 100644 index 4bc03e96d7..0000000000 --- a/src/Three20UI/Sources/TTViewController.m +++ /dev/null @@ -1,169 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTViewController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTTableViewController.h" -#import "Three20UI/TTSearchDisplayController.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" -#import "Three20UINavigator/UIViewController+TTNavigator.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyleSheet.h" - -// Network -#import "Three20Network/TTURLRequestQueue.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.navigationBarTintColor = TTSTYLEVAR(navigationBarTintColor); - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNibName:nil bundle:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[TTURLRequestQueue mainQueue] cancelRequestsWithDelegate:self]; - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - if (nil != self.nibName) { - [super loadView]; - - } else { - CGRect frame = self.wantsFullScreenLayout ? TTScreenBounds() : TTNavigationFrame(); - self.view = [[[UIView alloc] initWithFrame:frame] autorelease]; - self.view.autoresizesSubviews = YES; - self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - self.view.backgroundColor = TTSTYLEVAR(backgroundColor); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidUnload { - [super viewDidUnload]; - TT_RELEASE_SAFELY(_searchController); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - [TTURLRequestQueue mainQueue].suspended = YES; - - // Ugly hack to work around UISearchBar's inability to resize its text field - // to avoid being overlapped by the table section index -// if (_searchController && !_searchController.active) { -// [_searchController setActive:YES animated:NO]; -// [_searchController setActive:NO animated:NO]; -// } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - - [TTURLRequestQueue mainQueue].suspended = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTTableViewController*)searchViewController { - return _searchController.searchResultsViewController; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSearchViewController:(TTTableViewController*)searchViewController { - if (searchViewController) { - if (nil == _searchController) { - UISearchBar* searchBar = [[[UISearchBar alloc] init] autorelease]; - [searchBar sizeToFit]; - - _searchController = [[TTSearchDisplayController alloc] initWithSearchBar:searchBar - contentsController:self]; - } - - searchViewController.superController = self; - _searchController.searchResultsViewController = searchViewController; - - } else { - _searchController.searchResultsViewController = nil; - TT_RELEASE_SAFELY(_searchController); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)doGarbageCollection { - [UIViewController doNavigatorGarbageCollection]; - [UIViewController doCommonGarbageCollection]; -} - - -@end diff --git a/src/Three20UI/Sources/TTWebController.m b/src/Three20UI/Sources/TTWebController.m deleted file mode 100644 index 9947b27ebb..0000000000 --- a/src/Three20UI/Sources/TTWebController.m +++ /dev/null @@ -1,430 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTWebController.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/UIViewAdditions.h" -#import "Three20UI/UIToolbarAdditions.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" -#import "Three20UINavigator/TTURLMap.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTDefaultStyleSheet.h" -#import "Three20Style/TTStyleSheet.h" - -// Network -#import "Three20Network/TTGlobalNetwork.h" -#import "Three20Network/TTURLCache.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCoreLocale.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTWebController - -@synthesize delegate = _delegate; -@synthesize headerView = _headerView; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - self.hidesBottomBarWhenPushed = YES; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNavigatorURL:(NSURL*)URL query:(NSDictionary*)query { - if (self = [self initWithNibName:nil bundle:nil]) { - NSURLRequest* request = [query objectForKey:@"request"]; - if (nil != request) { - [self openRequest:request]; - - } else { - [self openURL:URL]; - } - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNibName:nil bundle:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_loadingURL); - TT_RELEASE_SAFELY(_headerView); - TT_RELEASE_SAFELY(_actionSheet); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)backAction { - [_webView goBack]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)forwardAction { - [_webView goForward]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)refreshAction { - [_webView reload]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)stopAction { - [_webView stopLoading]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)shareAction { - if (nil == _actionSheet) { - _actionSheet = [[UIActionSheet alloc] initWithTitle:nil - delegate:self - cancelButtonTitle:TTLocalizedString(@"Cancel", @"") - destructiveButtonTitle:nil - otherButtonTitles:TTLocalizedString(@"Open in Safari", @""), - nil]; - if (TTIsPad()) { - [_actionSheet showFromBarButtonItem:_actionButton animated:YES]; - - } else { - [_actionSheet showInView: self.view]; - } - - } else { - [_actionSheet dismissWithClickedButtonIndex:-1 animated:YES]; - TT_RELEASE_SAFELY(_actionSheet); - } - -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)updateToolbarWithOrientation:(UIInterfaceOrientation)interfaceOrientation { - _toolbar.height = TTToolbarHeight(); - _webView.height = self.view.height - _toolbar.height; - _toolbar.top = self.view.height - _toolbar.height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)loadView { - [super loadView]; - - _webView = [[UIWebView alloc] initWithFrame:TTToolbarNavigationFrame()]; - _webView.delegate = self; - _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth - | UIViewAutoresizingFlexibleHeight; - _webView.scalesPageToFit = YES; - [self.view addSubview:_webView]; - - UIActivityIndicatorView* spinner = - [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: - UIActivityIndicatorViewStyleWhite] autorelease]; - [spinner startAnimating]; - _activityItem = [[UIBarButtonItem alloc] initWithCustomView:spinner]; - - _backButton = - [[UIBarButtonItem alloc] initWithImage:TTIMAGE(@"bundle://Three20.bundle/images/backIcon.png") - style:UIBarButtonItemStylePlain - target:self - action:@selector(backAction)]; - _backButton.tag = 2; - _backButton.enabled = NO; - _forwardButton = - [[UIBarButtonItem alloc] initWithImage: - TTIMAGE(@"bundle://Three20.bundle/images/forwardIcon.png") - style:UIBarButtonItemStylePlain - target:self - action:@selector(forwardAction)]; - _forwardButton.tag = 1; - _forwardButton.enabled = NO; - _refreshButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: - UIBarButtonSystemItemRefresh target:self action:@selector(refreshAction)]; - _refreshButton.tag = 3; - _stopButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: - UIBarButtonSystemItemStop target:self action:@selector(stopAction)]; - _stopButton.tag = 3; - _actionButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: - UIBarButtonSystemItemAction target:self action:@selector(shareAction)]; - - UIBarItem* space = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem: - UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease]; - - _toolbar = [[UIToolbar alloc] initWithFrame: - CGRectMake(0, self.view.height - TTToolbarHeight(), - self.view.width, TTToolbarHeight())]; - _toolbar.autoresizingMask = - UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth; - _toolbar.tintColor = TTSTYLEVAR(toolbarTintColor); - _toolbar.items = [NSArray arrayWithObjects: - _backButton, - space, - _forwardButton, - space, - _refreshButton, - space, - _actionButton, - nil]; - [self.view addSubview:_toolbar]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewDidUnload { - [super viewDidUnload]; - - _webView.delegate = nil; - - TT_RELEASE_SAFELY(_webView); - TT_RELEASE_SAFELY(_toolbar); - TT_RELEASE_SAFELY(_backButton); - TT_RELEASE_SAFELY(_forwardButton); - TT_RELEASE_SAFELY(_refreshButton); - TT_RELEASE_SAFELY(_stopButton); - TT_RELEASE_SAFELY(_actionButton); - TT_RELEASE_SAFELY(_activityItem); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - [self updateToolbarWithOrientation:self.interfaceOrientation]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillDisappear:(BOOL)animated { - // If the browser launched the media player, it steals the key window and never gives it - // back, so this is a way to try and fix that - [self.view.window makeKeyWindow]; - - [super viewWillDisappear:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return TTIsSupportedOrientation(interfaceOrientation); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation - duration:(NSTimeInterval)duration { - [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; - [self updateToolbarWithOrientation:toInterfaceOrientation]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)rotatingFooterView { - return _toolbar; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UTViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - NSString* URL = self.URL.absoluteString; - if (URL.length && ![URL isEqualToString:@"about:blank"]) { - [state setObject:URL forKey:@"URL"]; - return YES; - - } else { - return NO; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreView:(NSDictionary*)state { - NSString* URL = [state objectForKey:@"URL"]; - if (URL.length && ![URL isEqualToString:@"about:blank"]) { - [self openURL:[NSURL URLWithString:URL]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIWebViewDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request - navigationType:(UIWebViewNavigationType)navigationType { - if ([[TTNavigator navigator].URLMap isAppURL:request.URL]) { - [_loadingURL release]; - _loadingURL = [[NSURL URLWithString:@"about:blank"] retain]; - [[UIApplication sharedApplication] openURL:request.URL]; - return NO; - } - - [_loadingURL release]; - _loadingURL = [request.URL retain]; - _backButton.enabled = [_webView canGoBack]; - _forwardButton.enabled = [_webView canGoForward]; - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)webViewDidStartLoad:(UIWebView*)webView { - self.title = TTLocalizedString(@"Loading...", @""); - if (!self.navigationItem.rightBarButtonItem) { - [self.navigationItem setRightBarButtonItem:_activityItem animated:YES]; - } - [_toolbar replaceItemWithTag:3 withItem:_stopButton]; - _backButton.enabled = [_webView canGoBack]; - _forwardButton.enabled = [_webView canGoForward]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)webViewDidFinishLoad:(UIWebView*)webView { - TT_RELEASE_SAFELY(_loadingURL); - self.title = [_webView stringByEvaluatingJavaScriptFromString:@"document.title"]; - if (self.navigationItem.rightBarButtonItem == _activityItem) { - [self.navigationItem setRightBarButtonItem:nil animated:YES]; - } - [_toolbar replaceItemWithTag:3 withItem:_refreshButton]; - - _backButton.enabled = [_webView canGoBack]; - _forwardButton.enabled = [_webView canGoForward]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)webView:(UIWebView*)webView didFailLoadWithError:(NSError*)error { - TT_RELEASE_SAFELY(_loadingURL); - [self webViewDidFinishLoad:webView]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIActionSheetDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)actionSheet:(UIActionSheet*)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { - if (buttonIndex == 0) { - [[UIApplication sharedApplication] openURL:self.URL]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSURL*)URL { - return _loadingURL ? _loadingURL : _webView.request.URL; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHeaderView:(UIView*)headerView { - if (headerView != _headerView) { - BOOL addingHeader = !_headerView && headerView; - BOOL removingHeader = _headerView && !headerView; - - [_headerView removeFromSuperview]; - [_headerView release]; - _headerView = [headerView retain]; - _headerView.frame = CGRectMake(0, 0, _webView.width, _headerView.height); - - self.view; - UIView* scroller = [_webView descendantOrSelfWithClass:NSClassFromString(@"UIScroller")]; - UIView* docView = [scroller descendantOrSelfWithClass:NSClassFromString(@"UIWebDocumentView")]; - [scroller addSubview:_headerView]; - - if (addingHeader) { - docView.top += headerView.height; - docView.height -= headerView.height; - - } else if (removingHeader) { - docView.top -= headerView.height; - docView.height += headerView.height; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)openURL:(NSURL*)URL { - NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:URL]; - [self openRequest:request]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)openRequest:(NSURLRequest*)request { - self.view; - [_webView loadRequest:request]; -} - - -@end diff --git a/src/Three20UI/Sources/TTYouTubeView.m b/src/Three20UI/Sources/TTYouTubeView.m deleted file mode 100644 index c3881e4be6..0000000000 --- a/src/Three20UI/Sources/TTYouTubeView.m +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/TTYouTubeView.h" - -// UI -#import "Three20UI/UIViewAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -static CGFloat kDefaultWidth = 140; -static CGFloat kDefaultHeight = 105; - -static NSString* kEmbedHTML = @"\ -\ -\ -\ -\ -\ -
\ -\ -\ -
\ -\ -"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTYouTubeView - -@synthesize urlPath = _urlPath; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithURLPath:(NSString*)urlPath { - if (self = [self initWithFrame:CGRectMake(0, 0, kDefaultWidth, kDefaultHeight)]) { - self.urlPath = urlPath; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_urlPath); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)layoutSubviews { - [self stringByEvaluatingJavaScriptFromString: - [NSString stringWithFormat:@"yt.width = %0.0f; yt.height = %0.0f", self.width, self.height]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setUrlPath:(NSString*)urlPath { - NSString* newUrlPath = [urlPath copy]; - [_urlPath release]; - _urlPath = newUrlPath; - - if (nil != _urlPath) { - NSString* html = [NSString stringWithFormat:kEmbedHTML, self.width, self.width, - self.height, _urlPath, _urlPath, self.width, self.height]; - [self loadHTMLString:html baseURL:nil]; - - } else { - [self loadHTMLString:@" " baseURL:nil]; - } -} - - -@end diff --git a/src/Three20UI/Sources/UINSObjectAdditions.m b/src/Three20UI/Sources/UINSObjectAdditions.m deleted file mode 100644 index 6939013af8..0000000000 --- a/src/Three20UI/Sources/UINSObjectAdditions.m +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/UINSObjectAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/TTNavigator.h" - -// UINavigator -#import "Three20UINavigator/TTURLMap.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UINSObjectAdditions) - -@implementation NSObject (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)URLValue { - return [[TTNavigator navigator].URLMap URLForObject:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)URLValueWithName:(NSString*)name { - return [[TTNavigator navigator].URLMap URLForObject:self withName:name]; -} - - -@end diff --git a/src/Three20UI/Sources/UINSStringAdditions.m b/src/Three20UI/Sources/UINSStringAdditions.m deleted file mode 100644 index dba10446e7..0000000000 --- a/src/Three20UI/Sources/UINSStringAdditions.m +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -#import "Three20UI/UINSStringAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/TTNavigator.h" - -// UINavigator -#import "Three20UINavigator/TTURLAction.h" -#import "Three20UINavigator/TTURLMap.h" -#import "Three20UINavigator/TTURLObject.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UINSStringAdditions) - -@implementation NSString (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectValue { - return [[TTNavigator navigator].URLMap objectForURL:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)openURL { - [[TTNavigator navigator] openURLAction:[[TTURLAction actionWithURLPath: self] - applyAnimated: YES]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)openURLFromButton:(UIView*)button { - NSDictionary* query = [NSDictionary dictionaryWithObjectsAndKeys:button, @"__target__", nil]; - [[TTBaseNavigator navigatorForView:button] - openURLAction:[[[TTURLAction actionWithURLPath: self] - applyQuery: query] - applyAnimated: YES]]; -} - - -@end diff --git a/src/Three20UI/Sources/UINavigationControllerAdditions.m b/src/Three20UI/Sources/UINavigationControllerAdditions.m deleted file mode 100644 index 3192d5e893..0000000000 --- a/src/Three20UI/Sources/UINavigationControllerAdditions.m +++ /dev/null @@ -1,144 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/UINavigationControllerAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTNavigationController.h" - -// UINavigator -#import "Three20UINavigator/TTURLMap.h" -#import "Three20UINavigator/UIViewController+TTNavigator.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Network -#import "Three20Network/TTURLRequestQueue.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UINavigationControllerAdditions) - -@implementation UINavigationController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)rotatingHeaderView { - UIViewController* popup = [self popupViewController]; - if (popup) { - return [popup rotatingHeaderView]; - - } else { - return [super rotatingHeaderView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canContainControllers { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)topSubcontroller { - return self.topViewController; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addSubcontroller:(UIViewController*)controller animated:(BOOL)animated - transition:(UIViewAnimationTransition)transition { - if (animated && transition) { - if ([self isKindOfClass:[TTNavigationController class]]) { - [(TTNavigationController*)self pushViewController: controller - animatedWithTransition: transition]; - - } else { - [self pushViewController:controller animated:YES]; - } - - } else { - [self pushViewController:controller animated:animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)bringControllerToFront:(UIViewController*)controller animated:(BOOL)animated { - if ([self.viewControllers indexOfObject:controller] != NSNotFound - && controller != self.topViewController) { - [self popToViewController:controller animated:animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)keyForSubcontroller:(UIViewController*)controller { - NSInteger controllerIndex = [self.viewControllers indexOfObject:controller]; - if (controllerIndex != NSNotFound) { - return [NSNumber numberWithInt:controllerIndex].stringValue; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)subcontrollerForKey:(NSString*)key { - NSInteger controllerIndex = key.intValue; - if (controllerIndex < self.viewControllers.count) { - return [self.viewControllers objectAtIndex:controllerIndex]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)persistNavigationPath:(NSMutableArray*)path { - for (UIViewController* controller in self.viewControllers) { - [[TTNavigator navigator] persistController:controller path:path]; - } -} - - -@end diff --git a/src/Three20UI/Sources/UITabBarControllerAdditions.m b/src/Three20UI/Sources/UITabBarControllerAdditions.m deleted file mode 100644 index da13d3d182..0000000000 --- a/src/Three20UI/Sources/UITabBarControllerAdditions.m +++ /dev/null @@ -1,130 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/UITabBarControllerAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/TTNavigator.h" -#import "Three20UI/TTNavigationController.h" - -// UICommon -#import "Three20UICommon/UIViewControllerAdditions.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UITabBarControllerAdditions) - -@implementation UITabBarController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)rootControllerForController:(UIViewController*)controller { - if ([controller canContainControllers]) { - return controller; - - } else { - TTNavigationController* navController = [[[TTNavigationController alloc] init] autorelease]; - [navController pushViewController:controller animated:NO]; - return navController; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canContainControllers { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)topSubcontroller { - return self.selectedViewController; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addSubcontroller:(UIViewController*)controller animated:(BOOL)animated - transition:(UIViewAnimationTransition)transition { - self.selectedViewController = controller; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)bringControllerToFront:(UIViewController*)controller animated:(BOOL)animated { - self.selectedViewController = controller; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)keyForSubcontroller:(UIViewController*)controller { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)subcontrollerForKey:(NSString*)key { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)persistNavigationPath:(NSMutableArray*)path { - UIViewController* controller = self.selectedViewController; - [[TTNavigator navigator] persistController:controller path:path]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTabURLs:(NSArray*)URLs { - NSMutableArray* controllers = [NSMutableArray array]; - for (NSString* URL in URLs) { - UIViewController* controller = [[TTNavigator navigator] viewControllerForURL:URL]; - if (controller) { - UIViewController* tabController = [self rootControllerForController:controller]; - [controllers addObject:tabController]; - } - } - self.viewControllers = controllers; -} - - -@end diff --git a/src/Three20UI/Sources/UITableViewAdditions.m b/src/Three20UI/Sources/UITableViewAdditions.m deleted file mode 100644 index 15ae10c8d9..0000000000 --- a/src/Three20UI/Sources/UITableViewAdditions.m +++ /dev/null @@ -1,143 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/UITableViewAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/UIViewAdditions.h" - -// UICommon -#import "Three20UICommon/UIWindowAdditions.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UITableViewAdditions) - -@implementation UITableView (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)indexView { - Class indexViewClass = NSClassFromString(@"UITableViewIndex"); - NSEnumerator* e = [self.subviews reverseObjectEnumerator]; - for (UIView* child; child = [e nextObject]; ) { - if ([child isKindOfClass:indexViewClass]) { - return child; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)tableCellMargin { - if (self.style == UITableViewStyleGrouped) { - return 10; - - } else { - return 0; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollToTop:(BOOL)animated { - [self setContentOffset:CGPointMake(0,0) animated:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollToBottom:(BOOL)animated { - NSUInteger sectionCount = [self numberOfSections]; - if (sectionCount) { - NSUInteger rowCount = [self numberOfRowsInSection:0]; - if (rowCount) { - NSUInteger ii[2] = {0, rowCount-1}; - NSIndexPath* indexPath = [NSIndexPath indexPathWithIndexes:ii length:2]; - [self scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom - animated:animated]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollToFirstRow:(BOOL)animated { - if ([self numberOfSections] > 0 && [self numberOfRowsInSection:0] > 0) { - NSIndexPath* indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; - [self scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop - animated:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollToLastRow:(BOOL)animated { - if ([self numberOfSections] > 0) { - NSInteger section = [self numberOfSections]-1; - NSInteger rowCount = [self numberOfRowsInSection:section]; - if (rowCount > 0) { - NSIndexPath* indexPath = [NSIndexPath indexPathForRow:rowCount-1 inSection:section]; - [self scrollToRowAtIndexPath:indexPath - atScrollPosition:UITableViewScrollPositionBottom animated:NO]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)scrollFirstResponderIntoView { - UIView* responder = [self.window findFirstResponder]; - UITableViewCell* cell = (UITableViewCell*)[responder - ancestorOrSelfWithClass:[UITableViewCell class]]; - if (cell) { - NSIndexPath* indexPath = [self indexPathForCell:cell]; - if (indexPath) { - [self scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle - animated:YES]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)touchRowAtIndexPath:(NSIndexPath*)indexPath animated:(BOOL)animated { - if (![self cellForRowAtIndexPath:indexPath]) { - [self reloadData]; - } - - if ([self.delegate respondsToSelector:@selector(tableView:willSelectRowAtIndexPath:)]) { - [self.delegate tableView:self willSelectRowAtIndexPath:indexPath]; - } - - [self selectRowAtIndexPath:indexPath animated:animated - scrollPosition:UITableViewScrollPositionTop]; - - if ([self.delegate respondsToSelector:@selector(tableView:didSelectRowAtIndexPath:)]) { - [self.delegate tableView:self didSelectRowAtIndexPath:indexPath]; - } -} - - -@end diff --git a/src/Three20UI/Sources/UIToolbarAdditions.m b/src/Three20UI/Sources/UIToolbarAdditions.m deleted file mode 100644 index 600dfc04bf..0000000000 --- a/src/Three20UI/Sources/UIToolbarAdditions.m +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/UIToolbarAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIToolbarAdditions) - -@implementation UIToolbar (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIBarButtonItem*)itemWithTag:(NSInteger)tag { - for (UIBarButtonItem* button in self.items) { - if (button.tag == tag) { - return button; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)replaceItemWithTag:(NSInteger)tag withItem:(UIBarButtonItem*)item { - NSInteger buttonIndex = 0; - for (UIBarButtonItem* button in self.items) { - if (button.tag == tag) { - NSMutableArray* newItems = [NSMutableArray arrayWithArray:self.items]; - [newItems replaceObjectAtIndex:buttonIndex withObject:item]; - self.items = newItems; - break; - } - ++buttonIndex; - } -} - - -@end diff --git a/src/Three20UI/Sources/UIViewAdditions.m b/src/Three20UI/Sources/UIViewAdditions.m deleted file mode 100644 index fa1c21942a..0000000000 --- a/src/Three20UI/Sources/UIViewAdditions.m +++ /dev/null @@ -1,549 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/UIViewAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - - -// Remove GSEvent and UITouchAdditions from Release builds -#ifdef DEBUG - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * A private API class used for synthesizing touch events. This class is compiled out of release - * builds. - * - * This code for synthesizing touch events is derived from: - * http://cocoawithlove.com/2008/10/synthesizing-touch-event-on-iphone.html - */ -@interface GSEventFake : NSObject { - @public - int ignored1[5]; - float x; - float y; - int ignored2[24]; -} -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation GSEventFake -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface UIEventFake : NSObject { - @public - CFTypeRef _event; - NSTimeInterval _timestamp; - NSMutableSet* _touches; - CFMutableDictionaryRef _keyedTouches; -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UIEventFake - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface UITouch (TTCategory) - -/** - * - */ -- (id)initInView:(UIView *)view location:(CGPoint)location; - -/** - * - */ -- (void)changeToPhase:(UITouchPhase)phase; - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UITouch (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initInView:(UIView *)view location:(CGPoint)location { - if (self = [super init]) { - _tapCount = 1; - _locationInWindow = location; - _previousLocationInWindow = location; - - UIView *target = [view.window hitTest:_locationInWindow withEvent:nil]; - _view = [target retain]; - _window = [view.window retain]; - _phase = UITouchPhaseBegan; - _touchFlags._firstTouchForView = 1; - _touchFlags._isTap = 1; - _timestamp = [NSDate timeIntervalSinceReferenceDate]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)changeToPhase:(UITouchPhase)phase { - _phase = phase; - _timestamp = [NSDate timeIntervalSinceReferenceDate]; -} - - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UIEvent (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTouch:(UITouch *)touch { - if (self == [super init]) { - UIEventFake *selfFake = (UIEventFake*)self; - selfFake->_touches = [[NSMutableSet setWithObject:touch] retain]; - selfFake->_timestamp = [NSDate timeIntervalSinceReferenceDate]; - - CGPoint location = [touch locationInView:touch.window]; - GSEventFake* fakeGSEvent = [[GSEventFake alloc] init]; - fakeGSEvent->x = location.x; - fakeGSEvent->y = location.y; - selfFake->_event = fakeGSEvent; - - CFMutableDictionaryRef dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2, - &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionaryAddValue(dict, touch.view, selfFake->_touches); - CFDictionaryAddValue(dict, touch.window, selfFake->_touches); - selfFake->_keyedTouches = dict; - } - return self; -} - - -@end - -#endif - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIViewAdditions) - -@implementation UIView (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)left { - return self.frame.origin.x; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setLeft:(CGFloat)x { - CGRect frame = self.frame; - frame.origin.x = x; - self.frame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)top { - return self.frame.origin.y; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setTop:(CGFloat)y { - CGRect frame = self.frame; - frame.origin.y = y; - self.frame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)right { - return self.frame.origin.x + self.frame.size.width; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setRight:(CGFloat)right { - CGRect frame = self.frame; - frame.origin.x = right - frame.size.width; - self.frame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)bottom { - return self.frame.origin.y + self.frame.size.height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setBottom:(CGFloat)bottom { - CGRect frame = self.frame; - frame.origin.y = bottom - frame.size.height; - self.frame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)centerX { - return self.center.x; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setCenterX:(CGFloat)centerX { - self.center = CGPointMake(centerX, self.center.y); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)centerY { - return self.center.y; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setCenterY:(CGFloat)centerY { - self.center = CGPointMake(self.center.x, centerY); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)width { - return self.frame.size.width; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setWidth:(CGFloat)width { - CGRect frame = self.frame; - frame.size.width = width; - self.frame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)height { - return self.frame.size.height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setHeight:(CGFloat)height { - CGRect frame = self.frame; - frame.size.height = height; - self.frame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)ttScreenX { - CGFloat x = 0; - for (UIView* view = self; view; view = view.superview) { - x += view.left; - } - return x; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)ttScreenY { - CGFloat y = 0; - for (UIView* view = self; view; view = view.superview) { - y += view.top; - } - return y; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)screenViewX { - CGFloat x = 0; - for (UIView* view = self; view; view = view.superview) { - x += view.left; - - if ([view isKindOfClass:[UIScrollView class]]) { - UIScrollView* scrollView = (UIScrollView*)view; - x -= scrollView.contentOffset.x; - } - } - - return x; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)screenViewY { - CGFloat y = 0; - for (UIView* view = self; view; view = view.superview) { - y += view.top; - - if ([view isKindOfClass:[UIScrollView class]]) { - UIScrollView* scrollView = (UIScrollView*)view; - y -= scrollView.contentOffset.y; - } - } - return y; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)screenFrame { - return CGRectMake(self.screenViewX, self.screenViewY, self.width, self.height); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGPoint)origin { - return self.frame.origin; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setOrigin:(CGPoint)origin { - CGRect frame = self.frame; - frame.origin = origin; - self.frame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)size { - return self.frame.size; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSize:(CGSize)size { - CGRect frame = self.frame; - frame.size = size; - self.frame = frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)orientationWidth { - return UIInterfaceOrientationIsLandscape(TTInterfaceOrientation()) - ? self.height : self.width; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGFloat)orientationHeight { - return UIInterfaceOrientationIsLandscape(TTInterfaceOrientation()) - ? self.width : self.height; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)descendantOrSelfWithClass:(Class)cls { - if ([self isKindOfClass:cls]) - return self; - - for (UIView* child in self.subviews) { - UIView* it = [child descendantOrSelfWithClass:cls]; - if (it) - return it; - } - - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)ancestorOrSelfWithClass:(Class)cls { - if ([self isKindOfClass:cls]) { - return self; - - } else if (self.superview) { - return [self.superview ancestorOrSelfWithClass:cls]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeAllSubviews { - while (self.subviews.count) { - UIView* child = self.subviews.lastObject; - [child removeFromSuperview]; - } -} - - -#ifdef DEBUG - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)simulateTapAtPoint:(CGPoint)location { - UITouch *touch = [[[UITouch alloc] initInView:self location:location] autorelease]; - - UIEvent *eventDown = [[[UIEvent alloc] initWithTouch:touch] autorelease]; - [touch.view touchesBegan:[NSSet setWithObject:touch] withEvent:eventDown]; - - [touch changeToPhase:UITouchPhaseEnded]; - - UIEvent *eventUp = [[[UIEvent alloc] initWithTouch:touch] autorelease]; - [touch.view touchesEnded:[NSSet setWithObject:touch] withEvent:eventUp]; -} - -#endif - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGPoint)offsetFromView:(UIView*)otherView { - CGFloat x = 0, y = 0; - for (UIView* view = self; view && view != otherView; view = view.superview) { - x += view.left; - y += view.top; - } - return CGPointMake(x, y); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)frameWithKeyboardSubtracted:(CGFloat)plusHeight { - CGRect frame = self.frame; - if (TTIsKeyboardVisible()) { - CGRect screenFrame = TTScreenBounds(); - CGFloat keyboardTop = (screenFrame.size.height - (TTKeyboardHeight() + plusHeight)); - CGFloat screenBottom = self.ttScreenY + frame.size.height; - CGFloat diff = screenBottom - keyboardTop; - if (diff > 0) { - frame.size.height -= diff; - } - } - return frame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary *)userInfoForKeyboardNotification { - CGRect screenFrame = TTScreenBounds(); - CGRect bounds = CGRectMake(0, 0, screenFrame.size.width, self.height); - CGPoint centerBegin = CGPointMake(floor(screenFrame.size.width/2 - self.width/2), - screenFrame.size.height + floor(self.height/2)); - CGPoint centerEnd = CGPointMake(floor(screenFrame.size.width/2 - self.width/2), - screenFrame.size.height - floor(self.height/2)); - - return [NSDictionary dictionaryWithObjectsAndKeys: - [NSValue valueWithCGRect:bounds], UIKeyboardBoundsUserInfoKey, - [NSValue valueWithCGPoint:centerBegin], UIKeyboardCenterBeginUserInfoKey, - [NSValue valueWithCGPoint:centerEnd], UIKeyboardCenterEndUserInfoKey, - nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)presentAsKeyboardAnimationDidStop { - [[NSNotificationCenter defaultCenter] postNotificationName:UIKeyboardDidShowNotification - object:self - userInfo:[self - userInfoForKeyboardNotification]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissAsKeyboardAnimationDidStop { - [[NSNotificationCenter defaultCenter] postNotificationName:UIKeyboardDidHideNotification - object:self - userInfo:[self - userInfoForKeyboardNotification]]; - [self removeFromSuperview]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)presentAsKeyboardInView:(UIView*)containingView { - [[NSNotificationCenter defaultCenter] postNotificationName:UIKeyboardWillShowNotification - object:self - userInfo:[self - userInfoForKeyboardNotification]]; - - self.top = containingView.height; - [containingView addSubview:self]; - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(presentAsKeyboardAnimationDidStop)]; - self.top -= self.height; - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissAsKeyboard:(BOOL)animated { - [[NSNotificationCenter defaultCenter] postNotificationName:UIKeyboardWillHideNotification - object:self - userInfo:[self - userInfoForKeyboardNotification]]; - - if (animated) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(dismissAsKeyboardAnimationDidStop)]; - } - - self.top += self.height; - - if (animated) { - [UIView commitAnimations]; - - } else { - [self dismissAsKeyboardAnimationDidStop]; - } -} - - -@end diff --git a/src/Three20UI/Sources/UIWebViewAdditions.m b/src/Three20UI/Sources/UIWebViewAdditions.m deleted file mode 100644 index f4973f4465..0000000000 --- a/src/Three20UI/Sources/UIWebViewAdditions.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UI/UIWebViewAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -// UI -#import "Three20UI/UIViewAdditions.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIWebViewAdditions) - -@implementation UIWebView (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGRect)frameOfElement:(NSString*)query { - NSString* result = [self stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"\ - var target = %@; \ - var x = 0, y = 0; \ - for (var n = target; n && n.nodeType == 1; n = n.offsetParent) { \ - x += n.offsetLeft; \ - y += n.offsetTop; \ - } \ - x + ',' + y + ',' + target.offsetWidth + ',' + target.offsetHeight; \ -", query]]; - - NSArray* points = [result componentsSeparatedByString:@","]; - CGFloat x = [[points objectAtIndex:0] floatValue]; - CGFloat y = [[points objectAtIndex:1] floatValue]; - CGFloat width = [[points objectAtIndex:2] floatValue]; - CGFloat height = [[points objectAtIndex:3] floatValue]; - - return CGRectMake(x, y, width, height); -} - -#ifdef DEBUG - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)simulateTapElement:(NSString*)query { - CGRect frame = [self.window convertRect:self.frame fromView:self.superview]; - CGRect pluginFrame = [self frameOfElement:query]; - CGPoint tapPoint = CGPointMake( - frame.origin.x + pluginFrame.origin.x + pluginFrame.size.width/3, - frame.origin.y + pluginFrame.origin.y + pluginFrame.size.height/3 - ); - [self simulateTapAtPoint:tapPoint]; -} - -#endif - - -@end diff --git a/src/Three20UI/Three20UI.xcodeproj/project.pbxproj b/src/Three20UI/Three20UI.xcodeproj/project.pbxproj deleted file mode 100755 index 053305dcac..0000000000 --- a/src/Three20UI/Three20UI.xcodeproj/project.pbxproj +++ /dev/null @@ -1,2464 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 666E18E912945430001C1D97 /* TTSplitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 666E18E712945430001C1D97 /* TTSplitViewController.m */; }; - 666E18F51294543F001C1D97 /* TTSplitViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 666E18F41294543F001C1D97 /* TTSplitViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66ADC8C91290AC0200855386 /* TTExtensionsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66ADC8C61290AC0200855386 /* TTExtensionsController.m */; }; - 66ADC8CF1290AC1200855386 /* TTExtensionsController.h in Headers */ = {isa = PBXBuildFile; fileRef = 66ADC8CC1290AC1200855386 /* TTExtensionsController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66ADCD9D1291AA7100855386 /* TTExtensionInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66ADCD9B1291AA7100855386 /* TTExtensionInfoController.m */; }; - 66ADCDA31291AA7E00855386 /* TTExtensionInfoController.h in Headers */ = {isa = PBXBuildFile; fileRef = 66ADCDA21291AA7E00855386 /* TTExtensionInfoController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66F2E85412D426A5006FB485 /* TTTableFooterInfiniteScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 66F2E85212D426A5006FB485 /* TTTableFooterInfiniteScrollView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66F2E85712D426AF006FB485 /* TTTableFooterInfiniteScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66F2E85512D426AF006FB485 /* TTTableFooterInfiniteScrollView.m */; }; - 66F2E85F12D426DA006FB485 /* TTTableViewNetworkEnabledDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 66F2E85D12D426DA006FB485 /* TTTableViewNetworkEnabledDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66F2E86512D426EF006FB485 /* TTTableViewNetworkEnabledDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 66F2E86312D426EF006FB485 /* TTTableViewNetworkEnabledDelegate.m */; }; - 6E60820111B0C31400C93CD4 /* TTNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6081FF11B0C31400C93CD4 /* TTNavigationController.m */; }; - 6E60820311B0C32600C93CD4 /* TTNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E60820211B0C32600C93CD4 /* TTNavigationController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6454741184D2CD00F08CB1 /* Three20UI.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454731184D2CD00F08CB1 /* Three20UI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6454931184D3ED00F08CB1 /* Three20UI+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454921184D3ED00F08CB1 /* Three20UI+Additions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6454AA1184D43100F08CB1 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E6454A71184D42800F08CB1 /* libThree20Style.a */; }; - 6E64555E1184D4C500F08CB1 /* TTActionSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C01184D4C500F08CB1 /* TTActionSheet.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64555F1184D4C500F08CB1 /* TTActionSheetController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C11184D4C500F08CB1 /* TTActionSheetController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455601184D4C500F08CB1 /* TTActionSheetControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C21184D4C500F08CB1 /* TTActionSheetControllerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455611184D4C500F08CB1 /* TTActivityLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C31184D4C500F08CB1 /* TTActivityLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455621184D4C500F08CB1 /* TTAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C41184D4C500F08CB1 /* TTAlertView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455631184D4C500F08CB1 /* TTAlertViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C51184D4C500F08CB1 /* TTAlertViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455641184D4C500F08CB1 /* TTAlertViewControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C61184D4C500F08CB1 /* TTAlertViewControllerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455651184D4C500F08CB1 /* TTButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C71184D4C500F08CB1 /* TTButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455661184D4C500F08CB1 /* TTButtonBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C81184D4C500F08CB1 /* TTButtonBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455671184D4C500F08CB1 /* TTButtonContent.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454C91184D4C500F08CB1 /* TTButtonContent.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E6455681184D4C500F08CB1 /* TTErrorView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454CA1184D4C500F08CB1 /* TTErrorView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64556C1184D4C500F08CB1 /* TTImageLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454CE1184D4C500F08CB1 /* TTImageLayer.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E64556D1184D4C500F08CB1 /* TTImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454CF1184D4C500F08CB1 /* TTImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64556E1184D4C500F08CB1 /* TTImageViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D01184D4C500F08CB1 /* TTImageViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64556F1184D4C500F08CB1 /* TTImageViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D11184D4C500F08CB1 /* TTImageViewInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E6455701184D4C500F08CB1 /* TTLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D21184D4C500F08CB1 /* TTLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455711184D4C500F08CB1 /* TTLauncherButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D31184D4C500F08CB1 /* TTLauncherButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455721184D4C500F08CB1 /* TTLauncherItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D41184D4C500F08CB1 /* TTLauncherItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455731184D4C500F08CB1 /* TTLauncherScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D51184D4C500F08CB1 /* TTLauncherScrollView.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E6455741184D4C500F08CB1 /* TTLauncherView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D61184D4C500F08CB1 /* TTLauncherView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455751184D4C500F08CB1 /* TTLauncherViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D71184D4C500F08CB1 /* TTLauncherViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455761184D4C500F08CB1 /* TTLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D81184D4C500F08CB1 /* TTLink.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455771184D4C500F08CB1 /* TTListDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454D91184D4C500F08CB1 /* TTListDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455781184D4C500F08CB1 /* TTMessageController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454DA1184D4C500F08CB1 /* TTMessageController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455791184D4C500F08CB1 /* TTMessageControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454DB1184D4C500F08CB1 /* TTMessageControllerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64557A1184D4C500F08CB1 /* TTMessageField.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454DC1184D4C500F08CB1 /* TTMessageField.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64557B1184D4C500F08CB1 /* TTMessageRecipientField.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454DD1184D4C500F08CB1 /* TTMessageRecipientField.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64557C1184D4C500F08CB1 /* TTMessageSubjectField.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454DE1184D4C500F08CB1 /* TTMessageSubjectField.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64557D1184D4C500F08CB1 /* TTMessageTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454DF1184D4C500F08CB1 /* TTMessageTextField.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64557E1184D4C500F08CB1 /* TTModelViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454E01184D4C500F08CB1 /* TTModelViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455821184D4C500F08CB1 /* TTPageControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454E41184D4C500F08CB1 /* TTPageControl.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455831184D4C500F08CB1 /* TTPhoto.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454E51184D4C500F08CB1 /* TTPhoto.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455841184D4C500F08CB1 /* TTPhotoSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454E61184D4C500F08CB1 /* TTPhotoSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455851184D4C500F08CB1 /* TTPhotoVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454E71184D4C500F08CB1 /* TTPhotoVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455861184D4C500F08CB1 /* TTPhotoView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454E81184D4C500F08CB1 /* TTPhotoView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455871184D4C500F08CB1 /* TTPhotoViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454E91184D4C500F08CB1 /* TTPhotoViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455881184D4C500F08CB1 /* TTPickerTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454EA1184D4C500F08CB1 /* TTPickerTextField.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455891184D4C500F08CB1 /* TTPickerTextFieldDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454EB1184D4C500F08CB1 /* TTPickerTextFieldDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64558A1184D4C500F08CB1 /* TTPickerViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454EC1184D4C500F08CB1 /* TTPickerViewCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64558B1184D4C500F08CB1 /* TTPopupViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454ED1184D4C500F08CB1 /* TTPopupViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64558C1184D4C500F08CB1 /* TTPostController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454EE1184D4C500F08CB1 /* TTPostController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64558D1184D4C500F08CB1 /* TTPostControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454EF1184D4C500F08CB1 /* TTPostControllerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64558E1184D4C500F08CB1 /* TTRecursiveProgress.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F01184D4C500F08CB1 /* TTRecursiveProgress.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64558F1184D4C500F08CB1 /* TTScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F11184D4C500F08CB1 /* TTScrollView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455901184D4C500F08CB1 /* TTScrollViewDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F21184D4C500F08CB1 /* TTScrollViewDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455911184D4C500F08CB1 /* TTScrollViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F31184D4C500F08CB1 /* TTScrollViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455921184D4C500F08CB1 /* TTSearchBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F41184D4C500F08CB1 /* TTSearchBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455931184D4C500F08CB1 /* TTSearchDisplayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F51184D4C500F08CB1 /* TTSearchDisplayController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455941184D4C500F08CB1 /* TTSearchlightLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F61184D4C500F08CB1 /* TTSearchlightLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455951184D4C500F08CB1 /* TTSearchTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F71184D4C500F08CB1 /* TTSearchTextField.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455961184D4C500F08CB1 /* TTSearchTextFieldDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F81184D4C500F08CB1 /* TTSearchTextFieldDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455971184D4C500F08CB1 /* TTSearchTextFieldInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454F91184D4C500F08CB1 /* TTSearchTextFieldInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E6455981184D4C500F08CB1 /* TTSectionedDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454FA1184D4C500F08CB1 /* TTSectionedDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64559B1184D4C500F08CB1 /* TTStyledTextLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454FD1184D4C500F08CB1 /* TTStyledTextLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64559C1184D4C500F08CB1 /* TTStyledTextTableCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454FE1184D4C500F08CB1 /* TTStyledTextTableCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64559D1184D4C500F08CB1 /* TTStyledTextTableItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454FF1184D4C500F08CB1 /* TTStyledTextTableItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64559E1184D4C500F08CB1 /* TTTab.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455001184D4C500F08CB1 /* TTTab.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E64559F1184D4C500F08CB1 /* TTTabBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455011184D4C500F08CB1 /* TTTabBar.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A01184D4C500F08CB1 /* TTTabBarInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455021184D4C500F08CB1 /* TTTabBarInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E6455A11184D4C500F08CB1 /* TTTabDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455031184D4C500F08CB1 /* TTTabDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A21184D4C500F08CB1 /* TTTabGrid.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455041184D4C500F08CB1 /* TTTabGrid.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A31184D4C500F08CB1 /* TTTabItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455051184D4C500F08CB1 /* TTTabItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A41184D4C500F08CB1 /* TTTableActivityItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455061184D4C500F08CB1 /* TTTableActivityItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A51184D4C500F08CB1 /* TTTableActivityItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455071184D4C500F08CB1 /* TTTableActivityItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A61184D4C500F08CB1 /* TTTableButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455081184D4C500F08CB1 /* TTTableButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A71184D4C500F08CB1 /* TTTableCaptionItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455091184D4C500F08CB1 /* TTTableCaptionItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A81184D4C500F08CB1 /* TTTableCaptionItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64550A1184D4C500F08CB1 /* TTTableCaptionItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455A91184D4C500F08CB1 /* TTTableControlCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64550B1184D4C500F08CB1 /* TTTableControlCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455AA1184D4C500F08CB1 /* TTTableControlItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64550C1184D4C500F08CB1 /* TTTableControlItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455AB1184D4C500F08CB1 /* TTTableFlushViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64550D1184D4C500F08CB1 /* TTTableFlushViewCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455AC1184D4C500F08CB1 /* TTTableGrayTextItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64550E1184D4C500F08CB1 /* TTTableGrayTextItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455AD1184D4C500F08CB1 /* TTTableHeaderDragRefreshView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64550F1184D4C500F08CB1 /* TTTableHeaderDragRefreshView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455AE1184D4C500F08CB1 /* TTTableHeaderView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455101184D4C500F08CB1 /* TTTableHeaderView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455AF1184D4C500F08CB1 /* TTTableImageItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455111184D4C500F08CB1 /* TTTableImageItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B01184D4C500F08CB1 /* TTTableImageItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455121184D4C500F08CB1 /* TTTableImageItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B11184D4C500F08CB1 /* TTTableItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455131184D4C500F08CB1 /* TTTableItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B21184D4C500F08CB1 /* TTTableLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455141184D4C500F08CB1 /* TTTableLink.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B31184D4C500F08CB1 /* TTTableLinkedItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455151184D4C500F08CB1 /* TTTableLinkedItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B41184D4C500F08CB1 /* TTTableLinkedItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455161184D4C500F08CB1 /* TTTableLinkedItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B51184D4C500F08CB1 /* TTTableLongTextItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455171184D4C500F08CB1 /* TTTableLongTextItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B61184D4C500F08CB1 /* TTTableMessageItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455181184D4C500F08CB1 /* TTTableMessageItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B71184D4C500F08CB1 /* TTTableMessageItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455191184D4C500F08CB1 /* TTTableMessageItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B81184D4C500F08CB1 /* TTTableMoreButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64551A1184D4C500F08CB1 /* TTTableMoreButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455B91184D4C500F08CB1 /* TTTableMoreButtonCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64551B1184D4C500F08CB1 /* TTTableMoreButtonCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455BA1184D4C500F08CB1 /* TTTableRightCaptionItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64551C1184D4C500F08CB1 /* TTTableRightCaptionItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455BB1184D4C500F08CB1 /* TTTableRightCaptionItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64551D1184D4C500F08CB1 /* TTTableRightCaptionItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455BC1184D4C500F08CB1 /* TTTableRightImageItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64551E1184D4C500F08CB1 /* TTTableRightImageItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455BD1184D4C500F08CB1 /* TTTableStyledTextItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64551F1184D4C500F08CB1 /* TTTableStyledTextItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455BE1184D4C500F08CB1 /* TTTableSubtextItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455201184D4C500F08CB1 /* TTTableSubtextItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455BF1184D4C500F08CB1 /* TTTableSubtextItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455211184D4C500F08CB1 /* TTTableSubtextItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C01184D4C500F08CB1 /* TTTableSubtitleItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455221184D4C500F08CB1 /* TTTableSubtitleItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C11184D4C500F08CB1 /* TTTableSubtitleItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455231184D4C500F08CB1 /* TTTableSubtitleItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C21184D4C500F08CB1 /* TTTableSummaryItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455241184D4C500F08CB1 /* TTTableSummaryItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C31184D4C500F08CB1 /* TTTableTextItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455251184D4C500F08CB1 /* TTTableTextItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C41184D4C500F08CB1 /* TTTableTextItemCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455261184D4C500F08CB1 /* TTTableTextItemCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C51184D4C500F08CB1 /* TTTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455271184D4C500F08CB1 /* TTTableView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C61184D4C500F08CB1 /* TTTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455281184D4C500F08CB1 /* TTTableViewCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C71184D4C500F08CB1 /* TTTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455291184D4C500F08CB1 /* TTTableViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C81184D4C500F08CB1 /* TTTableViewDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64552A1184D4C500F08CB1 /* TTTableViewDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455C91184D4C500F08CB1 /* TTTableViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64552B1184D4C500F08CB1 /* TTTableViewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455CA1184D4C500F08CB1 /* TTTableViewDragRefreshDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64552C1184D4C500F08CB1 /* TTTableViewDragRefreshDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455CB1184D4C500F08CB1 /* TTTableViewGroupedVarHeightDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64552D1184D4C500F08CB1 /* TTTableViewGroupedVarHeightDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455CC1184D4C500F08CB1 /* TTTableViewItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64552E1184D4C500F08CB1 /* TTTableViewItem.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455CD1184D4C500F08CB1 /* TTTableViewPlainDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64552F1184D4C500F08CB1 /* TTTableViewPlainDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455CE1184D4C500F08CB1 /* TTTableViewPlainVarHeightDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455301184D4C500F08CB1 /* TTTableViewPlainVarHeightDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455CF1184D4C500F08CB1 /* TTTableViewVarHeightDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455311184D4C500F08CB1 /* TTTableViewVarHeightDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455D01184D4C500F08CB1 /* TTTabStrip.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455321184D4C500F08CB1 /* TTTabStrip.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455D11184D4C500F08CB1 /* TTTextBarController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455331184D4C500F08CB1 /* TTTextBarController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455D21184D4C500F08CB1 /* TTTextBarDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455341184D4C500F08CB1 /* TTTextBarDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455D31184D4C500F08CB1 /* TTTextEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455351184D4C500F08CB1 /* TTTextEditor.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455D41184D4C500F08CB1 /* TTTextEditorDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455361184D4C500F08CB1 /* TTTextEditorDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455D51184D4C500F08CB1 /* TTTextEditorInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455371184D4C500F08CB1 /* TTTextEditorInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E6455D61184D4C500F08CB1 /* TTTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455381184D4C500F08CB1 /* TTTextView.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E6455D71184D4C500F08CB1 /* TTThumbsDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455391184D4C500F08CB1 /* TTThumbsDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455D81184D4C500F08CB1 /* TTThumbsTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64553A1184D4C500F08CB1 /* TTThumbsTableViewCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455D91184D4C500F08CB1 /* TTThumbsTableViewCellDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64553B1184D4C500F08CB1 /* TTThumbsTableViewCellDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455DA1184D4C500F08CB1 /* TTThumbsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64553C1184D4C500F08CB1 /* TTThumbsViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455DB1184D4C500F08CB1 /* TTThumbsViewControllerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64553D1184D4C500F08CB1 /* TTThumbsViewControllerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455DC1184D4C500F08CB1 /* TTThumbView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64553E1184D4C500F08CB1 /* TTThumbView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455DD1184D4C500F08CB1 /* TTUnclippedView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64553F1184D4C500F08CB1 /* TTUnclippedView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455ED1184D4C500F08CB1 /* TTView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64554F1184D4C500F08CB1 /* TTView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455EE1184D4C500F08CB1 /* TTViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455501184D4C500F08CB1 /* TTViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455EF1184D4C500F08CB1 /* TTWebController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455511184D4C500F08CB1 /* TTWebController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455F11184D4C500F08CB1 /* TTYouTubeView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455531184D4C500F08CB1 /* TTYouTubeView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455F21184D4C500F08CB1 /* UINavigationControllerAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455541184D4C500F08CB1 /* UINavigationControllerAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455F31184D4C500F08CB1 /* UINSObjectAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455551184D4C500F08CB1 /* UINSObjectAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455F41184D4C500F08CB1 /* UINSStringAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455561184D4C500F08CB1 /* UINSStringAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455F51184D4C500F08CB1 /* UITabBarControllerAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455571184D4C500F08CB1 /* UITabBarControllerAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455F61184D4C500F08CB1 /* UITableViewAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455581184D4C500F08CB1 /* UITableViewAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455F71184D4C500F08CB1 /* UIToolbarAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6455591184D4C500F08CB1 /* UIToolbarAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455F81184D4C500F08CB1 /* UIViewAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64555A1184D4C500F08CB1 /* UIViewAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6455FA1184D4C500F08CB1 /* UIWebViewAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E64555C1184D4C500F08CB1 /* UIWebViewAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6456871184D4DA00F08CB1 /* TTActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6455FF1184D4DA00F08CB1 /* TTActionSheet.m */; }; - 6E6456881184D4DA00F08CB1 /* TTActionSheetController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456001184D4DA00F08CB1 /* TTActionSheetController.m */; }; - 6E6456891184D4DA00F08CB1 /* TTActivityLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456011184D4DA00F08CB1 /* TTActivityLabel.m */; }; - 6E64568A1184D4DA00F08CB1 /* TTAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456021184D4DA00F08CB1 /* TTAlertView.m */; }; - 6E64568B1184D4DA00F08CB1 /* TTAlertViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456031184D4DA00F08CB1 /* TTAlertViewController.m */; }; - 6E64568C1184D4DA00F08CB1 /* TTButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456041184D4DA00F08CB1 /* TTButton.m */; }; - 6E64568D1184D4DA00F08CB1 /* TTButtonBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456051184D4DA00F08CB1 /* TTButtonBar.m */; }; - 6E64568E1184D4DA00F08CB1 /* TTButtonContent.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456061184D4DA00F08CB1 /* TTButtonContent.m */; }; - 6E64568F1184D4DA00F08CB1 /* TTErrorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456071184D4DA00F08CB1 /* TTErrorView.m */; }; - 6E6456931184D4DA00F08CB1 /* TTImageLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64560B1184D4DA00F08CB1 /* TTImageLayer.m */; }; - 6E6456941184D4DA00F08CB1 /* TTImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64560C1184D4DA00F08CB1 /* TTImageView.m */; }; - 6E6456951184D4DA00F08CB1 /* TTImageViewInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64560D1184D4DA00F08CB1 /* TTImageViewInternal.m */; }; - 6E6456961184D4DA00F08CB1 /* TTLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64560E1184D4DA00F08CB1 /* TTLabel.m */; }; - 6E6456971184D4DA00F08CB1 /* TTLauncherButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64560F1184D4DA00F08CB1 /* TTLauncherButton.m */; }; - 6E6456981184D4DA00F08CB1 /* TTLauncherItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456101184D4DA00F08CB1 /* TTLauncherItem.m */; }; - 6E6456991184D4DA00F08CB1 /* TTLauncherScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456111184D4DA00F08CB1 /* TTLauncherScrollView.m */; }; - 6E64569A1184D4DA00F08CB1 /* TTLauncherView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456121184D4DA00F08CB1 /* TTLauncherView.m */; }; - 6E64569B1184D4DA00F08CB1 /* TTLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456131184D4DA00F08CB1 /* TTLink.m */; }; - 6E64569C1184D4DA00F08CB1 /* TTListDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456141184D4DA00F08CB1 /* TTListDataSource.m */; }; - 6E64569D1184D4DA00F08CB1 /* TTMessageController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456151184D4DA00F08CB1 /* TTMessageController.m */; }; - 6E64569E1184D4DA00F08CB1 /* TTMessageField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456161184D4DA00F08CB1 /* TTMessageField.m */; }; - 6E64569F1184D4DA00F08CB1 /* TTMessageRecipientField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456171184D4DA00F08CB1 /* TTMessageRecipientField.m */; }; - 6E6456A01184D4DA00F08CB1 /* TTMessageSubjectField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456181184D4DA00F08CB1 /* TTMessageSubjectField.m */; }; - 6E6456A11184D4DA00F08CB1 /* TTMessageTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456191184D4DA00F08CB1 /* TTMessageTextField.m */; }; - 6E6456A21184D4DA00F08CB1 /* TTModelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64561A1184D4DA00F08CB1 /* TTModelViewController.m */; }; - 6E6456A51184D4DA00F08CB1 /* TTPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64561D1184D4DA00F08CB1 /* TTPageControl.m */; }; - 6E6456A61184D4DA00F08CB1 /* TTPhotoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64561E1184D4DA00F08CB1 /* TTPhotoView.m */; }; - 6E6456A71184D4DA00F08CB1 /* TTPhotoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64561F1184D4DA00F08CB1 /* TTPhotoViewController.m */; }; - 6E6456A81184D4DA00F08CB1 /* TTPickerTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456201184D4DA00F08CB1 /* TTPickerTextField.m */; }; - 6E6456A91184D4DA00F08CB1 /* TTPickerViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456211184D4DA00F08CB1 /* TTPickerViewCell.m */; }; - 6E6456AA1184D4DA00F08CB1 /* TTPopupViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456221184D4DA00F08CB1 /* TTPopupViewController.m */; }; - 6E6456AB1184D4DA00F08CB1 /* TTPostController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456231184D4DA00F08CB1 /* TTPostController.m */; }; - 6E6456AC1184D4DA00F08CB1 /* TTRecursiveProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456241184D4DA00F08CB1 /* TTRecursiveProgress.m */; }; - 6E6456AD1184D4DA00F08CB1 /* TTScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456251184D4DA00F08CB1 /* TTScrollView.m */; }; - 6E6456AE1184D4DA00F08CB1 /* TTSearchBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456261184D4DA00F08CB1 /* TTSearchBar.m */; }; - 6E6456AF1184D4DA00F08CB1 /* TTSearchDisplayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456271184D4DA00F08CB1 /* TTSearchDisplayController.m */; }; - 6E6456B01184D4DA00F08CB1 /* TTSearchlightLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456281184D4DA00F08CB1 /* TTSearchlightLabel.m */; }; - 6E6456B11184D4DA00F08CB1 /* TTSearchTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456291184D4DA00F08CB1 /* TTSearchTextField.m */; }; - 6E6456B21184D4DA00F08CB1 /* TTSearchTextFieldInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64562A1184D4DA00F08CB1 /* TTSearchTextFieldInternal.m */; }; - 6E6456B31184D4DA00F08CB1 /* TTSectionedDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64562B1184D4DA00F08CB1 /* TTSectionedDataSource.m */; }; - 6E6456B61184D4DA00F08CB1 /* TTStyledTextLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64562E1184D4DA00F08CB1 /* TTStyledTextLabel.m */; }; - 6E6456B71184D4DA00F08CB1 /* TTStyledTextTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64562F1184D4DA00F08CB1 /* TTStyledTextTableCell.m */; }; - 6E6456B81184D4DA00F08CB1 /* TTStyledTextTableItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456301184D4DA00F08CB1 /* TTStyledTextTableItemCell.m */; }; - 6E6456B91184D4DA00F08CB1 /* TTTab.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456311184D4DA00F08CB1 /* TTTab.m */; }; - 6E6456BA1184D4DA00F08CB1 /* TTTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456321184D4DA00F08CB1 /* TTTabBar.m */; }; - 6E6456BB1184D4DA00F08CB1 /* TTTabBarInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456331184D4DA00F08CB1 /* TTTabBarInternal.m */; }; - 6E6456BC1184D4DA00F08CB1 /* TTTabGrid.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456341184D4DA00F08CB1 /* TTTabGrid.m */; }; - 6E6456BD1184D4DA00F08CB1 /* TTTabItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456351184D4DA00F08CB1 /* TTTabItem.m */; }; - 6E6456BE1184D4DA00F08CB1 /* TTTableActivityItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456361184D4DA00F08CB1 /* TTTableActivityItem.m */; }; - 6E6456BF1184D4DA00F08CB1 /* TTTableActivityItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456371184D4DA00F08CB1 /* TTTableActivityItemCell.m */; }; - 6E6456C01184D4DA00F08CB1 /* TTTableButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456381184D4DA00F08CB1 /* TTTableButton.m */; }; - 6E6456C11184D4DA00F08CB1 /* TTTableCaptionItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456391184D4DA00F08CB1 /* TTTableCaptionItem.m */; }; - 6E6456C21184D4DA00F08CB1 /* TTTableCaptionItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64563A1184D4DA00F08CB1 /* TTTableCaptionItemCell.m */; }; - 6E6456C31184D4DA00F08CB1 /* TTTableControlCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64563B1184D4DA00F08CB1 /* TTTableControlCell.m */; }; - 6E6456C41184D4DA00F08CB1 /* TTTableControlItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64563C1184D4DA00F08CB1 /* TTTableControlItem.m */; }; - 6E6456C51184D4DA00F08CB1 /* TTTableFlushViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64563D1184D4DA00F08CB1 /* TTTableFlushViewCell.m */; }; - 6E6456C61184D4DA00F08CB1 /* TTTableGrayTextItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64563E1184D4DA00F08CB1 /* TTTableGrayTextItem.m */; }; - 6E6456C71184D4DA00F08CB1 /* TTTableHeaderDragRefreshView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64563F1184D4DA00F08CB1 /* TTTableHeaderDragRefreshView.m */; }; - 6E6456C81184D4DA00F08CB1 /* TTTableHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456401184D4DA00F08CB1 /* TTTableHeaderView.m */; }; - 6E6456C91184D4DA00F08CB1 /* TTTableImageItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456411184D4DA00F08CB1 /* TTTableImageItem.m */; }; - 6E6456CA1184D4DA00F08CB1 /* TTTableImageItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456421184D4DA00F08CB1 /* TTTableImageItemCell.m */; }; - 6E6456CB1184D4DA00F08CB1 /* TTTableItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456431184D4DA00F08CB1 /* TTTableItem.m */; }; - 6E6456CC1184D4DA00F08CB1 /* TTTableLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456441184D4DA00F08CB1 /* TTTableLink.m */; }; - 6E6456CD1184D4DA00F08CB1 /* TTTableLinkedItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456451184D4DA00F08CB1 /* TTTableLinkedItem.m */; }; - 6E6456CE1184D4DA00F08CB1 /* TTTableLinkedItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456461184D4DA00F08CB1 /* TTTableLinkedItemCell.m */; }; - 6E6456CF1184D4DA00F08CB1 /* TTTableLongTextItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456471184D4DA00F08CB1 /* TTTableLongTextItem.m */; }; - 6E6456D01184D4DA00F08CB1 /* TTTableMessageItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456481184D4DA00F08CB1 /* TTTableMessageItem.m */; }; - 6E6456D11184D4DA00F08CB1 /* TTTableMessageItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456491184D4DA00F08CB1 /* TTTableMessageItemCell.m */; }; - 6E6456D21184D4DA00F08CB1 /* TTTableMoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64564A1184D4DA00F08CB1 /* TTTableMoreButton.m */; }; - 6E6456D31184D4DA00F08CB1 /* TTTableMoreButtonCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64564B1184D4DA00F08CB1 /* TTTableMoreButtonCell.m */; }; - 6E6456D41184D4DA00F08CB1 /* TTTableRightCaptionItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64564C1184D4DA00F08CB1 /* TTTableRightCaptionItem.m */; }; - 6E6456D51184D4DA00F08CB1 /* TTTableRightCaptionItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64564D1184D4DA00F08CB1 /* TTTableRightCaptionItemCell.m */; }; - 6E6456D61184D4DA00F08CB1 /* TTTableRightImageItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64564E1184D4DA00F08CB1 /* TTTableRightImageItem.m */; }; - 6E6456D71184D4DA00F08CB1 /* TTTableStyledTextItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64564F1184D4DA00F08CB1 /* TTTableStyledTextItem.m */; }; - 6E6456D81184D4DA00F08CB1 /* TTTableSubtextItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456501184D4DA00F08CB1 /* TTTableSubtextItem.m */; }; - 6E6456D91184D4DA00F08CB1 /* TTTableSubtextItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456511184D4DA00F08CB1 /* TTTableSubtextItemCell.m */; }; - 6E6456DA1184D4DA00F08CB1 /* TTTableSubtitleItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456521184D4DA00F08CB1 /* TTTableSubtitleItem.m */; }; - 6E6456DB1184D4DA00F08CB1 /* TTTableSubtitleItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456531184D4DA00F08CB1 /* TTTableSubtitleItemCell.m */; }; - 6E6456DC1184D4DA00F08CB1 /* TTTableSummaryItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456541184D4DA00F08CB1 /* TTTableSummaryItem.m */; }; - 6E6456DD1184D4DA00F08CB1 /* TTTableTextItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456551184D4DA00F08CB1 /* TTTableTextItem.m */; }; - 6E6456DE1184D4DA00F08CB1 /* TTTableTextItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456561184D4DA00F08CB1 /* TTTableTextItemCell.m */; }; - 6E6456DF1184D4DA00F08CB1 /* TTTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456571184D4DA00F08CB1 /* TTTableView.m */; }; - 6E6456E01184D4DA00F08CB1 /* TTTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456581184D4DA00F08CB1 /* TTTableViewCell.m */; }; - 6E6456E11184D4DA00F08CB1 /* TTTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456591184D4DA00F08CB1 /* TTTableViewController.m */; }; - 6E6456E21184D4DA00F08CB1 /* TTTableViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64565A1184D4DA00F08CB1 /* TTTableViewDataSource.m */; }; - 6E6456E31184D4DA00F08CB1 /* TTTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64565B1184D4DA00F08CB1 /* TTTableViewDelegate.m */; }; - 6E6456E41184D4DA00F08CB1 /* TTTableViewDragRefreshDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64565C1184D4DA00F08CB1 /* TTTableViewDragRefreshDelegate.m */; }; - 6E6456E51184D4DA00F08CB1 /* TTTableViewGroupedVarHeightDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64565D1184D4DA00F08CB1 /* TTTableViewGroupedVarHeightDelegate.m */; }; - 6E6456E61184D4DA00F08CB1 /* TTTableViewItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64565E1184D4DA00F08CB1 /* TTTableViewItem.m */; }; - 6E6456E71184D4DA00F08CB1 /* TTTableViewPlainDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64565F1184D4DA00F08CB1 /* TTTableViewPlainDelegate.m */; }; - 6E6456E81184D4DA00F08CB1 /* TTTableViewPlainVarHeightDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456601184D4DA00F08CB1 /* TTTableViewPlainVarHeightDelegate.m */; }; - 6E6456E91184D4DA00F08CB1 /* TTTableViewVarHeightDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456611184D4DA00F08CB1 /* TTTableViewVarHeightDelegate.m */; }; - 6E6456EA1184D4DA00F08CB1 /* TTTabStrip.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456621184D4DA00F08CB1 /* TTTabStrip.m */; }; - 6E6456EB1184D4DA00F08CB1 /* TTTextBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456631184D4DA00F08CB1 /* TTTextBarController.m */; }; - 6E6456EC1184D4DA00F08CB1 /* TTTextEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456641184D4DA00F08CB1 /* TTTextEditor.m */; }; - 6E6456ED1184D4DA00F08CB1 /* TTTextEditorInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456651184D4DA00F08CB1 /* TTTextEditorInternal.m */; }; - 6E6456EE1184D4DA00F08CB1 /* TTTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456661184D4DA00F08CB1 /* TTTextView.m */; }; - 6E6456EF1184D4DA00F08CB1 /* TTThumbsDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456671184D4DA00F08CB1 /* TTThumbsDataSource.m */; }; - 6E6456F01184D4DA00F08CB1 /* TTThumbsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456681184D4DA00F08CB1 /* TTThumbsTableViewCell.m */; }; - 6E6456F11184D4DA00F08CB1 /* TTThumbsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456691184D4DA00F08CB1 /* TTThumbsViewController.m */; }; - 6E6456F21184D4DA00F08CB1 /* TTThumbView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64566A1184D4DA00F08CB1 /* TTThumbView.m */; }; - 6E6456F31184D4DA00F08CB1 /* TTUnclippedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64566B1184D4DA00F08CB1 /* TTUnclippedView.m */; }; - 6E6457001184D4DA00F08CB1 /* TTView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456781184D4DA00F08CB1 /* TTView.m */; }; - 6E6457011184D4DA00F08CB1 /* TTViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456791184D4DA00F08CB1 /* TTViewController.m */; }; - 6E6457021184D4DA00F08CB1 /* TTWebController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64567A1184D4DA00F08CB1 /* TTWebController.m */; }; - 6E6457041184D4DA00F08CB1 /* TTYouTubeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64567C1184D4DA00F08CB1 /* TTYouTubeView.m */; }; - 6E6457051184D4DA00F08CB1 /* UINavigationControllerAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64567D1184D4DA00F08CB1 /* UINavigationControllerAdditions.m */; }; - 6E6457061184D4DA00F08CB1 /* UINSObjectAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64567E1184D4DA00F08CB1 /* UINSObjectAdditions.m */; }; - 6E6457071184D4DA00F08CB1 /* UINSStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E64567F1184D4DA00F08CB1 /* UINSStringAdditions.m */; }; - 6E6457081184D4DA00F08CB1 /* UITabBarControllerAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456801184D4DA00F08CB1 /* UITabBarControllerAdditions.m */; }; - 6E6457091184D4DA00F08CB1 /* UITableViewAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456811184D4DA00F08CB1 /* UITableViewAdditions.m */; }; - 6E64570A1184D4DA00F08CB1 /* UIToolbarAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456821184D4DA00F08CB1 /* UIToolbarAdditions.m */; }; - 6E64570B1184D4DA00F08CB1 /* UIViewAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456831184D4DA00F08CB1 /* UIViewAdditions.m */; }; - 6E64570D1184D4DA00F08CB1 /* UIWebViewAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6456851184D4DA00F08CB1 /* UIWebViewAdditions.m */; }; - 6E6459381187645D00F08CB1 /* UIGlobalTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6459371187645D00F08CB1 /* UIGlobalTests.m */; }; - 6E86A8DB118CBF7500662DA5 /* TTNavigatorWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E86A8DA118CBF7500662DA5 /* TTNavigatorWindow.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E86A8EC118CBF8E00662DA5 /* TTNavigatorWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E86A8EB118CBF8E00662DA5 /* TTNavigatorWindow.m */; }; - 6ECCA5FE11C0C0F6002296C7 /* TTLauncherHighlightView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6ECCA5FC11C0C0F6002296C7 /* TTLauncherHighlightView.m */; }; - 6ECCA60011C0C105002296C7 /* TTLauncherHighlightView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6ECCA5FF11C0C105002296C7 /* TTLauncherHighlightView.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6EDAE9F6118CA5810008133C /* TTNavigator.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EDAE9F5118CA5810008133C /* TTNavigator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EDAEA02118CA59C0008133C /* TTNavigator.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EDAEA01118CA59C0008133C /* TTNavigator.m */; }; - 6EDAEA1D118CA5E20008133C /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EDAEA09118CA5B50008133C /* libThree20UICommon.a */; }; - 6EDAEA1E118CA5E20008133C /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EDAEA12118CA5BE0008133C /* libThree20UINavigator.a */; }; - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE7366C11849C5800A35176 /* libThree20Core.a */; }; - 6EE738A61184ADB800A35176 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE738A31184ADB400A35176 /* libThree20Network.a */; }; - 6EE739D01184BB0400A35176 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libThree20UI.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E6454A61184D42800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E6454A81184D42800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E6454AC1184D45600F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E6454AE1184D46800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6EDAEA08118CA5B50008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6EDAEA0A118CA5B50008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EDAEA11118CA5BE0008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6EDAEA13118CA5BE0008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EDAEA15118CA5CA0008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6EDAEA17118CA5CA0008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6EDAEA19118CA5D30008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6EDAEA1B118CA5D30008133C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE7367011849C6300A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE736C611849FA000A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EE738A21184ADB400A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6EE738A41184ADB400A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE738AA1184ADD000A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6EE738AC1184ADE300A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 666E18E712945430001C1D97 /* TTSplitViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSplitViewController.m; path = Sources/TTSplitViewController.m; sourceTree = ""; }; - 666E18F41294543F001C1D97 /* TTSplitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSplitViewController.h; path = Headers/TTSplitViewController.h; sourceTree = ""; }; - 66ADC8C61290AC0200855386 /* TTExtensionsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTExtensionsController.m; path = Sources/TTExtensionsController.m; sourceTree = ""; }; - 66ADC8CC1290AC1200855386 /* TTExtensionsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionsController.h; path = Headers/TTExtensionsController.h; sourceTree = ""; }; - 66ADCD9B1291AA7100855386 /* TTExtensionInfoController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTExtensionInfoController.m; path = Sources/TTExtensionInfoController.m; sourceTree = ""; }; - 66ADCDA21291AA7E00855386 /* TTExtensionInfoController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionInfoController.h; path = Headers/TTExtensionInfoController.h; sourceTree = ""; }; - 66F2E85212D426A5006FB485 /* TTTableFooterInfiniteScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableFooterInfiniteScrollView.h; path = Headers/TTTableFooterInfiniteScrollView.h; sourceTree = ""; }; - 66F2E85512D426AF006FB485 /* TTTableFooterInfiniteScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableFooterInfiniteScrollView.m; path = Sources/TTTableFooterInfiniteScrollView.m; sourceTree = ""; }; - 66F2E85D12D426DA006FB485 /* TTTableViewNetworkEnabledDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewNetworkEnabledDelegate.h; path = Headers/TTTableViewNetworkEnabledDelegate.h; sourceTree = ""; }; - 66F2E86312D426EF006FB485 /* TTTableViewNetworkEnabledDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewNetworkEnabledDelegate.m; path = Sources/TTTableViewNetworkEnabledDelegate.m; sourceTree = ""; }; - 6E6081FF11B0C31400C93CD4 /* TTNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTNavigationController.m; path = Sources/TTNavigationController.m; sourceTree = ""; }; - 6E60820211B0C32600C93CD4 /* TTNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigationController.h; path = Headers/TTNavigationController.h; sourceTree = ""; }; - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E6454731184D2CD00F08CB1 /* Three20UI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20UI.h; path = Headers/Three20UI.h; sourceTree = ""; }; - 6E6454921184D3ED00F08CB1 /* Three20UI+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Three20UI+Additions.h"; path = "Headers/Three20UI+Additions.h"; sourceTree = ""; }; - 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6454C01184D4C500F08CB1 /* TTActionSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTActionSheet.h; path = Headers/TTActionSheet.h; sourceTree = ""; }; - 6E6454C11184D4C500F08CB1 /* TTActionSheetController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTActionSheetController.h; path = Headers/TTActionSheetController.h; sourceTree = ""; }; - 6E6454C21184D4C500F08CB1 /* TTActionSheetControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTActionSheetControllerDelegate.h; path = Headers/TTActionSheetControllerDelegate.h; sourceTree = ""; }; - 6E6454C31184D4C500F08CB1 /* TTActivityLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTActivityLabel.h; path = Headers/TTActivityLabel.h; sourceTree = ""; }; - 6E6454C41184D4C500F08CB1 /* TTAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTAlertView.h; path = Headers/TTAlertView.h; sourceTree = ""; }; - 6E6454C51184D4C500F08CB1 /* TTAlertViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTAlertViewController.h; path = Headers/TTAlertViewController.h; sourceTree = ""; }; - 6E6454C61184D4C500F08CB1 /* TTAlertViewControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTAlertViewControllerDelegate.h; path = Headers/TTAlertViewControllerDelegate.h; sourceTree = ""; }; - 6E6454C71184D4C500F08CB1 /* TTButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTButton.h; path = Headers/TTButton.h; sourceTree = ""; }; - 6E6454C81184D4C500F08CB1 /* TTButtonBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTButtonBar.h; path = Headers/TTButtonBar.h; sourceTree = ""; }; - 6E6454C91184D4C500F08CB1 /* TTButtonContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTButtonContent.h; path = Headers/TTButtonContent.h; sourceTree = ""; }; - 6E6454CA1184D4C500F08CB1 /* TTErrorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTErrorView.h; path = Headers/TTErrorView.h; sourceTree = ""; }; - 6E6454CE1184D4C500F08CB1 /* TTImageLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTImageLayer.h; path = Headers/TTImageLayer.h; sourceTree = ""; }; - 6E6454CF1184D4C500F08CB1 /* TTImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTImageView.h; path = Headers/TTImageView.h; sourceTree = ""; }; - 6E6454D01184D4C500F08CB1 /* TTImageViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTImageViewDelegate.h; path = Headers/TTImageViewDelegate.h; sourceTree = ""; }; - 6E6454D11184D4C500F08CB1 /* TTImageViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTImageViewInternal.h; path = Headers/TTImageViewInternal.h; sourceTree = ""; }; - 6E6454D21184D4C500F08CB1 /* TTLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLabel.h; path = Headers/TTLabel.h; sourceTree = ""; }; - 6E6454D31184D4C500F08CB1 /* TTLauncherButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLauncherButton.h; path = Headers/TTLauncherButton.h; sourceTree = ""; }; - 6E6454D41184D4C500F08CB1 /* TTLauncherItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLauncherItem.h; path = Headers/TTLauncherItem.h; sourceTree = ""; }; - 6E6454D51184D4C500F08CB1 /* TTLauncherScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLauncherScrollView.h; path = Headers/TTLauncherScrollView.h; sourceTree = ""; }; - 6E6454D61184D4C500F08CB1 /* TTLauncherView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLauncherView.h; path = Headers/TTLauncherView.h; sourceTree = ""; }; - 6E6454D71184D4C500F08CB1 /* TTLauncherViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLauncherViewDelegate.h; path = Headers/TTLauncherViewDelegate.h; sourceTree = ""; }; - 6E6454D81184D4C500F08CB1 /* TTLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLink.h; path = Headers/TTLink.h; sourceTree = ""; }; - 6E6454D91184D4C500F08CB1 /* TTListDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTListDataSource.h; path = Headers/TTListDataSource.h; sourceTree = ""; }; - 6E6454DA1184D4C500F08CB1 /* TTMessageController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTMessageController.h; path = Headers/TTMessageController.h; sourceTree = ""; }; - 6E6454DB1184D4C500F08CB1 /* TTMessageControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTMessageControllerDelegate.h; path = Headers/TTMessageControllerDelegate.h; sourceTree = ""; }; - 6E6454DC1184D4C500F08CB1 /* TTMessageField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTMessageField.h; path = Headers/TTMessageField.h; sourceTree = ""; }; - 6E6454DD1184D4C500F08CB1 /* TTMessageRecipientField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTMessageRecipientField.h; path = Headers/TTMessageRecipientField.h; sourceTree = ""; }; - 6E6454DE1184D4C500F08CB1 /* TTMessageSubjectField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTMessageSubjectField.h; path = Headers/TTMessageSubjectField.h; sourceTree = ""; }; - 6E6454DF1184D4C500F08CB1 /* TTMessageTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTMessageTextField.h; path = Headers/TTMessageTextField.h; sourceTree = ""; }; - 6E6454E01184D4C500F08CB1 /* TTModelViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTModelViewController.h; path = Headers/TTModelViewController.h; sourceTree = ""; }; - 6E6454E41184D4C500F08CB1 /* TTPageControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPageControl.h; path = Headers/TTPageControl.h; sourceTree = ""; }; - 6E6454E51184D4C500F08CB1 /* TTPhoto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPhoto.h; path = Headers/TTPhoto.h; sourceTree = ""; }; - 6E6454E61184D4C500F08CB1 /* TTPhotoSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPhotoSource.h; path = Headers/TTPhotoSource.h; sourceTree = ""; }; - 6E6454E71184D4C500F08CB1 /* TTPhotoVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPhotoVersion.h; path = Headers/TTPhotoVersion.h; sourceTree = ""; }; - 6E6454E81184D4C500F08CB1 /* TTPhotoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPhotoView.h; path = Headers/TTPhotoView.h; sourceTree = ""; }; - 6E6454E91184D4C500F08CB1 /* TTPhotoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPhotoViewController.h; path = Headers/TTPhotoViewController.h; sourceTree = ""; }; - 6E6454EA1184D4C500F08CB1 /* TTPickerTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPickerTextField.h; path = Headers/TTPickerTextField.h; sourceTree = ""; }; - 6E6454EB1184D4C500F08CB1 /* TTPickerTextFieldDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPickerTextFieldDelegate.h; path = Headers/TTPickerTextFieldDelegate.h; sourceTree = ""; }; - 6E6454EC1184D4C500F08CB1 /* TTPickerViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPickerViewCell.h; path = Headers/TTPickerViewCell.h; sourceTree = ""; }; - 6E6454ED1184D4C500F08CB1 /* TTPopupViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPopupViewController.h; path = Headers/TTPopupViewController.h; sourceTree = ""; }; - 6E6454EE1184D4C500F08CB1 /* TTPostController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPostController.h; path = Headers/TTPostController.h; sourceTree = ""; }; - 6E6454EF1184D4C500F08CB1 /* TTPostControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTPostControllerDelegate.h; path = Headers/TTPostControllerDelegate.h; sourceTree = ""; }; - 6E6454F01184D4C500F08CB1 /* TTRecursiveProgress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTRecursiveProgress.h; path = Headers/TTRecursiveProgress.h; sourceTree = ""; }; - 6E6454F11184D4C500F08CB1 /* TTScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTScrollView.h; path = Headers/TTScrollView.h; sourceTree = ""; }; - 6E6454F21184D4C500F08CB1 /* TTScrollViewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTScrollViewDataSource.h; path = Headers/TTScrollViewDataSource.h; sourceTree = ""; }; - 6E6454F31184D4C500F08CB1 /* TTScrollViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTScrollViewDelegate.h; path = Headers/TTScrollViewDelegate.h; sourceTree = ""; }; - 6E6454F41184D4C500F08CB1 /* TTSearchBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSearchBar.h; path = Headers/TTSearchBar.h; sourceTree = ""; }; - 6E6454F51184D4C500F08CB1 /* TTSearchDisplayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSearchDisplayController.h; path = Headers/TTSearchDisplayController.h; sourceTree = ""; }; - 6E6454F61184D4C500F08CB1 /* TTSearchlightLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSearchlightLabel.h; path = Headers/TTSearchlightLabel.h; sourceTree = ""; }; - 6E6454F71184D4C500F08CB1 /* TTSearchTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSearchTextField.h; path = Headers/TTSearchTextField.h; sourceTree = ""; }; - 6E6454F81184D4C500F08CB1 /* TTSearchTextFieldDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSearchTextFieldDelegate.h; path = Headers/TTSearchTextFieldDelegate.h; sourceTree = ""; }; - 6E6454F91184D4C500F08CB1 /* TTSearchTextFieldInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSearchTextFieldInternal.h; path = Headers/TTSearchTextFieldInternal.h; sourceTree = ""; }; - 6E6454FA1184D4C500F08CB1 /* TTSectionedDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTSectionedDataSource.h; path = Headers/TTSectionedDataSource.h; sourceTree = ""; }; - 6E6454FD1184D4C500F08CB1 /* TTStyledTextLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledTextLabel.h; path = Headers/TTStyledTextLabel.h; sourceTree = ""; }; - 6E6454FE1184D4C500F08CB1 /* TTStyledTextTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledTextTableCell.h; path = Headers/TTStyledTextTableCell.h; sourceTree = ""; }; - 6E6454FF1184D4C500F08CB1 /* TTStyledTextTableItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTStyledTextTableItemCell.h; path = Headers/TTStyledTextTableItemCell.h; sourceTree = ""; }; - 6E6455001184D4C500F08CB1 /* TTTab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTab.h; path = Headers/TTTab.h; sourceTree = ""; }; - 6E6455011184D4C500F08CB1 /* TTTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTabBar.h; path = Headers/TTTabBar.h; sourceTree = ""; }; - 6E6455021184D4C500F08CB1 /* TTTabBarInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTabBarInternal.h; path = Headers/TTTabBarInternal.h; sourceTree = ""; }; - 6E6455031184D4C500F08CB1 /* TTTabDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTabDelegate.h; path = Headers/TTTabDelegate.h; sourceTree = ""; }; - 6E6455041184D4C500F08CB1 /* TTTabGrid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTabGrid.h; path = Headers/TTTabGrid.h; sourceTree = ""; }; - 6E6455051184D4C500F08CB1 /* TTTabItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTabItem.h; path = Headers/TTTabItem.h; sourceTree = ""; }; - 6E6455061184D4C500F08CB1 /* TTTableActivityItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableActivityItem.h; path = Headers/TTTableActivityItem.h; sourceTree = ""; }; - 6E6455071184D4C500F08CB1 /* TTTableActivityItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableActivityItemCell.h; path = Headers/TTTableActivityItemCell.h; sourceTree = ""; }; - 6E6455081184D4C500F08CB1 /* TTTableButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableButton.h; path = Headers/TTTableButton.h; sourceTree = ""; }; - 6E6455091184D4C500F08CB1 /* TTTableCaptionItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableCaptionItem.h; path = Headers/TTTableCaptionItem.h; sourceTree = ""; }; - 6E64550A1184D4C500F08CB1 /* TTTableCaptionItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableCaptionItemCell.h; path = Headers/TTTableCaptionItemCell.h; sourceTree = ""; }; - 6E64550B1184D4C500F08CB1 /* TTTableControlCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableControlCell.h; path = Headers/TTTableControlCell.h; sourceTree = ""; }; - 6E64550C1184D4C500F08CB1 /* TTTableControlItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableControlItem.h; path = Headers/TTTableControlItem.h; sourceTree = ""; }; - 6E64550D1184D4C500F08CB1 /* TTTableFlushViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableFlushViewCell.h; path = Headers/TTTableFlushViewCell.h; sourceTree = ""; }; - 6E64550E1184D4C500F08CB1 /* TTTableGrayTextItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableGrayTextItem.h; path = Headers/TTTableGrayTextItem.h; sourceTree = ""; }; - 6E64550F1184D4C500F08CB1 /* TTTableHeaderDragRefreshView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableHeaderDragRefreshView.h; path = Headers/TTTableHeaderDragRefreshView.h; sourceTree = ""; }; - 6E6455101184D4C500F08CB1 /* TTTableHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableHeaderView.h; path = Headers/TTTableHeaderView.h; sourceTree = ""; }; - 6E6455111184D4C500F08CB1 /* TTTableImageItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableImageItem.h; path = Headers/TTTableImageItem.h; sourceTree = ""; }; - 6E6455121184D4C500F08CB1 /* TTTableImageItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableImageItemCell.h; path = Headers/TTTableImageItemCell.h; sourceTree = ""; }; - 6E6455131184D4C500F08CB1 /* TTTableItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableItem.h; path = Headers/TTTableItem.h; sourceTree = ""; }; - 6E6455141184D4C500F08CB1 /* TTTableLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableLink.h; path = Headers/TTTableLink.h; sourceTree = ""; }; - 6E6455151184D4C500F08CB1 /* TTTableLinkedItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableLinkedItem.h; path = Headers/TTTableLinkedItem.h; sourceTree = ""; }; - 6E6455161184D4C500F08CB1 /* TTTableLinkedItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableLinkedItemCell.h; path = Headers/TTTableLinkedItemCell.h; sourceTree = ""; }; - 6E6455171184D4C500F08CB1 /* TTTableLongTextItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableLongTextItem.h; path = Headers/TTTableLongTextItem.h; sourceTree = ""; }; - 6E6455181184D4C500F08CB1 /* TTTableMessageItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableMessageItem.h; path = Headers/TTTableMessageItem.h; sourceTree = ""; }; - 6E6455191184D4C500F08CB1 /* TTTableMessageItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableMessageItemCell.h; path = Headers/TTTableMessageItemCell.h; sourceTree = ""; }; - 6E64551A1184D4C500F08CB1 /* TTTableMoreButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableMoreButton.h; path = Headers/TTTableMoreButton.h; sourceTree = ""; }; - 6E64551B1184D4C500F08CB1 /* TTTableMoreButtonCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableMoreButtonCell.h; path = Headers/TTTableMoreButtonCell.h; sourceTree = ""; }; - 6E64551C1184D4C500F08CB1 /* TTTableRightCaptionItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableRightCaptionItem.h; path = Headers/TTTableRightCaptionItem.h; sourceTree = ""; }; - 6E64551D1184D4C500F08CB1 /* TTTableRightCaptionItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableRightCaptionItemCell.h; path = Headers/TTTableRightCaptionItemCell.h; sourceTree = ""; }; - 6E64551E1184D4C500F08CB1 /* TTTableRightImageItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableRightImageItem.h; path = Headers/TTTableRightImageItem.h; sourceTree = ""; }; - 6E64551F1184D4C500F08CB1 /* TTTableStyledTextItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableStyledTextItem.h; path = Headers/TTTableStyledTextItem.h; sourceTree = ""; }; - 6E6455201184D4C500F08CB1 /* TTTableSubtextItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableSubtextItem.h; path = Headers/TTTableSubtextItem.h; sourceTree = ""; }; - 6E6455211184D4C500F08CB1 /* TTTableSubtextItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableSubtextItemCell.h; path = Headers/TTTableSubtextItemCell.h; sourceTree = ""; }; - 6E6455221184D4C500F08CB1 /* TTTableSubtitleItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableSubtitleItem.h; path = Headers/TTTableSubtitleItem.h; sourceTree = ""; }; - 6E6455231184D4C500F08CB1 /* TTTableSubtitleItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableSubtitleItemCell.h; path = Headers/TTTableSubtitleItemCell.h; sourceTree = ""; }; - 6E6455241184D4C500F08CB1 /* TTTableSummaryItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableSummaryItem.h; path = Headers/TTTableSummaryItem.h; sourceTree = ""; }; - 6E6455251184D4C500F08CB1 /* TTTableTextItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableTextItem.h; path = Headers/TTTableTextItem.h; sourceTree = ""; }; - 6E6455261184D4C500F08CB1 /* TTTableTextItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableTextItemCell.h; path = Headers/TTTableTextItemCell.h; sourceTree = ""; }; - 6E6455271184D4C500F08CB1 /* TTTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableView.h; path = Headers/TTTableView.h; sourceTree = ""; }; - 6E6455281184D4C500F08CB1 /* TTTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewCell.h; path = Headers/TTTableViewCell.h; sourceTree = ""; }; - 6E6455291184D4C500F08CB1 /* TTTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewController.h; path = Headers/TTTableViewController.h; sourceTree = ""; }; - 6E64552A1184D4C500F08CB1 /* TTTableViewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewDataSource.h; path = Headers/TTTableViewDataSource.h; sourceTree = ""; }; - 6E64552B1184D4C500F08CB1 /* TTTableViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewDelegate.h; path = Headers/TTTableViewDelegate.h; sourceTree = ""; }; - 6E64552C1184D4C500F08CB1 /* TTTableViewDragRefreshDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewDragRefreshDelegate.h; path = Headers/TTTableViewDragRefreshDelegate.h; sourceTree = ""; }; - 6E64552D1184D4C500F08CB1 /* TTTableViewGroupedVarHeightDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewGroupedVarHeightDelegate.h; path = Headers/TTTableViewGroupedVarHeightDelegate.h; sourceTree = ""; }; - 6E64552E1184D4C500F08CB1 /* TTTableViewItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewItem.h; path = Headers/TTTableViewItem.h; sourceTree = ""; }; - 6E64552F1184D4C500F08CB1 /* TTTableViewPlainDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewPlainDelegate.h; path = Headers/TTTableViewPlainDelegate.h; sourceTree = ""; }; - 6E6455301184D4C500F08CB1 /* TTTableViewPlainVarHeightDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewPlainVarHeightDelegate.h; path = Headers/TTTableViewPlainVarHeightDelegate.h; sourceTree = ""; }; - 6E6455311184D4C500F08CB1 /* TTTableViewVarHeightDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTableViewVarHeightDelegate.h; path = Headers/TTTableViewVarHeightDelegate.h; sourceTree = ""; }; - 6E6455321184D4C500F08CB1 /* TTTabStrip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTabStrip.h; path = Headers/TTTabStrip.h; sourceTree = ""; }; - 6E6455331184D4C500F08CB1 /* TTTextBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTextBarController.h; path = Headers/TTTextBarController.h; sourceTree = ""; }; - 6E6455341184D4C500F08CB1 /* TTTextBarDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTextBarDelegate.h; path = Headers/TTTextBarDelegate.h; sourceTree = ""; }; - 6E6455351184D4C500F08CB1 /* TTTextEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTextEditor.h; path = Headers/TTTextEditor.h; sourceTree = ""; }; - 6E6455361184D4C500F08CB1 /* TTTextEditorDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTextEditorDelegate.h; path = Headers/TTTextEditorDelegate.h; sourceTree = ""; }; - 6E6455371184D4C500F08CB1 /* TTTextEditorInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTextEditorInternal.h; path = Headers/TTTextEditorInternal.h; sourceTree = ""; }; - 6E6455381184D4C500F08CB1 /* TTTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTextView.h; path = Headers/TTTextView.h; sourceTree = ""; }; - 6E6455391184D4C500F08CB1 /* TTThumbsDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTThumbsDataSource.h; path = Headers/TTThumbsDataSource.h; sourceTree = ""; }; - 6E64553A1184D4C500F08CB1 /* TTThumbsTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTThumbsTableViewCell.h; path = Headers/TTThumbsTableViewCell.h; sourceTree = ""; }; - 6E64553B1184D4C500F08CB1 /* TTThumbsTableViewCellDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTThumbsTableViewCellDelegate.h; path = Headers/TTThumbsTableViewCellDelegate.h; sourceTree = ""; }; - 6E64553C1184D4C500F08CB1 /* TTThumbsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTThumbsViewController.h; path = Headers/TTThumbsViewController.h; sourceTree = ""; }; - 6E64553D1184D4C500F08CB1 /* TTThumbsViewControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTThumbsViewControllerDelegate.h; path = Headers/TTThumbsViewControllerDelegate.h; sourceTree = ""; }; - 6E64553E1184D4C500F08CB1 /* TTThumbView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTThumbView.h; path = Headers/TTThumbView.h; sourceTree = ""; }; - 6E64553F1184D4C500F08CB1 /* TTUnclippedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTUnclippedView.h; path = Headers/TTUnclippedView.h; sourceTree = ""; }; - 6E64554F1184D4C500F08CB1 /* TTView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTView.h; path = Headers/TTView.h; sourceTree = ""; }; - 6E6455501184D4C500F08CB1 /* TTViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTViewController.h; path = Headers/TTViewController.h; sourceTree = ""; }; - 6E6455511184D4C500F08CB1 /* TTWebController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTWebController.h; path = Headers/TTWebController.h; sourceTree = ""; }; - 6E6455531184D4C500F08CB1 /* TTYouTubeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTYouTubeView.h; path = Headers/TTYouTubeView.h; sourceTree = ""; }; - 6E6455541184D4C500F08CB1 /* UINavigationControllerAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UINavigationControllerAdditions.h; path = Headers/UINavigationControllerAdditions.h; sourceTree = ""; }; - 6E6455551184D4C500F08CB1 /* UINSObjectAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UINSObjectAdditions.h; path = Headers/UINSObjectAdditions.h; sourceTree = ""; }; - 6E6455561184D4C500F08CB1 /* UINSStringAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UINSStringAdditions.h; path = Headers/UINSStringAdditions.h; sourceTree = ""; }; - 6E6455571184D4C500F08CB1 /* UITabBarControllerAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UITabBarControllerAdditions.h; path = Headers/UITabBarControllerAdditions.h; sourceTree = ""; }; - 6E6455581184D4C500F08CB1 /* UITableViewAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UITableViewAdditions.h; path = Headers/UITableViewAdditions.h; sourceTree = ""; }; - 6E6455591184D4C500F08CB1 /* UIToolbarAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIToolbarAdditions.h; path = Headers/UIToolbarAdditions.h; sourceTree = ""; }; - 6E64555A1184D4C500F08CB1 /* UIViewAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIViewAdditions.h; path = Headers/UIViewAdditions.h; sourceTree = ""; }; - 6E64555C1184D4C500F08CB1 /* UIWebViewAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIWebViewAdditions.h; path = Headers/UIWebViewAdditions.h; sourceTree = ""; }; - 6E6455FF1184D4DA00F08CB1 /* TTActionSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTActionSheet.m; path = Sources/TTActionSheet.m; sourceTree = ""; }; - 6E6456001184D4DA00F08CB1 /* TTActionSheetController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTActionSheetController.m; path = Sources/TTActionSheetController.m; sourceTree = ""; }; - 6E6456011184D4DA00F08CB1 /* TTActivityLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTActivityLabel.m; path = Sources/TTActivityLabel.m; sourceTree = ""; }; - 6E6456021184D4DA00F08CB1 /* TTAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTAlertView.m; path = Sources/TTAlertView.m; sourceTree = ""; }; - 6E6456031184D4DA00F08CB1 /* TTAlertViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTAlertViewController.m; path = Sources/TTAlertViewController.m; sourceTree = ""; }; - 6E6456041184D4DA00F08CB1 /* TTButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTButton.m; path = Sources/TTButton.m; sourceTree = ""; }; - 6E6456051184D4DA00F08CB1 /* TTButtonBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTButtonBar.m; path = Sources/TTButtonBar.m; sourceTree = ""; }; - 6E6456061184D4DA00F08CB1 /* TTButtonContent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTButtonContent.m; path = Sources/TTButtonContent.m; sourceTree = ""; }; - 6E6456071184D4DA00F08CB1 /* TTErrorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTErrorView.m; path = Sources/TTErrorView.m; sourceTree = ""; }; - 6E64560B1184D4DA00F08CB1 /* TTImageLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTImageLayer.m; path = Sources/TTImageLayer.m; sourceTree = ""; }; - 6E64560C1184D4DA00F08CB1 /* TTImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTImageView.m; path = Sources/TTImageView.m; sourceTree = ""; }; - 6E64560D1184D4DA00F08CB1 /* TTImageViewInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTImageViewInternal.m; path = Sources/TTImageViewInternal.m; sourceTree = ""; }; - 6E64560E1184D4DA00F08CB1 /* TTLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLabel.m; path = Sources/TTLabel.m; sourceTree = ""; }; - 6E64560F1184D4DA00F08CB1 /* TTLauncherButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLauncherButton.m; path = Sources/TTLauncherButton.m; sourceTree = ""; }; - 6E6456101184D4DA00F08CB1 /* TTLauncherItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLauncherItem.m; path = Sources/TTLauncherItem.m; sourceTree = ""; }; - 6E6456111184D4DA00F08CB1 /* TTLauncherScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLauncherScrollView.m; path = Sources/TTLauncherScrollView.m; sourceTree = ""; }; - 6E6456121184D4DA00F08CB1 /* TTLauncherView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLauncherView.m; path = Sources/TTLauncherView.m; sourceTree = ""; }; - 6E6456131184D4DA00F08CB1 /* TTLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLink.m; path = Sources/TTLink.m; sourceTree = ""; }; - 6E6456141184D4DA00F08CB1 /* TTListDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTListDataSource.m; path = Sources/TTListDataSource.m; sourceTree = ""; }; - 6E6456151184D4DA00F08CB1 /* TTMessageController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTMessageController.m; path = Sources/TTMessageController.m; sourceTree = ""; }; - 6E6456161184D4DA00F08CB1 /* TTMessageField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTMessageField.m; path = Sources/TTMessageField.m; sourceTree = ""; }; - 6E6456171184D4DA00F08CB1 /* TTMessageRecipientField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTMessageRecipientField.m; path = Sources/TTMessageRecipientField.m; sourceTree = ""; }; - 6E6456181184D4DA00F08CB1 /* TTMessageSubjectField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTMessageSubjectField.m; path = Sources/TTMessageSubjectField.m; sourceTree = ""; }; - 6E6456191184D4DA00F08CB1 /* TTMessageTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTMessageTextField.m; path = Sources/TTMessageTextField.m; sourceTree = ""; }; - 6E64561A1184D4DA00F08CB1 /* TTModelViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTModelViewController.m; path = Sources/TTModelViewController.m; sourceTree = ""; }; - 6E64561D1184D4DA00F08CB1 /* TTPageControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTPageControl.m; path = Sources/TTPageControl.m; sourceTree = ""; }; - 6E64561E1184D4DA00F08CB1 /* TTPhotoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTPhotoView.m; path = Sources/TTPhotoView.m; sourceTree = ""; }; - 6E64561F1184D4DA00F08CB1 /* TTPhotoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTPhotoViewController.m; path = Sources/TTPhotoViewController.m; sourceTree = ""; }; - 6E6456201184D4DA00F08CB1 /* TTPickerTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTPickerTextField.m; path = Sources/TTPickerTextField.m; sourceTree = ""; }; - 6E6456211184D4DA00F08CB1 /* TTPickerViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTPickerViewCell.m; path = Sources/TTPickerViewCell.m; sourceTree = ""; }; - 6E6456221184D4DA00F08CB1 /* TTPopupViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTPopupViewController.m; path = Sources/TTPopupViewController.m; sourceTree = ""; }; - 6E6456231184D4DA00F08CB1 /* TTPostController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTPostController.m; path = Sources/TTPostController.m; sourceTree = ""; }; - 6E6456241184D4DA00F08CB1 /* TTRecursiveProgress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTRecursiveProgress.m; path = Sources/TTRecursiveProgress.m; sourceTree = ""; }; - 6E6456251184D4DA00F08CB1 /* TTScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTScrollView.m; path = Sources/TTScrollView.m; sourceTree = ""; }; - 6E6456261184D4DA00F08CB1 /* TTSearchBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSearchBar.m; path = Sources/TTSearchBar.m; sourceTree = ""; }; - 6E6456271184D4DA00F08CB1 /* TTSearchDisplayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSearchDisplayController.m; path = Sources/TTSearchDisplayController.m; sourceTree = ""; }; - 6E6456281184D4DA00F08CB1 /* TTSearchlightLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSearchlightLabel.m; path = Sources/TTSearchlightLabel.m; sourceTree = ""; }; - 6E6456291184D4DA00F08CB1 /* TTSearchTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSearchTextField.m; path = Sources/TTSearchTextField.m; sourceTree = ""; }; - 6E64562A1184D4DA00F08CB1 /* TTSearchTextFieldInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSearchTextFieldInternal.m; path = Sources/TTSearchTextFieldInternal.m; sourceTree = ""; }; - 6E64562B1184D4DA00F08CB1 /* TTSectionedDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTSectionedDataSource.m; path = Sources/TTSectionedDataSource.m; sourceTree = ""; }; - 6E64562E1184D4DA00F08CB1 /* TTStyledTextLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledTextLabel.m; path = Sources/TTStyledTextLabel.m; sourceTree = ""; }; - 6E64562F1184D4DA00F08CB1 /* TTStyledTextTableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledTextTableCell.m; path = Sources/TTStyledTextTableCell.m; sourceTree = ""; }; - 6E6456301184D4DA00F08CB1 /* TTStyledTextTableItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTStyledTextTableItemCell.m; path = Sources/TTStyledTextTableItemCell.m; sourceTree = ""; }; - 6E6456311184D4DA00F08CB1 /* TTTab.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTab.m; path = Sources/TTTab.m; sourceTree = ""; }; - 6E6456321184D4DA00F08CB1 /* TTTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTabBar.m; path = Sources/TTTabBar.m; sourceTree = ""; }; - 6E6456331184D4DA00F08CB1 /* TTTabBarInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTabBarInternal.m; path = Sources/TTTabBarInternal.m; sourceTree = ""; }; - 6E6456341184D4DA00F08CB1 /* TTTabGrid.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTabGrid.m; path = Sources/TTTabGrid.m; sourceTree = ""; }; - 6E6456351184D4DA00F08CB1 /* TTTabItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTabItem.m; path = Sources/TTTabItem.m; sourceTree = ""; }; - 6E6456361184D4DA00F08CB1 /* TTTableActivityItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableActivityItem.m; path = Sources/TTTableActivityItem.m; sourceTree = ""; }; - 6E6456371184D4DA00F08CB1 /* TTTableActivityItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableActivityItemCell.m; path = Sources/TTTableActivityItemCell.m; sourceTree = ""; }; - 6E6456381184D4DA00F08CB1 /* TTTableButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableButton.m; path = Sources/TTTableButton.m; sourceTree = ""; }; - 6E6456391184D4DA00F08CB1 /* TTTableCaptionItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableCaptionItem.m; path = Sources/TTTableCaptionItem.m; sourceTree = ""; }; - 6E64563A1184D4DA00F08CB1 /* TTTableCaptionItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableCaptionItemCell.m; path = Sources/TTTableCaptionItemCell.m; sourceTree = ""; }; - 6E64563B1184D4DA00F08CB1 /* TTTableControlCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableControlCell.m; path = Sources/TTTableControlCell.m; sourceTree = ""; }; - 6E64563C1184D4DA00F08CB1 /* TTTableControlItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableControlItem.m; path = Sources/TTTableControlItem.m; sourceTree = ""; }; - 6E64563D1184D4DA00F08CB1 /* TTTableFlushViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableFlushViewCell.m; path = Sources/TTTableFlushViewCell.m; sourceTree = ""; }; - 6E64563E1184D4DA00F08CB1 /* TTTableGrayTextItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableGrayTextItem.m; path = Sources/TTTableGrayTextItem.m; sourceTree = ""; }; - 6E64563F1184D4DA00F08CB1 /* TTTableHeaderDragRefreshView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableHeaderDragRefreshView.m; path = Sources/TTTableHeaderDragRefreshView.m; sourceTree = ""; }; - 6E6456401184D4DA00F08CB1 /* TTTableHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableHeaderView.m; path = Sources/TTTableHeaderView.m; sourceTree = ""; }; - 6E6456411184D4DA00F08CB1 /* TTTableImageItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableImageItem.m; path = Sources/TTTableImageItem.m; sourceTree = ""; }; - 6E6456421184D4DA00F08CB1 /* TTTableImageItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableImageItemCell.m; path = Sources/TTTableImageItemCell.m; sourceTree = ""; }; - 6E6456431184D4DA00F08CB1 /* TTTableItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableItem.m; path = Sources/TTTableItem.m; sourceTree = ""; }; - 6E6456441184D4DA00F08CB1 /* TTTableLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableLink.m; path = Sources/TTTableLink.m; sourceTree = ""; }; - 6E6456451184D4DA00F08CB1 /* TTTableLinkedItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableLinkedItem.m; path = Sources/TTTableLinkedItem.m; sourceTree = ""; }; - 6E6456461184D4DA00F08CB1 /* TTTableLinkedItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableLinkedItemCell.m; path = Sources/TTTableLinkedItemCell.m; sourceTree = ""; }; - 6E6456471184D4DA00F08CB1 /* TTTableLongTextItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableLongTextItem.m; path = Sources/TTTableLongTextItem.m; sourceTree = ""; }; - 6E6456481184D4DA00F08CB1 /* TTTableMessageItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableMessageItem.m; path = Sources/TTTableMessageItem.m; sourceTree = ""; }; - 6E6456491184D4DA00F08CB1 /* TTTableMessageItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableMessageItemCell.m; path = Sources/TTTableMessageItemCell.m; sourceTree = ""; }; - 6E64564A1184D4DA00F08CB1 /* TTTableMoreButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableMoreButton.m; path = Sources/TTTableMoreButton.m; sourceTree = ""; }; - 6E64564B1184D4DA00F08CB1 /* TTTableMoreButtonCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableMoreButtonCell.m; path = Sources/TTTableMoreButtonCell.m; sourceTree = ""; }; - 6E64564C1184D4DA00F08CB1 /* TTTableRightCaptionItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableRightCaptionItem.m; path = Sources/TTTableRightCaptionItem.m; sourceTree = ""; }; - 6E64564D1184D4DA00F08CB1 /* TTTableRightCaptionItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableRightCaptionItemCell.m; path = Sources/TTTableRightCaptionItemCell.m; sourceTree = ""; }; - 6E64564E1184D4DA00F08CB1 /* TTTableRightImageItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableRightImageItem.m; path = Sources/TTTableRightImageItem.m; sourceTree = ""; }; - 6E64564F1184D4DA00F08CB1 /* TTTableStyledTextItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableStyledTextItem.m; path = Sources/TTTableStyledTextItem.m; sourceTree = ""; }; - 6E6456501184D4DA00F08CB1 /* TTTableSubtextItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableSubtextItem.m; path = Sources/TTTableSubtextItem.m; sourceTree = ""; }; - 6E6456511184D4DA00F08CB1 /* TTTableSubtextItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableSubtextItemCell.m; path = Sources/TTTableSubtextItemCell.m; sourceTree = ""; }; - 6E6456521184D4DA00F08CB1 /* TTTableSubtitleItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableSubtitleItem.m; path = Sources/TTTableSubtitleItem.m; sourceTree = ""; }; - 6E6456531184D4DA00F08CB1 /* TTTableSubtitleItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableSubtitleItemCell.m; path = Sources/TTTableSubtitleItemCell.m; sourceTree = ""; }; - 6E6456541184D4DA00F08CB1 /* TTTableSummaryItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableSummaryItem.m; path = Sources/TTTableSummaryItem.m; sourceTree = ""; }; - 6E6456551184D4DA00F08CB1 /* TTTableTextItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableTextItem.m; path = Sources/TTTableTextItem.m; sourceTree = ""; }; - 6E6456561184D4DA00F08CB1 /* TTTableTextItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableTextItemCell.m; path = Sources/TTTableTextItemCell.m; sourceTree = ""; }; - 6E6456571184D4DA00F08CB1 /* TTTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableView.m; path = Sources/TTTableView.m; sourceTree = ""; }; - 6E6456581184D4DA00F08CB1 /* TTTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewCell.m; path = Sources/TTTableViewCell.m; sourceTree = ""; }; - 6E6456591184D4DA00F08CB1 /* TTTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewController.m; path = Sources/TTTableViewController.m; sourceTree = ""; }; - 6E64565A1184D4DA00F08CB1 /* TTTableViewDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewDataSource.m; path = Sources/TTTableViewDataSource.m; sourceTree = ""; }; - 6E64565B1184D4DA00F08CB1 /* TTTableViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewDelegate.m; path = Sources/TTTableViewDelegate.m; sourceTree = ""; }; - 6E64565C1184D4DA00F08CB1 /* TTTableViewDragRefreshDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewDragRefreshDelegate.m; path = Sources/TTTableViewDragRefreshDelegate.m; sourceTree = ""; }; - 6E64565D1184D4DA00F08CB1 /* TTTableViewGroupedVarHeightDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewGroupedVarHeightDelegate.m; path = Sources/TTTableViewGroupedVarHeightDelegate.m; sourceTree = ""; }; - 6E64565E1184D4DA00F08CB1 /* TTTableViewItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewItem.m; path = Sources/TTTableViewItem.m; sourceTree = ""; }; - 6E64565F1184D4DA00F08CB1 /* TTTableViewPlainDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewPlainDelegate.m; path = Sources/TTTableViewPlainDelegate.m; sourceTree = ""; }; - 6E6456601184D4DA00F08CB1 /* TTTableViewPlainVarHeightDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewPlainVarHeightDelegate.m; path = Sources/TTTableViewPlainVarHeightDelegate.m; sourceTree = ""; }; - 6E6456611184D4DA00F08CB1 /* TTTableViewVarHeightDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTableViewVarHeightDelegate.m; path = Sources/TTTableViewVarHeightDelegate.m; sourceTree = ""; }; - 6E6456621184D4DA00F08CB1 /* TTTabStrip.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTabStrip.m; path = Sources/TTTabStrip.m; sourceTree = ""; }; - 6E6456631184D4DA00F08CB1 /* TTTextBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTextBarController.m; path = Sources/TTTextBarController.m; sourceTree = ""; }; - 6E6456641184D4DA00F08CB1 /* TTTextEditor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTextEditor.m; path = Sources/TTTextEditor.m; sourceTree = ""; }; - 6E6456651184D4DA00F08CB1 /* TTTextEditorInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTextEditorInternal.m; path = Sources/TTTextEditorInternal.m; sourceTree = ""; }; - 6E6456661184D4DA00F08CB1 /* TTTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTextView.m; path = Sources/TTTextView.m; sourceTree = ""; }; - 6E6456671184D4DA00F08CB1 /* TTThumbsDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTThumbsDataSource.m; path = Sources/TTThumbsDataSource.m; sourceTree = ""; }; - 6E6456681184D4DA00F08CB1 /* TTThumbsTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTThumbsTableViewCell.m; path = Sources/TTThumbsTableViewCell.m; sourceTree = ""; }; - 6E6456691184D4DA00F08CB1 /* TTThumbsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTThumbsViewController.m; path = Sources/TTThumbsViewController.m; sourceTree = ""; }; - 6E64566A1184D4DA00F08CB1 /* TTThumbView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTThumbView.m; path = Sources/TTThumbView.m; sourceTree = ""; }; - 6E64566B1184D4DA00F08CB1 /* TTUnclippedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTUnclippedView.m; path = Sources/TTUnclippedView.m; sourceTree = ""; }; - 6E6456781184D4DA00F08CB1 /* TTView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTView.m; path = Sources/TTView.m; sourceTree = ""; }; - 6E6456791184D4DA00F08CB1 /* TTViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTViewController.m; path = Sources/TTViewController.m; sourceTree = ""; }; - 6E64567A1184D4DA00F08CB1 /* TTWebController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTWebController.m; path = Sources/TTWebController.m; sourceTree = ""; }; - 6E64567C1184D4DA00F08CB1 /* TTYouTubeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTYouTubeView.m; path = Sources/TTYouTubeView.m; sourceTree = ""; }; - 6E64567D1184D4DA00F08CB1 /* UINavigationControllerAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UINavigationControllerAdditions.m; path = Sources/UINavigationControllerAdditions.m; sourceTree = ""; }; - 6E64567E1184D4DA00F08CB1 /* UINSObjectAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UINSObjectAdditions.m; path = Sources/UINSObjectAdditions.m; sourceTree = ""; }; - 6E64567F1184D4DA00F08CB1 /* UINSStringAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UINSStringAdditions.m; path = Sources/UINSStringAdditions.m; sourceTree = ""; }; - 6E6456801184D4DA00F08CB1 /* UITabBarControllerAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UITabBarControllerAdditions.m; path = Sources/UITabBarControllerAdditions.m; sourceTree = ""; }; - 6E6456811184D4DA00F08CB1 /* UITableViewAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UITableViewAdditions.m; path = Sources/UITableViewAdditions.m; sourceTree = ""; }; - 6E6456821184D4DA00F08CB1 /* UIToolbarAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIToolbarAdditions.m; path = Sources/UIToolbarAdditions.m; sourceTree = ""; }; - 6E6456831184D4DA00F08CB1 /* UIViewAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIViewAdditions.m; path = Sources/UIViewAdditions.m; sourceTree = ""; }; - 6E6456851184D4DA00F08CB1 /* UIWebViewAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIWebViewAdditions.m; path = Sources/UIWebViewAdditions.m; sourceTree = ""; }; - 6E6458CB11875F8400F08CB1 /* Three20UI_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20UI_Prefix.pch; path = Headers/Three20UI_Prefix.pch; sourceTree = ""; }; - 6E6459371187645D00F08CB1 /* UIGlobalTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIGlobalTests.m; path = UnitTests/UIGlobalTests.m; sourceTree = ""; }; - 6E86A8DA118CBF7500662DA5 /* TTNavigatorWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigatorWindow.h; path = Headers/TTNavigatorWindow.h; sourceTree = ""; }; - 6E86A8EB118CBF8E00662DA5 /* TTNavigatorWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTNavigatorWindow.m; path = Sources/TTNavigatorWindow.m; sourceTree = ""; }; - 6ECCA5FC11C0C0F6002296C7 /* TTLauncherHighlightView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTLauncherHighlightView.m; path = Sources/TTLauncherHighlightView.m; sourceTree = ""; }; - 6ECCA5FF11C0C105002296C7 /* TTLauncherHighlightView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTLauncherHighlightView.h; path = Headers/TTLauncherHighlightView.h; sourceTree = ""; }; - 6EDAE9F5118CA5810008133C /* TTNavigator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigator.h; path = Headers/TTNavigator.h; sourceTree = ""; }; - 6EDAEA01118CA59C0008133C /* TTNavigator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTNavigator.m; path = Sources/TTNavigator.m; sourceTree = ""; }; - 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../Three20UICommon/Three20UICommon.xcodeproj; sourceTree = ""; }; - 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = ""; }; - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EE7364B11849B3D00A35176 /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - BEF31F3A0F352DF5000DE5D2 /* libThree20UI.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libThree20UI.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* UIUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */, - 6EE738A61184ADB800A35176 /* libThree20Network.a in Frameworks */, - 6EE739D01184BB0400A35176 /* libThree20UI.a in Frameworks */, - 6E6454AA1184D43100F08CB1 /* libThree20Style.a in Frameworks */, - 6EDAEA1D118CA5E20008133C /* libThree20UICommon.a in Frameworks */, - 6EDAEA1E118CA5E20008133C /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libThree20UI.a */, - EB9E6C6210B6A8F800DE563C /* UIUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6E6454731184D2CD00F08CB1 /* Three20UI.h */, - 6E6454921184D3ED00F08CB1 /* Three20UI+Additions.h */, - 6E6458CB11875F8400F08CB1 /* Three20UI_Prefix.pch */, - 6EE737001184A1D500A35176 /* Source */, - 6E08B743118397FA00DA1579 /* Dependencies */, - 6EE7364D11849B4200A35176 /* Configurations */, - 6E08B274118282F700DA1579 /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 66ADC8C31290ABDD00855386 /* Extensions */ = { - isa = PBXGroup; - children = ( - 66ADC8CC1290AC1200855386 /* TTExtensionsController.h */, - 66ADC8C61290AC0200855386 /* TTExtensionsController.m */, - 66ADCDA21291AA7E00855386 /* TTExtensionInfoController.h */, - 66ADCD9B1291AA7100855386 /* TTExtensionInfoController.m */, - ); - name = Extensions; - sourceTree = ""; - }; - 6E08B274118282F700DA1579 /* Tests */ = { - isa = PBXGroup; - children = ( - 6EE7364611849AF200A35176 /* Resources */, - 6E6459371187645D00F08CB1 /* UIGlobalTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6E08B743118397FA00DA1579 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */, - 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */, - 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */, - 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */, - 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E6454A21184D42800F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E6454A71184D42800F08CB1 /* libThree20Style.a */, - 6E6454A91184D42800F08CB1 /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E6457981184D53100F08CB1 /* Additions */ = { - isa = PBXGroup; - children = ( - 6E6455541184D4C500F08CB1 /* UINavigationControllerAdditions.h */, - 6E64567D1184D4DA00F08CB1 /* UINavigationControllerAdditions.m */, - 6E6455551184D4C500F08CB1 /* UINSObjectAdditions.h */, - 6E64567E1184D4DA00F08CB1 /* UINSObjectAdditions.m */, - 6E6455561184D4C500F08CB1 /* UINSStringAdditions.h */, - 6E64567F1184D4DA00F08CB1 /* UINSStringAdditions.m */, - 6E6455571184D4C500F08CB1 /* UITabBarControllerAdditions.h */, - 6E6456801184D4DA00F08CB1 /* UITabBarControllerAdditions.m */, - 6E6455581184D4C500F08CB1 /* UITableViewAdditions.h */, - 6E6456811184D4DA00F08CB1 /* UITableViewAdditions.m */, - 6E6455591184D4C500F08CB1 /* UIToolbarAdditions.h */, - 6E6456821184D4DA00F08CB1 /* UIToolbarAdditions.m */, - 6E64555A1184D4C500F08CB1 /* UIViewAdditions.h */, - 6E6456831184D4DA00F08CB1 /* UIViewAdditions.m */, - 6E64555C1184D4C500F08CB1 /* UIWebViewAdditions.h */, - 6E6456851184D4DA00F08CB1 /* UIWebViewAdditions.m */, - ); - name = Additions; - sourceTree = ""; - }; - 6E6457A01184D78000F08CB1 /* View Controllers */ = { - isa = PBXGroup; - children = ( - 6E6455501184D4C500F08CB1 /* TTViewController.h */, - 6E6456791184D4DA00F08CB1 /* TTViewController.m */, - 666E18F41294543F001C1D97 /* TTSplitViewController.h */, - 666E18E712945430001C1D97 /* TTSplitViewController.m */, - 6E60820211B0C32600C93CD4 /* TTNavigationController.h */, - 6E6081FF11B0C31400C93CD4 /* TTNavigationController.m */, - 6E6457A81184D85D00F08CB1 /* Action Sheet Controller */, - 6E6457A91184D86F00F08CB1 /* Alert Controller */, - 66ADC8C31290ABDD00855386 /* Extensions */, - 6E6457A51184D80F00F08CB1 /* Message Controller */, - 6E6457A21184D7D600F08CB1 /* Model Controller */, - 6E6457A31184D7E600F08CB1 /* Photo Controller */, - 6E6457A41184D7F000F08CB1 /* Popup Controller */, - 6E6457AC1184D8CC00F08CB1 /* Post Controller */, - 6E6457AD1184D8F600F08CB1 /* Text Bar Controller */, - 6E6457A11184D7A300F08CB1 /* Web Controller */, - ); - name = "View Controllers"; - sourceTree = ""; - }; - 6E6457A11184D7A300F08CB1 /* Web Controller */ = { - isa = PBXGroup; - children = ( - 6E6455511184D4C500F08CB1 /* TTWebController.h */, - 6E64567A1184D4DA00F08CB1 /* TTWebController.m */, - ); - name = "Web Controller"; - sourceTree = ""; - }; - 6E6457A21184D7D600F08CB1 /* Model Controller */ = { - isa = PBXGroup; - children = ( - 6E6454E01184D4C500F08CB1 /* TTModelViewController.h */, - 6E64561A1184D4DA00F08CB1 /* TTModelViewController.m */, - ); - name = "Model Controller"; - sourceTree = ""; - }; - 6E6457A31184D7E600F08CB1 /* Photo Controller */ = { - isa = PBXGroup; - children = ( - 6E6454E91184D4C500F08CB1 /* TTPhotoViewController.h */, - 6E64561F1184D4DA00F08CB1 /* TTPhotoViewController.m */, - ); - name = "Photo Controller"; - sourceTree = ""; - }; - 6E6457A41184D7F000F08CB1 /* Popup Controller */ = { - isa = PBXGroup; - children = ( - 6E6454ED1184D4C500F08CB1 /* TTPopupViewController.h */, - 6E6456221184D4DA00F08CB1 /* TTPopupViewController.m */, - ); - name = "Popup Controller"; - sourceTree = ""; - }; - 6E6457A51184D80F00F08CB1 /* Message Controller */ = { - isa = PBXGroup; - children = ( - 6E6454DA1184D4C500F08CB1 /* TTMessageController.h */, - 6E6456151184D4DA00F08CB1 /* TTMessageController.m */, - 6E6454DB1184D4C500F08CB1 /* TTMessageControllerDelegate.h */, - 6E6457A61184D82F00F08CB1 /* Message Field */, - ); - name = "Message Controller"; - sourceTree = ""; - }; - 6E6457A61184D82F00F08CB1 /* Message Field */ = { - isa = PBXGroup; - children = ( - 6E6454DC1184D4C500F08CB1 /* TTMessageField.h */, - 6E6456161184D4DA00F08CB1 /* TTMessageField.m */, - 6E6457A71184D83B00F08CB1 /* Message Fields */, - ); - name = "Message Field"; - sourceTree = ""; - }; - 6E6457A71184D83B00F08CB1 /* Message Fields */ = { - isa = PBXGroup; - children = ( - 6E6454DD1184D4C500F08CB1 /* TTMessageRecipientField.h */, - 6E6456171184D4DA00F08CB1 /* TTMessageRecipientField.m */, - 6E6454DE1184D4C500F08CB1 /* TTMessageSubjectField.h */, - 6E6456181184D4DA00F08CB1 /* TTMessageSubjectField.m */, - 6E6454DF1184D4C500F08CB1 /* TTMessageTextField.h */, - 6E6456191184D4DA00F08CB1 /* TTMessageTextField.m */, - ); - name = "Message Fields"; - sourceTree = ""; - }; - 6E6457A81184D85D00F08CB1 /* Action Sheet Controller */ = { - isa = PBXGroup; - children = ( - 6E6454C11184D4C500F08CB1 /* TTActionSheetController.h */, - 6E6456001184D4DA00F08CB1 /* TTActionSheetController.m */, - 6E6454C21184D4C500F08CB1 /* TTActionSheetControllerDelegate.h */, - 6E6457AB1184D8AA00F08CB1 /* Action Sheet */, - ); - name = "Action Sheet Controller"; - sourceTree = ""; - }; - 6E6457A91184D86F00F08CB1 /* Alert Controller */ = { - isa = PBXGroup; - children = ( - 6E6454C51184D4C500F08CB1 /* TTAlertViewController.h */, - 6E6456031184D4DA00F08CB1 /* TTAlertViewController.m */, - 6E6454C61184D4C500F08CB1 /* TTAlertViewControllerDelegate.h */, - 6E6457AA1184D89100F08CB1 /* Alert View */, - ); - name = "Alert Controller"; - sourceTree = ""; - }; - 6E6457AA1184D89100F08CB1 /* Alert View */ = { - isa = PBXGroup; - children = ( - 6E6454C41184D4C500F08CB1 /* TTAlertView.h */, - 6E6456021184D4DA00F08CB1 /* TTAlertView.m */, - ); - name = "Alert View"; - sourceTree = ""; - }; - 6E6457AB1184D8AA00F08CB1 /* Action Sheet */ = { - isa = PBXGroup; - children = ( - 6E6454C01184D4C500F08CB1 /* TTActionSheet.h */, - 6E6455FF1184D4DA00F08CB1 /* TTActionSheet.m */, - ); - name = "Action Sheet"; - sourceTree = ""; - }; - 6E6457AC1184D8CC00F08CB1 /* Post Controller */ = { - isa = PBXGroup; - children = ( - 6E6454EE1184D4C500F08CB1 /* TTPostController.h */, - 6E6456231184D4DA00F08CB1 /* TTPostController.m */, - 6E6454EF1184D4C500F08CB1 /* TTPostControllerDelegate.h */, - ); - name = "Post Controller"; - sourceTree = ""; - }; - 6E6457AD1184D8F600F08CB1 /* Text Bar Controller */ = { - isa = PBXGroup; - children = ( - 6E6455331184D4C500F08CB1 /* TTTextBarController.h */, - 6E6456631184D4DA00F08CB1 /* TTTextBarController.m */, - 6E6455341184D4C500F08CB1 /* TTTextBarDelegate.h */, - ); - name = "Text Bar Controller"; - sourceTree = ""; - }; - 6E6457AE1184D91100F08CB1 /* Views */ = { - isa = PBXGroup; - children = ( - 6E64554F1184D4C500F08CB1 /* TTView.h */, - 6E6456781184D4DA00F08CB1 /* TTView.m */, - 6E6457B01184D95300F08CB1 /* Image View */, - 6E6457B21184D9C200F08CB1 /* Scroll View */, - 6E6458431184E30000F08CB1 /* Unclipped View */, - 6E6457AF1184D93200F08CB1 /* YouTube View */, - ); - name = Views; - sourceTree = ""; - }; - 6E6457AF1184D93200F08CB1 /* YouTube View */ = { - isa = PBXGroup; - children = ( - 6E6455531184D4C500F08CB1 /* TTYouTubeView.h */, - 6E64567C1184D4DA00F08CB1 /* TTYouTubeView.m */, - ); - name = "YouTube View"; - sourceTree = ""; - }; - 6E6457B01184D95300F08CB1 /* Image View */ = { - isa = PBXGroup; - children = ( - 6E6454CF1184D4C500F08CB1 /* TTImageView.h */, - 6E64560C1184D4DA00F08CB1 /* TTImageView.m */, - 6E6454D01184D4C500F08CB1 /* TTImageViewDelegate.h */, - 6E6457B11184D96100F08CB1 /* Private */, - ); - name = "Image View"; - sourceTree = ""; - }; - 6E6457B11184D96100F08CB1 /* Private */ = { - isa = PBXGroup; - children = ( - 6E6454CE1184D4C500F08CB1 /* TTImageLayer.h */, - 6E64560B1184D4DA00F08CB1 /* TTImageLayer.m */, - 6E6454D11184D4C500F08CB1 /* TTImageViewInternal.h */, - 6E64560D1184D4DA00F08CB1 /* TTImageViewInternal.m */, - ); - name = Private; - sourceTree = ""; - }; - 6E6457B21184D9C200F08CB1 /* Scroll View */ = { - isa = PBXGroup; - children = ( - 6E6454F11184D4C500F08CB1 /* TTScrollView.h */, - 6E6456251184D4DA00F08CB1 /* TTScrollView.m */, - 6E6454F21184D4C500F08CB1 /* TTScrollViewDataSource.h */, - 6E6454F31184D4C500F08CB1 /* TTScrollViewDelegate.h */, - ); - name = "Scroll View"; - sourceTree = ""; - }; - 6E6457B31184DA7600F08CB1 /* Labels */ = { - isa = PBXGroup; - children = ( - 6E6454D21184D4C500F08CB1 /* TTLabel.h */, - 6E64560E1184D4DA00F08CB1 /* TTLabel.m */, - 6E6457B51184DAD000F08CB1 /* Activity Label */, - 6E6457B61184DAEC00F08CB1 /* Searchlight Label */, - 6E6457B41184DAC600F08CB1 /* Styled Text Label */, - ); - name = Labels; - sourceTree = ""; - }; - 6E6457B41184DAC600F08CB1 /* Styled Text Label */ = { - isa = PBXGroup; - children = ( - 6E6454FD1184D4C500F08CB1 /* TTStyledTextLabel.h */, - 6E64562E1184D4DA00F08CB1 /* TTStyledTextLabel.m */, - ); - name = "Styled Text Label"; - sourceTree = ""; - }; - 6E6457B51184DAD000F08CB1 /* Activity Label */ = { - isa = PBXGroup; - children = ( - 6E6454C31184D4C500F08CB1 /* TTActivityLabel.h */, - 6E6456011184D4DA00F08CB1 /* TTActivityLabel.m */, - ); - name = "Activity Label"; - sourceTree = ""; - }; - 6E6457B61184DAEC00F08CB1 /* Searchlight Label */ = { - isa = PBXGroup; - children = ( - 6E6454F61184D4C500F08CB1 /* TTSearchlightLabel.h */, - 6E6456281184D4DA00F08CB1 /* TTSearchlightLabel.m */, - ); - name = "Searchlight Label"; - sourceTree = ""; - }; - 6E6457B71184DB1700F08CB1 /* Buttons and Tabs */ = { - isa = PBXGroup; - children = ( - 6E6454C71184D4C500F08CB1 /* TTButton.h */, - 6E6456041184D4DA00F08CB1 /* TTButton.m */, - 6E6457B91184DB4000F08CB1 /* Private */, - 6E6457B81184DB3500F08CB1 /* Button Bar */, - 6E6457BA1184DB5D00F08CB1 /* Link */, - 6E64581D1184DDDF00F08CB1 /* Page Control */, - 6E6457BB1184DB9900F08CB1 /* Tab Bar */, - ); - name = "Buttons and Tabs"; - sourceTree = ""; - }; - 6E6457B81184DB3500F08CB1 /* Button Bar */ = { - isa = PBXGroup; - children = ( - 6E6454C81184D4C500F08CB1 /* TTButtonBar.h */, - 6E6456051184D4DA00F08CB1 /* TTButtonBar.m */, - ); - name = "Button Bar"; - sourceTree = ""; - }; - 6E6457B91184DB4000F08CB1 /* Private */ = { - isa = PBXGroup; - children = ( - 6E6454C91184D4C500F08CB1 /* TTButtonContent.h */, - 6E6456061184D4DA00F08CB1 /* TTButtonContent.m */, - ); - name = Private; - sourceTree = ""; - }; - 6E6457BA1184DB5D00F08CB1 /* Link */ = { - isa = PBXGroup; - children = ( - 6E6454D81184D4C500F08CB1 /* TTLink.h */, - 6E6456131184D4DA00F08CB1 /* TTLink.m */, - ); - name = Link; - sourceTree = ""; - }; - 6E6457BB1184DB9900F08CB1 /* Tab Bar */ = { - isa = PBXGroup; - children = ( - 6E6455011184D4C500F08CB1 /* TTTabBar.h */, - 6E6456321184D4DA00F08CB1 /* TTTabBar.m */, - 6E6455031184D4C500F08CB1 /* TTTabDelegate.h */, - 6E6457BD1184DBB000F08CB1 /* Private */, - 6E6457BC1184DBAA00F08CB1 /* Tab Bars */, - ); - name = "Tab Bar"; - sourceTree = ""; - }; - 6E6457BC1184DBAA00F08CB1 /* Tab Bars */ = { - isa = PBXGroup; - children = ( - 6E64581C1184DD8B00F08CB1 /* Tab */, - 6E6457BF1184DBD100F08CB1 /* Tab Grid */, - 6E6457BE1184DBC700F08CB1 /* Tab Item */, - 6E6457C01184DBEF00F08CB1 /* Tab Strip */, - ); - name = "Tab Bars"; - sourceTree = ""; - }; - 6E6457BD1184DBB000F08CB1 /* Private */ = { - isa = PBXGroup; - children = ( - 6E6455021184D4C500F08CB1 /* TTTabBarInternal.h */, - 6E6456331184D4DA00F08CB1 /* TTTabBarInternal.m */, - ); - name = Private; - sourceTree = ""; - }; - 6E6457BE1184DBC700F08CB1 /* Tab Item */ = { - isa = PBXGroup; - children = ( - 6E6455051184D4C500F08CB1 /* TTTabItem.h */, - 6E6456351184D4DA00F08CB1 /* TTTabItem.m */, - ); - name = "Tab Item"; - sourceTree = ""; - }; - 6E6457BF1184DBD100F08CB1 /* Tab Grid */ = { - isa = PBXGroup; - children = ( - 6E6455041184D4C500F08CB1 /* TTTabGrid.h */, - 6E6456341184D4DA00F08CB1 /* TTTabGrid.m */, - ); - name = "Tab Grid"; - sourceTree = ""; - }; - 6E6457C01184DBEF00F08CB1 /* Tab Strip */ = { - isa = PBXGroup; - children = ( - 6E6455321184D4C500F08CB1 /* TTTabStrip.h */, - 6E6456621184D4DA00F08CB1 /* TTTabStrip.m */, - ); - name = "Tab Strip"; - sourceTree = ""; - }; - 6E64581C1184DD8B00F08CB1 /* Tab */ = { - isa = PBXGroup; - children = ( - 6E6455001184D4C500F08CB1 /* TTTab.h */, - 6E6456311184D4DA00F08CB1 /* TTTab.m */, - ); - name = Tab; - sourceTree = ""; - }; - 6E64581D1184DDDF00F08CB1 /* Page Control */ = { - isa = PBXGroup; - children = ( - 6E6454E41184D4C500F08CB1 /* TTPageControl.h */, - 6E64561D1184D4DA00F08CB1 /* TTPageControl.m */, - ); - name = "Page Control"; - sourceTree = ""; - }; - 6E64581E1184DE0000F08CB1 /* Text Fields */ = { - isa = PBXGroup; - children = ( - 6E64581F1184DE1800F08CB1 /* Text Editor */, - 6E6458221184DE9800F08CB1 /* Search Text Field */, - 6E6458241184DEC400F08CB1 /* Picker Text Field */, - 6E6458261184DF0F00F08CB1 /* Search Bar */, - ); - name = "Text Fields"; - sourceTree = ""; - }; - 6E64581F1184DE1800F08CB1 /* Text Editor */ = { - isa = PBXGroup; - children = ( - 6E6455351184D4C500F08CB1 /* TTTextEditor.h */, - 6E6456641184D4DA00F08CB1 /* TTTextEditor.m */, - 6E6455361184D4C500F08CB1 /* TTTextEditorDelegate.h */, - 6E6458201184DE2300F08CB1 /* Private */, - ); - name = "Text Editor"; - sourceTree = ""; - }; - 6E6458201184DE2300F08CB1 /* Private */ = { - isa = PBXGroup; - children = ( - 6E6455371184D4C500F08CB1 /* TTTextEditorInternal.h */, - 6E6456651184D4DA00F08CB1 /* TTTextEditorInternal.m */, - 6E6458211184DE4800F08CB1 /* Text View */, - ); - name = Private; - sourceTree = ""; - }; - 6E6458211184DE4800F08CB1 /* Text View */ = { - isa = PBXGroup; - children = ( - 6E6455381184D4C500F08CB1 /* TTTextView.h */, - 6E6456661184D4DA00F08CB1 /* TTTextView.m */, - ); - name = "Text View"; - sourceTree = ""; - }; - 6E6458221184DE9800F08CB1 /* Search Text Field */ = { - isa = PBXGroup; - children = ( - 6E6454F71184D4C500F08CB1 /* TTSearchTextField.h */, - 6E6456291184D4DA00F08CB1 /* TTSearchTextField.m */, - 6E6454F81184D4C500F08CB1 /* TTSearchTextFieldDelegate.h */, - 6E6458231184DEA500F08CB1 /* Private */, - ); - name = "Search Text Field"; - sourceTree = ""; - }; - 6E6458231184DEA500F08CB1 /* Private */ = { - isa = PBXGroup; - children = ( - 6E6454F91184D4C500F08CB1 /* TTSearchTextFieldInternal.h */, - 6E64562A1184D4DA00F08CB1 /* TTSearchTextFieldInternal.m */, - ); - name = Private; - sourceTree = ""; - }; - 6E6458241184DEC400F08CB1 /* Picker Text Field */ = { - isa = PBXGroup; - children = ( - 6E6454EA1184D4C500F08CB1 /* TTPickerTextField.h */, - 6E6456201184D4DA00F08CB1 /* TTPickerTextField.m */, - 6E6454EB1184D4C500F08CB1 /* TTPickerTextFieldDelegate.h */, - 6E6458251184DEF500F08CB1 /* Picker View Cell */, - ); - name = "Picker Text Field"; - sourceTree = ""; - }; - 6E6458251184DEF500F08CB1 /* Picker View Cell */ = { - isa = PBXGroup; - children = ( - 6E6454EC1184D4C500F08CB1 /* TTPickerViewCell.h */, - 6E6456211184D4DA00F08CB1 /* TTPickerViewCell.m */, - ); - name = "Picker View Cell"; - sourceTree = ""; - }; - 6E6458261184DF0F00F08CB1 /* Search Bar */ = { - isa = PBXGroup; - children = ( - 6E6454F41184D4C500F08CB1 /* TTSearchBar.h */, - 6E6456261184D4DA00F08CB1 /* TTSearchBar.m */, - ); - name = "Search Bar"; - sourceTree = ""; - }; - 6E6458271184DF1E00F08CB1 /* Tables */ = { - isa = PBXGroup; - children = ( - 6E6458281184DF5F00F08CB1 /* Table Controller */, - 6E6458291184DF6C00F08CB1 /* Table Delegate */, - 6E64582C1184DFC500F08CB1 /* Table Data Source */, - 6E64582B1184DFB500F08CB1 /* Search Display Controller */, - 6E64582E1184E01E00F08CB1 /* Table Views */, - 6E6458301184E04F00F08CB1 /* Table Item */, - 6E6458311184E05900F08CB1 /* Table Cell */, - 6E6458371184E1D500F08CB1 /* Error View */, - ); - name = Tables; - sourceTree = ""; - }; - 6E6458281184DF5F00F08CB1 /* Table Controller */ = { - isa = PBXGroup; - children = ( - 6E6455291184D4C500F08CB1 /* TTTableViewController.h */, - 6E6456591184D4DA00F08CB1 /* TTTableViewController.m */, - ); - name = "Table Controller"; - sourceTree = ""; - }; - 6E6458291184DF6C00F08CB1 /* Table Delegate */ = { - isa = PBXGroup; - children = ( - 6E64552B1184D4C500F08CB1 /* TTTableViewDelegate.h */, - 6E64565B1184D4DA00F08CB1 /* TTTableViewDelegate.m */, - 6E64582A1184DF7A00F08CB1 /* Table Delegates */, - ); - name = "Table Delegate"; - sourceTree = ""; - }; - 6E64582A1184DF7A00F08CB1 /* Table Delegates */ = { - isa = PBXGroup; - children = ( - 6E64552C1184D4C500F08CB1 /* TTTableViewDragRefreshDelegate.h */, - 6E64565C1184D4DA00F08CB1 /* TTTableViewDragRefreshDelegate.m */, - 6E64552D1184D4C500F08CB1 /* TTTableViewGroupedVarHeightDelegate.h */, - 6E64565D1184D4DA00F08CB1 /* TTTableViewGroupedVarHeightDelegate.m */, - 66F2E85D12D426DA006FB485 /* TTTableViewNetworkEnabledDelegate.h */, - 66F2E86312D426EF006FB485 /* TTTableViewNetworkEnabledDelegate.m */, - 6E64552F1184D4C500F08CB1 /* TTTableViewPlainDelegate.h */, - 6E64565F1184D4DA00F08CB1 /* TTTableViewPlainDelegate.m */, - 6E6455301184D4C500F08CB1 /* TTTableViewPlainVarHeightDelegate.h */, - 6E6456601184D4DA00F08CB1 /* TTTableViewPlainVarHeightDelegate.m */, - 6E6455311184D4C500F08CB1 /* TTTableViewVarHeightDelegate.h */, - 6E6456611184D4DA00F08CB1 /* TTTableViewVarHeightDelegate.m */, - ); - name = "Table Delegates"; - sourceTree = ""; - }; - 6E64582B1184DFB500F08CB1 /* Search Display Controller */ = { - isa = PBXGroup; - children = ( - 6E6454F51184D4C500F08CB1 /* TTSearchDisplayController.h */, - 6E6456271184D4DA00F08CB1 /* TTSearchDisplayController.m */, - ); - name = "Search Display Controller"; - sourceTree = ""; - }; - 6E64582C1184DFC500F08CB1 /* Table Data Source */ = { - isa = PBXGroup; - children = ( - 6E64552A1184D4C500F08CB1 /* TTTableViewDataSource.h */, - 6E64565A1184D4DA00F08CB1 /* TTTableViewDataSource.m */, - 6E64582D1184DFEF00F08CB1 /* Table Data Sources */, - ); - name = "Table Data Source"; - sourceTree = ""; - }; - 6E64582D1184DFEF00F08CB1 /* Table Data Sources */ = { - isa = PBXGroup; - children = ( - 6E6454D91184D4C500F08CB1 /* TTListDataSource.h */, - 6E6456141184D4DA00F08CB1 /* TTListDataSource.m */, - 6E6454FA1184D4C500F08CB1 /* TTSectionedDataSource.h */, - 6E64562B1184D4DA00F08CB1 /* TTSectionedDataSource.m */, - ); - name = "Table Data Sources"; - sourceTree = ""; - }; - 6E64582E1184E01E00F08CB1 /* Table Views */ = { - isa = PBXGroup; - children = ( - 6E64582F1184E02200F08CB1 /* Header Views */, - 6E6455271184D4C500F08CB1 /* TTTableView.h */, - 6E6456571184D4DA00F08CB1 /* TTTableView.m */, - ); - name = "Table Views"; - sourceTree = ""; - }; - 6E64582F1184E02200F08CB1 /* Header Views */ = { - isa = PBXGroup; - children = ( - 6E6455101184D4C500F08CB1 /* TTTableHeaderView.h */, - 6E6456401184D4DA00F08CB1 /* TTTableHeaderView.m */, - 66F2E85212D426A5006FB485 /* TTTableFooterInfiniteScrollView.h */, - 66F2E85512D426AF006FB485 /* TTTableFooterInfiniteScrollView.m */, - 6E64550F1184D4C500F08CB1 /* TTTableHeaderDragRefreshView.h */, - 6E64563F1184D4DA00F08CB1 /* TTTableHeaderDragRefreshView.m */, - ); - name = "Header Views"; - sourceTree = ""; - }; - 6E6458301184E04F00F08CB1 /* Table Item */ = { - isa = PBXGroup; - children = ( - 6E6455131184D4C500F08CB1 /* TTTableItem.h */, - 6E6456431184D4DA00F08CB1 /* TTTableItem.m */, - 6E6458321184E06F00F08CB1 /* Table Items */, - ); - name = "Table Item"; - sourceTree = ""; - }; - 6E6458311184E05900F08CB1 /* Table Cell */ = { - isa = PBXGroup; - children = ( - 6E6455281184D4C500F08CB1 /* TTTableViewCell.h */, - 6E6456581184D4DA00F08CB1 /* TTTableViewCell.m */, - 6E6458361184E10200F08CB1 /* Table Cells */, - ); - name = "Table Cell"; - sourceTree = ""; - }; - 6E6458321184E06F00F08CB1 /* Table Items */ = { - isa = PBXGroup; - children = ( - 6E6455061184D4C500F08CB1 /* TTTableActivityItem.h */, - 6E6456361184D4DA00F08CB1 /* TTTableActivityItem.m */, - 6E6455081184D4C500F08CB1 /* TTTableButton.h */, - 6E6456381184D4DA00F08CB1 /* TTTableButton.m */, - 6E6455091184D4C500F08CB1 /* TTTableCaptionItem.h */, - 6E6456391184D4DA00F08CB1 /* TTTableCaptionItem.m */, - 6E64550C1184D4C500F08CB1 /* TTTableControlItem.h */, - 6E64563C1184D4DA00F08CB1 /* TTTableControlItem.m */, - 6E64550E1184D4C500F08CB1 /* TTTableGrayTextItem.h */, - 6E64563E1184D4DA00F08CB1 /* TTTableGrayTextItem.m */, - 6E6455111184D4C500F08CB1 /* TTTableImageItem.h */, - 6E6456411184D4DA00F08CB1 /* TTTableImageItem.m */, - 6E6455141184D4C500F08CB1 /* TTTableLink.h */, - 6E6456441184D4DA00F08CB1 /* TTTableLink.m */, - 6E6455151184D4C500F08CB1 /* TTTableLinkedItem.h */, - 6E6456451184D4DA00F08CB1 /* TTTableLinkedItem.m */, - 6E6455171184D4C500F08CB1 /* TTTableLongTextItem.h */, - 6E6456471184D4DA00F08CB1 /* TTTableLongTextItem.m */, - 6E6455181184D4C500F08CB1 /* TTTableMessageItem.h */, - 6E6456481184D4DA00F08CB1 /* TTTableMessageItem.m */, - 6E64551A1184D4C500F08CB1 /* TTTableMoreButton.h */, - 6E64564A1184D4DA00F08CB1 /* TTTableMoreButton.m */, - 6E64551C1184D4C500F08CB1 /* TTTableRightCaptionItem.h */, - 6E64564C1184D4DA00F08CB1 /* TTTableRightCaptionItem.m */, - 6E64551E1184D4C500F08CB1 /* TTTableRightImageItem.h */, - 6E64564E1184D4DA00F08CB1 /* TTTableRightImageItem.m */, - 6E6455201184D4C500F08CB1 /* TTTableSubtextItem.h */, - 6E6456501184D4DA00F08CB1 /* TTTableSubtextItem.m */, - 6E6455221184D4C500F08CB1 /* TTTableSubtitleItem.h */, - 6E6456521184D4DA00F08CB1 /* TTTableSubtitleItem.m */, - 6E6455241184D4C500F08CB1 /* TTTableSummaryItem.h */, - 6E6456541184D4DA00F08CB1 /* TTTableSummaryItem.m */, - 6E64551F1184D4C500F08CB1 /* TTTableStyledTextItem.h */, - 6E64564F1184D4DA00F08CB1 /* TTTableStyledTextItem.m */, - 6E6455251184D4C500F08CB1 /* TTTableTextItem.h */, - 6E6456551184D4DA00F08CB1 /* TTTableTextItem.m */, - 6E64552E1184D4C500F08CB1 /* TTTableViewItem.h */, - 6E64565E1184D4DA00F08CB1 /* TTTableViewItem.m */, - ); - name = "Table Items"; - sourceTree = ""; - }; - 6E6458361184E10200F08CB1 /* Table Cells */ = { - isa = PBXGroup; - children = ( - 6E6454FE1184D4C500F08CB1 /* TTStyledTextTableCell.h */, - 6E64562F1184D4DA00F08CB1 /* TTStyledTextTableCell.m */, - 6E6454FF1184D4C500F08CB1 /* TTStyledTextTableItemCell.h */, - 6E6456301184D4DA00F08CB1 /* TTStyledTextTableItemCell.m */, - 6E6455071184D4C500F08CB1 /* TTTableActivityItemCell.h */, - 6E6456371184D4DA00F08CB1 /* TTTableActivityItemCell.m */, - 6E64550A1184D4C500F08CB1 /* TTTableCaptionItemCell.h */, - 6E64563A1184D4DA00F08CB1 /* TTTableCaptionItemCell.m */, - 6E64550B1184D4C500F08CB1 /* TTTableControlCell.h */, - 6E64563B1184D4DA00F08CB1 /* TTTableControlCell.m */, - 6E64550D1184D4C500F08CB1 /* TTTableFlushViewCell.h */, - 6E64563D1184D4DA00F08CB1 /* TTTableFlushViewCell.m */, - 6E6455121184D4C500F08CB1 /* TTTableImageItemCell.h */, - 6E6456421184D4DA00F08CB1 /* TTTableImageItemCell.m */, - 6E6455161184D4C500F08CB1 /* TTTableLinkedItemCell.h */, - 6E6456461184D4DA00F08CB1 /* TTTableLinkedItemCell.m */, - 6E6455191184D4C500F08CB1 /* TTTableMessageItemCell.h */, - 6E6456491184D4DA00F08CB1 /* TTTableMessageItemCell.m */, - 6E64551B1184D4C500F08CB1 /* TTTableMoreButtonCell.h */, - 6E64564B1184D4DA00F08CB1 /* TTTableMoreButtonCell.m */, - 6E64551D1184D4C500F08CB1 /* TTTableRightCaptionItemCell.h */, - 6E64564D1184D4DA00F08CB1 /* TTTableRightCaptionItemCell.m */, - 6E6455211184D4C500F08CB1 /* TTTableSubtextItemCell.h */, - 6E6456511184D4DA00F08CB1 /* TTTableSubtextItemCell.m */, - 6E6455231184D4C500F08CB1 /* TTTableSubtitleItemCell.h */, - 6E6456531184D4DA00F08CB1 /* TTTableSubtitleItemCell.m */, - 6E6455261184D4C500F08CB1 /* TTTableTextItemCell.h */, - 6E6456561184D4DA00F08CB1 /* TTTableTextItemCell.m */, - ); - name = "Table Cells"; - sourceTree = ""; - }; - 6E6458371184E1D500F08CB1 /* Error View */ = { - isa = PBXGroup; - children = ( - 6E6454CA1184D4C500F08CB1 /* TTErrorView.h */, - 6E6456071184D4DA00F08CB1 /* TTErrorView.m */, - ); - name = "Error View"; - sourceTree = ""; - }; - 6E6458381184E1E700F08CB1 /* Photos */ = { - isa = PBXGroup; - children = ( - 6E6454E71184D4C500F08CB1 /* TTPhotoVersion.h */, - 6E6454E51184D4C500F08CB1 /* TTPhoto.h */, - 6E6454E61184D4C500F08CB1 /* TTPhotoSource.h */, - 6E6458391184E1FD00F08CB1 /* Photo View */, - 6E64583A1184E20600F08CB1 /* Thumbs Controller */, - ); - name = Photos; - sourceTree = ""; - }; - 6E6458391184E1FD00F08CB1 /* Photo View */ = { - isa = PBXGroup; - children = ( - 6E6454E81184D4C500F08CB1 /* TTPhotoView.h */, - 6E64561E1184D4DA00F08CB1 /* TTPhotoView.m */, - ); - name = "Photo View"; - sourceTree = ""; - }; - 6E64583A1184E20600F08CB1 /* Thumbs Controller */ = { - isa = PBXGroup; - children = ( - 6E64553C1184D4C500F08CB1 /* TTThumbsViewController.h */, - 6E6456691184D4DA00F08CB1 /* TTThumbsViewController.m */, - 6E64553D1184D4C500F08CB1 /* TTThumbsViewControllerDelegate.h */, - 6E64583B1184E22F00F08CB1 /* Data Source */, - 6E64583C1184E23E00F08CB1 /* Thumbs Table View Cell */, - 6E64583D1184E25000F08CB1 /* Thumb View */, - ); - name = "Thumbs Controller"; - sourceTree = ""; - }; - 6E64583B1184E22F00F08CB1 /* Data Source */ = { - isa = PBXGroup; - children = ( - 6E6455391184D4C500F08CB1 /* TTThumbsDataSource.h */, - 6E6456671184D4DA00F08CB1 /* TTThumbsDataSource.m */, - ); - name = "Data Source"; - sourceTree = ""; - }; - 6E64583C1184E23E00F08CB1 /* Thumbs Table View Cell */ = { - isa = PBXGroup; - children = ( - 6E64553A1184D4C500F08CB1 /* TTThumbsTableViewCell.h */, - 6E6456681184D4DA00F08CB1 /* TTThumbsTableViewCell.m */, - 6E64553B1184D4C500F08CB1 /* TTThumbsTableViewCellDelegate.h */, - ); - name = "Thumbs Table View Cell"; - sourceTree = ""; - }; - 6E64583D1184E25000F08CB1 /* Thumb View */ = { - isa = PBXGroup; - children = ( - 6E64553E1184D4C500F08CB1 /* TTThumbView.h */, - 6E64566A1184D4DA00F08CB1 /* TTThumbView.m */, - ); - name = "Thumb View"; - sourceTree = ""; - }; - 6E64583E1184E26500F08CB1 /* Launcher */ = { - isa = PBXGroup; - children = ( - 6E6454D61184D4C500F08CB1 /* TTLauncherView.h */, - 6E6456121184D4DA00F08CB1 /* TTLauncherView.m */, - 6E6454D71184D4C500F08CB1 /* TTLauncherViewDelegate.h */, - 6E6458411184E29B00F08CB1 /* Private */, - 6E64583F1184E28700F08CB1 /* Launcher Button */, - 6E6458401184E29000F08CB1 /* Launcher Item */, - ); - name = Launcher; - sourceTree = ""; - }; - 6E64583F1184E28700F08CB1 /* Launcher Button */ = { - isa = PBXGroup; - children = ( - 6E6454D31184D4C500F08CB1 /* TTLauncherButton.h */, - 6E64560F1184D4DA00F08CB1 /* TTLauncherButton.m */, - ); - name = "Launcher Button"; - sourceTree = ""; - }; - 6E6458401184E29000F08CB1 /* Launcher Item */ = { - isa = PBXGroup; - children = ( - 6E6454D41184D4C500F08CB1 /* TTLauncherItem.h */, - 6E6456101184D4DA00F08CB1 /* TTLauncherItem.m */, - ); - name = "Launcher Item"; - sourceTree = ""; - }; - 6E6458411184E29B00F08CB1 /* Private */ = { - isa = PBXGroup; - children = ( - 6E6454D51184D4C500F08CB1 /* TTLauncherScrollView.h */, - 6E6456111184D4DA00F08CB1 /* TTLauncherScrollView.m */, - 6ECCA5FF11C0C105002296C7 /* TTLauncherHighlightView.h */, - 6ECCA5FC11C0C0F6002296C7 /* TTLauncherHighlightView.m */, - ); - name = Private; - sourceTree = ""; - }; - 6E6458421184E2B700F08CB1 /* Progress */ = { - isa = PBXGroup; - children = ( - 6E6454F01184D4C500F08CB1 /* TTRecursiveProgress.h */, - 6E6456241184D4DA00F08CB1 /* TTRecursiveProgress.m */, - ); - name = Progress; - sourceTree = ""; - }; - 6E6458431184E30000F08CB1 /* Unclipped View */ = { - isa = PBXGroup; - children = ( - 6E64553F1184D4C500F08CB1 /* TTUnclippedView.h */, - 6E64566B1184D4DA00F08CB1 /* TTUnclippedView.m */, - ); - name = "Unclipped View"; - sourceTree = ""; - }; - 6E86A8DC118CBF7800662DA5 /* Private */ = { - isa = PBXGroup; - children = ( - 6E86A8DA118CBF7500662DA5 /* TTNavigatorWindow.h */, - 6E86A8EB118CBF8E00662DA5 /* TTNavigatorWindow.m */, - ); - name = Private; - sourceTree = ""; - }; - 6EDAE9F7118CA5840008133C /* Navigator */ = { - isa = PBXGroup; - children = ( - 6EDAE9F5118CA5810008133C /* TTNavigator.h */, - 6EDAEA01118CA59C0008133C /* TTNavigator.m */, - 6E86A8DC118CBF7800662DA5 /* Private */, - ); - name = Navigator; - sourceTree = ""; - }; - 6EDAEA04118CA5B50008133C /* Products */ = { - isa = PBXGroup; - children = ( - 6EDAEA09118CA5B50008133C /* libThree20UICommon.a */, - 6EDAEA0B118CA5B50008133C /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EDAEA0D118CA5BE0008133C /* Products */ = { - isa = PBXGroup; - children = ( - 6EDAEA12118CA5BE0008133C /* libThree20UINavigator.a */, - 6EDAEA14118CA5BE0008133C /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EE7364611849AF200A35176 /* Resources */ = { - isa = PBXGroup; - children = ( - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6EE7364D11849B4200A35176 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6EE7364B11849B3D00A35176 /* Library.xcconfig */, - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */, - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6EE7366711849C5800A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE7366C11849C5800A35176 /* libThree20Core.a */, - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EE737001184A1D500A35176 /* Source */ = { - isa = PBXGroup; - children = ( - 6E6457981184D53100F08CB1 /* Additions */, - 6EDAE9F7118CA5840008133C /* Navigator */, - 6E6457A01184D78000F08CB1 /* View Controllers */, - 6E6457AE1184D91100F08CB1 /* Views */, - 6E6457B31184DA7600F08CB1 /* Labels */, - 6E6457B71184DB1700F08CB1 /* Buttons and Tabs */, - 6E64581E1184DE0000F08CB1 /* Text Fields */, - 6E6458271184DF1E00F08CB1 /* Tables */, - 6E6458381184E1E700F08CB1 /* Photos */, - 6E64583E1184E26500F08CB1 /* Launcher */, - 6E6458421184E2B700F08CB1 /* Progress */, - ); - name = Source; - sourceTree = ""; - }; - 6EE7389E1184ADB400A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE738A31184ADB400A35176 /* libThree20Network.a */, - 6EE738A51184ADB400A35176 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E6454741184D2CD00F08CB1 /* Three20UI.h in Headers */, - 6E6454931184D3ED00F08CB1 /* Three20UI+Additions.h in Headers */, - 6E64555E1184D4C500F08CB1 /* TTActionSheet.h in Headers */, - 6E64555F1184D4C500F08CB1 /* TTActionSheetController.h in Headers */, - 6E6455601184D4C500F08CB1 /* TTActionSheetControllerDelegate.h in Headers */, - 6E6455611184D4C500F08CB1 /* TTActivityLabel.h in Headers */, - 6E6455621184D4C500F08CB1 /* TTAlertView.h in Headers */, - 6E6455631184D4C500F08CB1 /* TTAlertViewController.h in Headers */, - 6E6455641184D4C500F08CB1 /* TTAlertViewControllerDelegate.h in Headers */, - 6E6455651184D4C500F08CB1 /* TTButton.h in Headers */, - 6E6455661184D4C500F08CB1 /* TTButtonBar.h in Headers */, - 6E6455671184D4C500F08CB1 /* TTButtonContent.h in Headers */, - 6E6455681184D4C500F08CB1 /* TTErrorView.h in Headers */, - 6E64556C1184D4C500F08CB1 /* TTImageLayer.h in Headers */, - 6E64556D1184D4C500F08CB1 /* TTImageView.h in Headers */, - 6E64556E1184D4C500F08CB1 /* TTImageViewDelegate.h in Headers */, - 6E64556F1184D4C500F08CB1 /* TTImageViewInternal.h in Headers */, - 6E6455701184D4C500F08CB1 /* TTLabel.h in Headers */, - 6E6455711184D4C500F08CB1 /* TTLauncherButton.h in Headers */, - 6E6455721184D4C500F08CB1 /* TTLauncherItem.h in Headers */, - 6E6455731184D4C500F08CB1 /* TTLauncherScrollView.h in Headers */, - 6E6455741184D4C500F08CB1 /* TTLauncherView.h in Headers */, - 6E6455751184D4C500F08CB1 /* TTLauncherViewDelegate.h in Headers */, - 6E6455761184D4C500F08CB1 /* TTLink.h in Headers */, - 6E6455771184D4C500F08CB1 /* TTListDataSource.h in Headers */, - 6E6455781184D4C500F08CB1 /* TTMessageController.h in Headers */, - 6E6455791184D4C500F08CB1 /* TTMessageControllerDelegate.h in Headers */, - 6E64557A1184D4C500F08CB1 /* TTMessageField.h in Headers */, - 6E64557B1184D4C500F08CB1 /* TTMessageRecipientField.h in Headers */, - 6E64557C1184D4C500F08CB1 /* TTMessageSubjectField.h in Headers */, - 6E64557D1184D4C500F08CB1 /* TTMessageTextField.h in Headers */, - 6E64557E1184D4C500F08CB1 /* TTModelViewController.h in Headers */, - 6E6455821184D4C500F08CB1 /* TTPageControl.h in Headers */, - 6E6455831184D4C500F08CB1 /* TTPhoto.h in Headers */, - 6E6455841184D4C500F08CB1 /* TTPhotoSource.h in Headers */, - 6E6455851184D4C500F08CB1 /* TTPhotoVersion.h in Headers */, - 6E6455861184D4C500F08CB1 /* TTPhotoView.h in Headers */, - 6E6455871184D4C500F08CB1 /* TTPhotoViewController.h in Headers */, - 6E6455881184D4C500F08CB1 /* TTPickerTextField.h in Headers */, - 6E6455891184D4C500F08CB1 /* TTPickerTextFieldDelegate.h in Headers */, - 6E64558A1184D4C500F08CB1 /* TTPickerViewCell.h in Headers */, - 6E64558B1184D4C500F08CB1 /* TTPopupViewController.h in Headers */, - 6E64558C1184D4C500F08CB1 /* TTPostController.h in Headers */, - 6E64558D1184D4C500F08CB1 /* TTPostControllerDelegate.h in Headers */, - 6E64558E1184D4C500F08CB1 /* TTRecursiveProgress.h in Headers */, - 6E64558F1184D4C500F08CB1 /* TTScrollView.h in Headers */, - 6E6455901184D4C500F08CB1 /* TTScrollViewDataSource.h in Headers */, - 6E6455911184D4C500F08CB1 /* TTScrollViewDelegate.h in Headers */, - 6E6455921184D4C500F08CB1 /* TTSearchBar.h in Headers */, - 6E6455931184D4C500F08CB1 /* TTSearchDisplayController.h in Headers */, - 6E6455941184D4C500F08CB1 /* TTSearchlightLabel.h in Headers */, - 6E6455951184D4C500F08CB1 /* TTSearchTextField.h in Headers */, - 6E6455961184D4C500F08CB1 /* TTSearchTextFieldDelegate.h in Headers */, - 6E6455971184D4C500F08CB1 /* TTSearchTextFieldInternal.h in Headers */, - 6E6455981184D4C500F08CB1 /* TTSectionedDataSource.h in Headers */, - 6E64559B1184D4C500F08CB1 /* TTStyledTextLabel.h in Headers */, - 6E64559C1184D4C500F08CB1 /* TTStyledTextTableCell.h in Headers */, - 6E64559D1184D4C500F08CB1 /* TTStyledTextTableItemCell.h in Headers */, - 6E64559E1184D4C500F08CB1 /* TTTab.h in Headers */, - 6E64559F1184D4C500F08CB1 /* TTTabBar.h in Headers */, - 6E6455A01184D4C500F08CB1 /* TTTabBarInternal.h in Headers */, - 6E6455A11184D4C500F08CB1 /* TTTabDelegate.h in Headers */, - 6E6455A21184D4C500F08CB1 /* TTTabGrid.h in Headers */, - 6E6455A31184D4C500F08CB1 /* TTTabItem.h in Headers */, - 6E6455A41184D4C500F08CB1 /* TTTableActivityItem.h in Headers */, - 6E6455A51184D4C500F08CB1 /* TTTableActivityItemCell.h in Headers */, - 6E6455A61184D4C500F08CB1 /* TTTableButton.h in Headers */, - 6E6455A71184D4C500F08CB1 /* TTTableCaptionItem.h in Headers */, - 6E6455A81184D4C500F08CB1 /* TTTableCaptionItemCell.h in Headers */, - 6E6455A91184D4C500F08CB1 /* TTTableControlCell.h in Headers */, - 6E6455AA1184D4C500F08CB1 /* TTTableControlItem.h in Headers */, - 6E6455AB1184D4C500F08CB1 /* TTTableFlushViewCell.h in Headers */, - 6E6455AC1184D4C500F08CB1 /* TTTableGrayTextItem.h in Headers */, - 6E6455AD1184D4C500F08CB1 /* TTTableHeaderDragRefreshView.h in Headers */, - 6E6455AE1184D4C500F08CB1 /* TTTableHeaderView.h in Headers */, - 6E6455AF1184D4C500F08CB1 /* TTTableImageItem.h in Headers */, - 6E6455B01184D4C500F08CB1 /* TTTableImageItemCell.h in Headers */, - 6E6455B11184D4C500F08CB1 /* TTTableItem.h in Headers */, - 6E6455B21184D4C500F08CB1 /* TTTableLink.h in Headers */, - 6E6455B31184D4C500F08CB1 /* TTTableLinkedItem.h in Headers */, - 6E6455B41184D4C500F08CB1 /* TTTableLinkedItemCell.h in Headers */, - 6E6455B51184D4C500F08CB1 /* TTTableLongTextItem.h in Headers */, - 6E6455B61184D4C500F08CB1 /* TTTableMessageItem.h in Headers */, - 6E6455B71184D4C500F08CB1 /* TTTableMessageItemCell.h in Headers */, - 6E6455B81184D4C500F08CB1 /* TTTableMoreButton.h in Headers */, - 6E6455B91184D4C500F08CB1 /* TTTableMoreButtonCell.h in Headers */, - 6E6455BA1184D4C500F08CB1 /* TTTableRightCaptionItem.h in Headers */, - 6E6455BB1184D4C500F08CB1 /* TTTableRightCaptionItemCell.h in Headers */, - 6E6455BC1184D4C500F08CB1 /* TTTableRightImageItem.h in Headers */, - 6E6455BD1184D4C500F08CB1 /* TTTableStyledTextItem.h in Headers */, - 6E6455BE1184D4C500F08CB1 /* TTTableSubtextItem.h in Headers */, - 6E6455BF1184D4C500F08CB1 /* TTTableSubtextItemCell.h in Headers */, - 6E6455C01184D4C500F08CB1 /* TTTableSubtitleItem.h in Headers */, - 6E6455C11184D4C500F08CB1 /* TTTableSubtitleItemCell.h in Headers */, - 6E6455C21184D4C500F08CB1 /* TTTableSummaryItem.h in Headers */, - 6E6455C31184D4C500F08CB1 /* TTTableTextItem.h in Headers */, - 6E6455C41184D4C500F08CB1 /* TTTableTextItemCell.h in Headers */, - 6E6455C51184D4C500F08CB1 /* TTTableView.h in Headers */, - 6E6455C61184D4C500F08CB1 /* TTTableViewCell.h in Headers */, - 6E6455C71184D4C500F08CB1 /* TTTableViewController.h in Headers */, - 6E6455C81184D4C500F08CB1 /* TTTableViewDataSource.h in Headers */, - 6E6455C91184D4C500F08CB1 /* TTTableViewDelegate.h in Headers */, - 6E6455CA1184D4C500F08CB1 /* TTTableViewDragRefreshDelegate.h in Headers */, - 6E6455CB1184D4C500F08CB1 /* TTTableViewGroupedVarHeightDelegate.h in Headers */, - 6E6455CC1184D4C500F08CB1 /* TTTableViewItem.h in Headers */, - 6E6455CD1184D4C500F08CB1 /* TTTableViewPlainDelegate.h in Headers */, - 6E6455CE1184D4C500F08CB1 /* TTTableViewPlainVarHeightDelegate.h in Headers */, - 6E6455CF1184D4C500F08CB1 /* TTTableViewVarHeightDelegate.h in Headers */, - 6E6455D01184D4C500F08CB1 /* TTTabStrip.h in Headers */, - 6E6455D11184D4C500F08CB1 /* TTTextBarController.h in Headers */, - 6E6455D21184D4C500F08CB1 /* TTTextBarDelegate.h in Headers */, - 6E6455D31184D4C500F08CB1 /* TTTextEditor.h in Headers */, - 6E6455D41184D4C500F08CB1 /* TTTextEditorDelegate.h in Headers */, - 6E6455D51184D4C500F08CB1 /* TTTextEditorInternal.h in Headers */, - 6E6455D61184D4C500F08CB1 /* TTTextView.h in Headers */, - 6E6455D71184D4C500F08CB1 /* TTThumbsDataSource.h in Headers */, - 6E6455D81184D4C500F08CB1 /* TTThumbsTableViewCell.h in Headers */, - 6E6455D91184D4C500F08CB1 /* TTThumbsTableViewCellDelegate.h in Headers */, - 6E6455DA1184D4C500F08CB1 /* TTThumbsViewController.h in Headers */, - 6E6455DB1184D4C500F08CB1 /* TTThumbsViewControllerDelegate.h in Headers */, - 6E6455DC1184D4C500F08CB1 /* TTThumbView.h in Headers */, - 6E6455DD1184D4C500F08CB1 /* TTUnclippedView.h in Headers */, - 6E6455ED1184D4C500F08CB1 /* TTView.h in Headers */, - 6E6455EE1184D4C500F08CB1 /* TTViewController.h in Headers */, - 6E6455EF1184D4C500F08CB1 /* TTWebController.h in Headers */, - 6E6455F11184D4C500F08CB1 /* TTYouTubeView.h in Headers */, - 6E6455F21184D4C500F08CB1 /* UINavigationControllerAdditions.h in Headers */, - 6E6455F31184D4C500F08CB1 /* UINSObjectAdditions.h in Headers */, - 6E6455F41184D4C500F08CB1 /* UINSStringAdditions.h in Headers */, - 6E6455F51184D4C500F08CB1 /* UITabBarControllerAdditions.h in Headers */, - 6E6455F61184D4C500F08CB1 /* UITableViewAdditions.h in Headers */, - 6E6455F71184D4C500F08CB1 /* UIToolbarAdditions.h in Headers */, - 6E6455F81184D4C500F08CB1 /* UIViewAdditions.h in Headers */, - 6E6455FA1184D4C500F08CB1 /* UIWebViewAdditions.h in Headers */, - 6EDAE9F6118CA5810008133C /* TTNavigator.h in Headers */, - 6E86A8DB118CBF7500662DA5 /* TTNavigatorWindow.h in Headers */, - 6E60820311B0C32600C93CD4 /* TTNavigationController.h in Headers */, - 6ECCA60011C0C105002296C7 /* TTLauncherHighlightView.h in Headers */, - 66ADC8CF1290AC1200855386 /* TTExtensionsController.h in Headers */, - 66ADCDA31291AA7E00855386 /* TTExtensionInfoController.h in Headers */, - 666E18F51294543F001C1D97 /* TTSplitViewController.h in Headers */, - 66F2E85412D426A5006FB485 /* TTTableFooterInfiniteScrollView.h in Headers */, - 66F2E85F12D426DA006FB485 /* TTTableViewNetworkEnabledDelegate.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* Three20UI */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20UI" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E645F461187B01F00F08CB1 /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E65E7131ADFCA00ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EE7367111849C6300A35176 /* PBXTargetDependency */, - 6EE738AB1184ADD000A35176 /* PBXTargetDependency */, - 6E6454AF1184D46800F08CB1 /* PBXTargetDependency */, - 6EDAEA16118CA5CA0008133C /* PBXTargetDependency */, - 6EDAEA18118CA5CA0008133C /* PBXTargetDependency */, - ); - name = Three20UI; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libThree20UI.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* Three20UIUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20UIUnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6EE736C511849F9D00A35176 /* PBXTargetDependency */, - 6EE738AD1184ADE300A35176 /* PBXTargetDependency */, - 6E6454AD1184D45600F08CB1 /* PBXTargetDependency */, - 6EE736C711849FA000A35176 /* PBXTargetDependency */, - 6EDAEA1A118CA5D30008133C /* PBXTargetDependency */, - 6EDAEA1C118CA5D30008133C /* PBXTargetDependency */, - ); - name = Three20UIUnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* UIUnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20UI" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EE7366711849C5800A35176 /* Products */; - ProjectRef = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6EE7389E1184ADB400A35176 /* Products */; - ProjectRef = 6EE7389D1184ADB400A35176 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E6454A21184D42800F08CB1 /* Products */; - ProjectRef = 6E6454A11184D42800F08CB1 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6EDAEA04118CA5B50008133C /* Products */; - ProjectRef = 6EDAEA03118CA5B50008133C /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6EDAEA0D118CA5BE0008133C /* Products */; - ProjectRef = 6EDAEA0C118CA5BE0008133C /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* Three20UI */, - EB9E6C6110B6A8F800DE563C /* Three20UIUnitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E6454A71184D42800F08CB1 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E6454A61184D42800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E6454A91184D42800F08CB1 /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E6454A81184D42800F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EDAEA09118CA5B50008133C /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6EDAEA08118CA5B50008133C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EDAEA0B118CA5B50008133C /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6EDAEA0A118CA5B50008133C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EDAEA12118CA5BE0008133C /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6EDAEA11118CA5BE0008133C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EDAEA14118CA5BE0008133C /* UINavigatorUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UINavigatorUnitTests.octest; - remoteRef = 6EDAEA13118CA5BE0008133C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366C11849C5800A35176 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE738A31184ADB400A35176 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6EE738A21184ADB400A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE738A51184ADB400A35176 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6EE738A41184ADB400A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E65E7131ADFCA00ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E645F461187B01F00F08CB1 /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E6456871184D4DA00F08CB1 /* TTActionSheet.m in Sources */, - 6E6456881184D4DA00F08CB1 /* TTActionSheetController.m in Sources */, - 6E6456891184D4DA00F08CB1 /* TTActivityLabel.m in Sources */, - 6E64568A1184D4DA00F08CB1 /* TTAlertView.m in Sources */, - 6E64568B1184D4DA00F08CB1 /* TTAlertViewController.m in Sources */, - 6E64568C1184D4DA00F08CB1 /* TTButton.m in Sources */, - 6E64568D1184D4DA00F08CB1 /* TTButtonBar.m in Sources */, - 6E64568E1184D4DA00F08CB1 /* TTButtonContent.m in Sources */, - 6E64568F1184D4DA00F08CB1 /* TTErrorView.m in Sources */, - 6E6456931184D4DA00F08CB1 /* TTImageLayer.m in Sources */, - 6E6456941184D4DA00F08CB1 /* TTImageView.m in Sources */, - 6E6456951184D4DA00F08CB1 /* TTImageViewInternal.m in Sources */, - 6E6456961184D4DA00F08CB1 /* TTLabel.m in Sources */, - 6E6456971184D4DA00F08CB1 /* TTLauncherButton.m in Sources */, - 6E6456981184D4DA00F08CB1 /* TTLauncherItem.m in Sources */, - 6E6456991184D4DA00F08CB1 /* TTLauncherScrollView.m in Sources */, - 6E64569A1184D4DA00F08CB1 /* TTLauncherView.m in Sources */, - 6E64569B1184D4DA00F08CB1 /* TTLink.m in Sources */, - 6E64569C1184D4DA00F08CB1 /* TTListDataSource.m in Sources */, - 6E64569D1184D4DA00F08CB1 /* TTMessageController.m in Sources */, - 6E64569E1184D4DA00F08CB1 /* TTMessageField.m in Sources */, - 6E64569F1184D4DA00F08CB1 /* TTMessageRecipientField.m in Sources */, - 6E6456A01184D4DA00F08CB1 /* TTMessageSubjectField.m in Sources */, - 6E6456A11184D4DA00F08CB1 /* TTMessageTextField.m in Sources */, - 6E6456A21184D4DA00F08CB1 /* TTModelViewController.m in Sources */, - 6E6456A51184D4DA00F08CB1 /* TTPageControl.m in Sources */, - 6E6456A61184D4DA00F08CB1 /* TTPhotoView.m in Sources */, - 6E6456A71184D4DA00F08CB1 /* TTPhotoViewController.m in Sources */, - 6E6456A81184D4DA00F08CB1 /* TTPickerTextField.m in Sources */, - 6E6456A91184D4DA00F08CB1 /* TTPickerViewCell.m in Sources */, - 6E6456AA1184D4DA00F08CB1 /* TTPopupViewController.m in Sources */, - 6E6456AB1184D4DA00F08CB1 /* TTPostController.m in Sources */, - 6E6456AC1184D4DA00F08CB1 /* TTRecursiveProgress.m in Sources */, - 6E6456AD1184D4DA00F08CB1 /* TTScrollView.m in Sources */, - 6E6456AE1184D4DA00F08CB1 /* TTSearchBar.m in Sources */, - 6E6456AF1184D4DA00F08CB1 /* TTSearchDisplayController.m in Sources */, - 6E6456B01184D4DA00F08CB1 /* TTSearchlightLabel.m in Sources */, - 6E6456B11184D4DA00F08CB1 /* TTSearchTextField.m in Sources */, - 6E6456B21184D4DA00F08CB1 /* TTSearchTextFieldInternal.m in Sources */, - 6E6456B31184D4DA00F08CB1 /* TTSectionedDataSource.m in Sources */, - 6E6456B61184D4DA00F08CB1 /* TTStyledTextLabel.m in Sources */, - 6E6456B71184D4DA00F08CB1 /* TTStyledTextTableCell.m in Sources */, - 6E6456B81184D4DA00F08CB1 /* TTStyledTextTableItemCell.m in Sources */, - 6E6456B91184D4DA00F08CB1 /* TTTab.m in Sources */, - 6E6456BA1184D4DA00F08CB1 /* TTTabBar.m in Sources */, - 6E6456BB1184D4DA00F08CB1 /* TTTabBarInternal.m in Sources */, - 6E6456BC1184D4DA00F08CB1 /* TTTabGrid.m in Sources */, - 6E6456BD1184D4DA00F08CB1 /* TTTabItem.m in Sources */, - 6E6456BE1184D4DA00F08CB1 /* TTTableActivityItem.m in Sources */, - 6E6456BF1184D4DA00F08CB1 /* TTTableActivityItemCell.m in Sources */, - 6E6456C01184D4DA00F08CB1 /* TTTableButton.m in Sources */, - 6E6456C11184D4DA00F08CB1 /* TTTableCaptionItem.m in Sources */, - 6E6456C21184D4DA00F08CB1 /* TTTableCaptionItemCell.m in Sources */, - 6E6456C31184D4DA00F08CB1 /* TTTableControlCell.m in Sources */, - 6E6456C41184D4DA00F08CB1 /* TTTableControlItem.m in Sources */, - 6E6456C51184D4DA00F08CB1 /* TTTableFlushViewCell.m in Sources */, - 6E6456C61184D4DA00F08CB1 /* TTTableGrayTextItem.m in Sources */, - 6E6456C71184D4DA00F08CB1 /* TTTableHeaderDragRefreshView.m in Sources */, - 6E6456C81184D4DA00F08CB1 /* TTTableHeaderView.m in Sources */, - 6E6456C91184D4DA00F08CB1 /* TTTableImageItem.m in Sources */, - 6E6456CA1184D4DA00F08CB1 /* TTTableImageItemCell.m in Sources */, - 6E6456CB1184D4DA00F08CB1 /* TTTableItem.m in Sources */, - 6E6456CC1184D4DA00F08CB1 /* TTTableLink.m in Sources */, - 6E6456CD1184D4DA00F08CB1 /* TTTableLinkedItem.m in Sources */, - 6E6456CE1184D4DA00F08CB1 /* TTTableLinkedItemCell.m in Sources */, - 6E6456CF1184D4DA00F08CB1 /* TTTableLongTextItem.m in Sources */, - 6E6456D01184D4DA00F08CB1 /* TTTableMessageItem.m in Sources */, - 6E6456D11184D4DA00F08CB1 /* TTTableMessageItemCell.m in Sources */, - 6E6456D21184D4DA00F08CB1 /* TTTableMoreButton.m in Sources */, - 6E6456D31184D4DA00F08CB1 /* TTTableMoreButtonCell.m in Sources */, - 6E6456D41184D4DA00F08CB1 /* TTTableRightCaptionItem.m in Sources */, - 6E6456D51184D4DA00F08CB1 /* TTTableRightCaptionItemCell.m in Sources */, - 6E6456D61184D4DA00F08CB1 /* TTTableRightImageItem.m in Sources */, - 6E6456D71184D4DA00F08CB1 /* TTTableStyledTextItem.m in Sources */, - 6E6456D81184D4DA00F08CB1 /* TTTableSubtextItem.m in Sources */, - 6E6456D91184D4DA00F08CB1 /* TTTableSubtextItemCell.m in Sources */, - 6E6456DA1184D4DA00F08CB1 /* TTTableSubtitleItem.m in Sources */, - 6E6456DB1184D4DA00F08CB1 /* TTTableSubtitleItemCell.m in Sources */, - 6E6456DC1184D4DA00F08CB1 /* TTTableSummaryItem.m in Sources */, - 6E6456DD1184D4DA00F08CB1 /* TTTableTextItem.m in Sources */, - 6E6456DE1184D4DA00F08CB1 /* TTTableTextItemCell.m in Sources */, - 6E6456DF1184D4DA00F08CB1 /* TTTableView.m in Sources */, - 6E6456E01184D4DA00F08CB1 /* TTTableViewCell.m in Sources */, - 6E6456E11184D4DA00F08CB1 /* TTTableViewController.m in Sources */, - 6E6456E21184D4DA00F08CB1 /* TTTableViewDataSource.m in Sources */, - 6E6456E31184D4DA00F08CB1 /* TTTableViewDelegate.m in Sources */, - 6E6456E41184D4DA00F08CB1 /* TTTableViewDragRefreshDelegate.m in Sources */, - 6E6456E51184D4DA00F08CB1 /* TTTableViewGroupedVarHeightDelegate.m in Sources */, - 6E6456E61184D4DA00F08CB1 /* TTTableViewItem.m in Sources */, - 6E6456E71184D4DA00F08CB1 /* TTTableViewPlainDelegate.m in Sources */, - 6E6456E81184D4DA00F08CB1 /* TTTableViewPlainVarHeightDelegate.m in Sources */, - 6E6456E91184D4DA00F08CB1 /* TTTableViewVarHeightDelegate.m in Sources */, - 6E6456EA1184D4DA00F08CB1 /* TTTabStrip.m in Sources */, - 6E6456EB1184D4DA00F08CB1 /* TTTextBarController.m in Sources */, - 6E6456EC1184D4DA00F08CB1 /* TTTextEditor.m in Sources */, - 6E6456ED1184D4DA00F08CB1 /* TTTextEditorInternal.m in Sources */, - 6E6456EE1184D4DA00F08CB1 /* TTTextView.m in Sources */, - 6E6456EF1184D4DA00F08CB1 /* TTThumbsDataSource.m in Sources */, - 6E6456F01184D4DA00F08CB1 /* TTThumbsTableViewCell.m in Sources */, - 6E6456F11184D4DA00F08CB1 /* TTThumbsViewController.m in Sources */, - 6E6456F21184D4DA00F08CB1 /* TTThumbView.m in Sources */, - 6E6456F31184D4DA00F08CB1 /* TTUnclippedView.m in Sources */, - 6E6457001184D4DA00F08CB1 /* TTView.m in Sources */, - 6E6457011184D4DA00F08CB1 /* TTViewController.m in Sources */, - 6E6457021184D4DA00F08CB1 /* TTWebController.m in Sources */, - 6E6457041184D4DA00F08CB1 /* TTYouTubeView.m in Sources */, - 6E6457051184D4DA00F08CB1 /* UINavigationControllerAdditions.m in Sources */, - 6E6457061184D4DA00F08CB1 /* UINSObjectAdditions.m in Sources */, - 6E6457071184D4DA00F08CB1 /* UINSStringAdditions.m in Sources */, - 6E6457081184D4DA00F08CB1 /* UITabBarControllerAdditions.m in Sources */, - 6E6457091184D4DA00F08CB1 /* UITableViewAdditions.m in Sources */, - 6E64570A1184D4DA00F08CB1 /* UIToolbarAdditions.m in Sources */, - 6E64570B1184D4DA00F08CB1 /* UIViewAdditions.m in Sources */, - 6E64570D1184D4DA00F08CB1 /* UIWebViewAdditions.m in Sources */, - 6EDAEA02118CA59C0008133C /* TTNavigator.m in Sources */, - 6E86A8EC118CBF8E00662DA5 /* TTNavigatorWindow.m in Sources */, - 6E60820111B0C31400C93CD4 /* TTNavigationController.m in Sources */, - 6ECCA5FE11C0C0F6002296C7 /* TTLauncherHighlightView.m in Sources */, - 66ADC8C91290AC0200855386 /* TTExtensionsController.m in Sources */, - 66ADCD9D1291AA7100855386 /* TTExtensionInfoController.m in Sources */, - 666E18E912945430001C1D97 /* TTSplitViewController.m in Sources */, - 66F2E85712D426AF006FB485 /* TTTableFooterInfiniteScrollView.m in Sources */, - 66F2E86512D426EF006FB485 /* TTTableViewNetworkEnabledDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E6459381187645D00F08CB1 /* UIGlobalTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E6454AD1184D45600F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6E6454AC1184D45600F08CB1 /* PBXContainerItemProxy */; - }; - 6E6454AF1184D46800F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E6454AE1184D46800F08CB1 /* PBXContainerItemProxy */; - }; - 6EDAEA16118CA5CA0008133C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6EDAEA15118CA5CA0008133C /* PBXContainerItemProxy */; - }; - 6EDAEA18118CA5CA0008133C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6EDAEA17118CA5CA0008133C /* PBXContainerItemProxy */; - }; - 6EDAEA1A118CA5D30008133C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6EDAEA19118CA5D30008133C /* PBXContainerItemProxy */; - }; - 6EDAEA1C118CA5D30008133C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6EDAEA1B118CA5D30008133C /* PBXContainerItemProxy */; - }; - 6EE7367111849C6300A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6EE7367011849C6300A35176 /* PBXContainerItemProxy */; - }; - 6EE736C511849F9D00A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */; - }; - 6EE736C711849FA000A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* Three20UI */; - targetProxy = 6EE736C611849FA000A35176 /* PBXContainerItemProxy */; - }; - 6EE738AB1184ADD000A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6EE738AA1184ADD000A35176 /* PBXContainerItemProxy */; - }; - 6EE738AD1184ADE300A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6EE738AC1184ADE300A35176 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20UI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20UI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20UIUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/Three20UI/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/Three20UI/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/Three20UI/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/Three20UI/UnitTests/UIGlobalTests.m b/src/Three20UI/UnitTests/UIGlobalTests.m deleted file mode 100644 index 7489c92897..0000000000 --- a/src/Three20UI/UnitTests/UIGlobalTests.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import -#import - -#import "Three20Style/TTGlobalStyle.h" - -@interface UIGlobalTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UIGlobalTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTruth { - STAssertTrue(true, @"True!"); -} - - -@end diff --git a/src/Three20UICommon/Configurations/Library.xcconfig b/src/Three20UICommon/Configurations/Library.xcconfig deleted file mode 100644 index ee37b32916..0000000000 --- a/src/Three20UICommon/Configurations/Library.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = Three20UICommon -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/src/Three20UICommon/Configurations/Project.xcconfig b/src/Three20UICommon/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/Three20UICommon/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/Three20UICommon/Configurations/UnitTests.xcconfig b/src/Three20UICommon/Configurations/UnitTests.xcconfig deleted file mode 100644 index 2ee43463dd..0000000000 --- a/src/Three20UICommon/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = UICommonUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(UIKIT_FX) $(COREGRAPHICS_FX) diff --git a/src/Three20UICommon/Headers/TTBaseViewController.h b/src/Three20UICommon/Headers/TTBaseViewController.h deleted file mode 100644 index f47136c326..0000000000 --- a/src/Three20UICommon/Headers/TTBaseViewController.h +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * A view controller with some useful additions. - */ -@interface TTBaseViewController : UIViewController { -@protected - NSDictionary* _frozenState; - UIBarStyle _navigationBarStyle; - UIColor* _navigationBarTintColor; - UIStatusBarStyle _statusBarStyle; - - BOOL _isViewAppearing; - BOOL _hasViewAppeared; - BOOL _autoresizesForKeyboard; -} - -/** - * The style of the navigation bar when this view controller is pushed onto - * a navigation controller. - * - * @default UIBarStyleDefault - */ -@property (nonatomic) UIBarStyle navigationBarStyle; - -/** - * The color of the navigation bar when this view controller is pushed onto - * a navigation controller. - * - * @default TTSTYLEVAR(navigationBarTintColor) - */ -@property (nonatomic, retain) UIColor* navigationBarTintColor; - -/** - * The style of the status bar when this view controller is appearing. - * - * @default [[UIApplication sharedApplication] statusBarStyle] via app's info.plist - * - */ -@property (nonatomic) UIStatusBarStyle statusBarStyle; - -/** - * The view has appeared at least once and hasn't been removed due to a memory warning. - */ -@property (nonatomic, readonly) BOOL hasViewAppeared; - -/** - * The view is about to appear and has not appeared yet. - */ -@property (nonatomic, readonly) BOOL isViewAppearing; - -/** - * Determines if the view will be resized automatically to fit the keyboard. - */ -@property (nonatomic) BOOL autoresizesForKeyboard; - - -/** - * Sent to the controller before the keyboard slides in. - */ -- (void)keyboardWillAppear:(BOOL)animated withBounds:(CGRect)bounds; - -/** - * Sent to the controller before the keyboard slides out. - */ -- (void)keyboardWillDisappear:(BOOL)animated withBounds:(CGRect)bounds; - -/** - * Sent to the controller after the keyboard has slid in. - */ -- (void)keyboardDidAppear:(BOOL)animated withBounds:(CGRect)bounds; - -/** - * Sent to the controller after the keyboard has slid out. - */ -- (void)keyboardDidDisappear:(BOOL)animated withBounds:(CGRect)bounds; - - -@end diff --git a/src/Three20UICommon/Headers/TTGlobalUICommon.h b/src/Three20UICommon/Headers/TTGlobalUICommon.h deleted file mode 100644 index d139ee062b..0000000000 --- a/src/Three20UICommon/Headers/TTGlobalUICommon.h +++ /dev/null @@ -1,202 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * @return the current runtime version of the iPhone OS. - */ -float TTOSVersion(); - -/** - * Checks if the link-time version of the OS is at least a certain version. - */ -BOOL TTOSVersionIsAtLeast(float version); - -/** - * @return TRUE if the keyboard is visible. - */ -BOOL TTIsKeyboardVisible(); - -/** - * @return TRUE if the device has phone capabilities. - */ -BOOL TTIsPhoneSupported(); - -/** - * @return TRUE if the device is iPad. - */ -BOOL TTIsPad(); - -/** - * @return the current device orientation. - */ -UIDeviceOrientation TTDeviceOrientation(); - -/** - * On iPhone/iPod touch - * Checks if the orientation is portrait, landscape left, or landscape right. - * This helps to ignore upside down and flat orientations. - * - * On iPad: - * Always returns Yes. - */ -BOOL TTIsSupportedOrientation(UIInterfaceOrientation orientation); - -/** - * @return the rotation transform for a given orientation. - */ -CGAffineTransform TTRotateTransformForOrientation(UIInterfaceOrientation orientation); - -/** - * @return the application frame with no offset. - * - * From the Apple docs: - * Frame of application screen area in points (i.e. entire screen minus status bar if visible) - */ -CGRect TTApplicationFrame(); - -/** - * @return the toolbar height for a given orientation. - * - * The toolbar is slightly shorter in landscape. - */ -CGFloat TTToolbarHeightForOrientation(UIInterfaceOrientation orientation); - -/** - * @return the height of the keyboard for a given orientation. - */ -CGFloat TTKeyboardHeightForOrientation(UIInterfaceOrientation orientation); - -/** - * @return the space between the edge of the screen and a grouped table cell. Larger on iPad. - */ -CGFloat TTGroupedTableCellInset(); - -/** - * A convenient way to show a UIAlertView with a message. - */ -void TTAlert(NSString* message); - -/** - * Same as TTAlert but the alert view has no title. - */ -void TTAlertNoTitle(NSString* message); - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Debug logging helpers - -#define TTLOGRECT(rect) \ - TTDINFO(@"%s x=%f, y=%f, w=%f, h=%f", #rect, rect.origin.x, rect.origin.y, \ - rect.size.width, rect.size.height) - -#define TTLOGPOINT(pt) \ - TTDINFO(@"%s x=%f, y=%f", #pt, pt.x, pt.y) - -#define TTLOGSIZE(size) \ - TTDINFO(@"%s w=%f, h=%f", #size, size.width, size.height) - -#define TTLOGEDGES(edges) \ - TTDINFO(@"%s left=%f, right=%f, top=%f, bottom=%f", #edges, edges.left, edges.right, \ - edges.top, edges.bottom) - -#define TTLOGHSV(_COLOR) \ - TTDINFO(@"%s h=%f, s=%f, v=%f", #_COLOR, _COLOR.hue, _COLOR.saturation, _COLOR.value) - -#define TTLOGVIEWS(_VIEW) \ - { for (UIView* view = _VIEW; view; view = view.superview) { TTDINFO(@"%@", view); } } - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Dimensions of common iPhone OS Views - -/** - * The standard height of a row in a table view controller. - * @const 44 pixels - */ -extern const CGFloat ttkDefaultRowHeight; - -/** - * The standard height of a toolbar in portrait orientation. - * @const 44 pixels - */ -extern const CGFloat ttkDefaultPortraitToolbarHeight; - -/** - * The standard height of a toolbar in landscape orientation. - * @const 33 pixels - */ -extern const CGFloat ttkDefaultLandscapeToolbarHeight; - -/** - * The standard height of the keyboard in portrait orientation. - * @const 216 pixels - */ -extern const CGFloat ttkDefaultPortraitKeyboardHeight; - -/** - * The standard height of the keyboard in landscape orientation. - * @const 160 pixels - */ -extern const CGFloat ttkDefaultLandscapeKeyboardHeight; - -/** - * The space between the edge of the screen and the cell edge in grouped table views. - * @const 10 pixels - */ -extern const CGFloat ttkGroupedTableCellInset; - -/** - * Deprecated macros for common constants. - */ -#define TT_ROW_HEIGHT ttkDefaultRowHeight -#define TT_TOOLBAR_HEIGHT ttkDefaultPortraitToolbarHeight -#define TT_LANDSCAPE_TOOLBAR_HEIGHT ttkDefaultLandscapeToolbarHeight - -#define TT_KEYBOARD_HEIGHT ttkDefaultPortraitKeyboardHeight -#define TT_LANDSCAPE_KEYBOARD_HEIGHT ttkDefaultLandscapeKeyboardHeight -#define TT_IPAD_KEYBOARD_HEIGHT ttkDefaultPadPortraitKeyboardHeight -#define TT_IPAD_LANDSCAPE_KEYBOARD_HEIGHT ttkDefaultPadLandscapeKeyboardHeight - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Animation - -/** - * The standard duration length for a transition. - * @const 0.3 seconds - */ -extern const CGFloat ttkDefaultTransitionDuration; - -/** - * The standard duration length for a fast transition. - * @const 0.2 seconds - */ -extern const CGFloat ttkDefaultFastTransitionDuration; - -/** - * The standard duration length for a flip transition. - * @const 0.7 seconds - */ -extern const CGFloat ttkDefaultFlipTransitionDuration; - -/** - * Deprecated macros for common constants. - */ -#define TT_TRANSITION_DURATION ttkDefaultTransitionDuration -#define TT_FAST_TRANSITION_DURATION ttkDefaultFastTransitionDuration -#define TT_FLIP_TRANSITION_DURATION ttkDefaultFlipTransitionDuration diff --git a/src/Three20UICommon/Headers/Three20UICommon+Additions.h b/src/Three20UICommon/Headers/Three20UICommon+Additions.h deleted file mode 100644 index 94e6b2288c..0000000000 --- a/src/Three20UICommon/Headers/Three20UICommon+Additions.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UICommon/Three20UICommon.h" - -// Additions -#import "Three20UICommon/UIView+TTUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" -#import "Three20UICommon/UISplitViewController+TTNavigator.h" -#import "Three20UICommon/UIWindowAdditions.h" diff --git a/src/Three20UICommon/Headers/Three20UICommon.h b/src/Three20UICommon/Headers/Three20UICommon.h deleted file mode 100644 index 92e1da5e86..0000000000 --- a/src/Three20UICommon/Headers/Three20UICommon.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Global -#import "Three20UICommon/TTGlobalUICommon.h" - -// - Controllers -#import "Three20UICommon/TTBaseViewController.h" diff --git a/src/Three20UICommon/Headers/Three20UICommon_Prefix.pch b/src/Three20UICommon/Headers/Three20UICommon_Prefix.pch deleted file mode 100644 index da220d69cc..0000000000 --- a/src/Three20UICommon/Headers/Three20UICommon_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'Three20UICommon' target in the 'Three20UICommon' project -// - -#ifdef __OBJC__ - #import - #import -#endif - diff --git a/src/Three20UICommon/Headers/UISplitViewController+TTNavigator.h b/src/Three20UICommon/Headers/UISplitViewController+TTNavigator.h deleted file mode 100644 index 1a00c57b98..0000000000 --- a/src/Three20UICommon/Headers/UISplitViewController+TTNavigator.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UISplitViewController (TTNavigator) - -@end diff --git a/src/Three20UICommon/Headers/UIView+TTUICommon.h b/src/Three20UICommon/Headers/UIView+TTUICommon.h deleted file mode 100644 index 09774d5d38..0000000000 --- a/src/Three20UICommon/Headers/UIView+TTUICommon.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIView (TTUICommon) - -/** - * The view controller whose view contains this view. - */ -- (UIViewController*)viewController; - -@end diff --git a/src/Three20UICommon/Headers/UIViewControllerAdditions.h b/src/Three20UICommon/Headers/UIViewControllerAdditions.h deleted file mode 100644 index 22e311b083..0000000000 --- a/src/Three20UICommon/Headers/UIViewControllerAdditions.h +++ /dev/null @@ -1,160 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIViewController (TTCategory) - -/** - * Determines whether a controller is primarily a container of other controllers. - * - * @default NO - */ -@property (nonatomic, readonly) BOOL canContainControllers; - -/** - * Whether or not this controller should ever be counted as the "top" view controller. This is - * used for the purposes of determining which controllers should have modal controllers presented - * within them. - * - * @default YES; subclasses may override to NO if they so desire. - */ -@property (nonatomic, readonly) BOOL canBeTopViewController; - -/** - * The view controller that contains this view controller. - * - * This is just like parentViewController, except that it is not readonly. This property offers - * custom UIViewController subclasses the chance to tell TTNavigator how to follow the hierarchy - * of view controllers. - */ -@property (nonatomic, retain) UIViewController* superController; - -/** - * The child of this view controller which is most visible. - * - * This would be the selected view controller of a tab bar controller, or the top - * view controller of a navigation controller. This property offers custom UIViewController - * subclasses the chance to tell TTNavigator how to follow the hierarchy of view controllers. - */ -- (UIViewController*)topSubcontroller; - -/** - * The view controller that comes before this one in a navigation controller's history. - * - * This is an App Store-compatible version of previousViewController. - */ -- (UIViewController*)ttPreviousViewController; - -/** - * The view controller that comes after this one in a navigation controller's history. - */ -- (UIViewController*)nextViewController; - -/** - * A popup view controller that is presented on top of this view controller. - */ -@property (nonatomic, retain) UIViewController* popupViewController; - -/** - * Displays a controller inside this controller. - * - * TTURLMap uses this to display newly created controllers. The default does nothing -- - * UIViewController categories and subclasses should implement to display the controller - * in a manner specific to them. - */ -- (void)addSubcontroller:(UIViewController*)controller animated:(BOOL)animated - transition:(UIViewAnimationTransition)transition; - -/** - * Dismisses a view controller using the opposite transition it was presented with. - */ -- (void)removeFromSupercontroller; -- (void)removeFromSupercontrollerAnimated:(BOOL)animated; - -/** - * Brings a controller that is a child of this controller to the front. - * - * TTURLMap uses this to display controllers that exist already, but may not be visible. - * The default does nothing -- UIViewController categories and subclasses should implement - * to display the controller in a manner specific to them. - */ -- (void)bringControllerToFront:(UIViewController*)controller animated:(BOOL)animated; - -/** - * Gets a key that can be used to identify a subcontroller in subcontrollerForKey. - */ -- (NSString*)keyForSubcontroller:(UIViewController*)controller; - -/** - * Gets a subcontroller with the key that was returned from keyForSubcontroller. - */ -- (UIViewController*)subcontrollerForKey:(NSString*)key; - -/** - * Persists aspects of the view state to a dictionary that can later be used to restore it. - * - * This will be called when TTNavigator is persisting the navigation history so that it - * can later be restored. This usually happens when the app quits, or when there is a low - * memory warning. - * - * Return NO to avoid adding this controller to the navigation history. - * - * Default return value: YES - */ -- (BOOL)persistView:(NSMutableDictionary*)state; - -/** - * Restores aspects of the view state from a dictionary populated by persistView. - * - * This will be called when TTNavigator is restoring the navigation history. This may - * happen after launch, or when the controller appears again after a low memory warning. - */ -- (void)restoreView:(NSDictionary*)state; - -/** - * XXXjoe Not documenting this in the hopes that I can eliminate it ;) - */ -- (void)persistNavigationPath:(NSMutableArray*)path; - -/** - * Finishes initializing the controller after a TTNavigator-coordinated delay. - * - * If the controller was created in between calls to TTNavigator beginDelay and endDelay, then - * this will be called after endDelay. - */ -- (void)delayDidEnd; - -/** - * Shows or hides the navigation and status bars. - */ -- (void)showBars:(BOOL)show animated:(BOOL)animated; - -/** - * Shortcut for its animated-optional cousin. - */ -- (void)dismissModalViewController; - -/** - * Forcefully initiates garbage collection. You may call this in your didReceiveMemoryWarning - * message if you are worried about garbage collection memory consumption. - * - * See Articles/UI/GarbageCollection.mdown for a more detailed discussion. - */ -+ (void)doCommonGarbageCollection; - -@end diff --git a/src/Three20UICommon/Headers/UIViewControllerGarbageCollection.h b/src/Three20UICommon/Headers/UIViewControllerGarbageCollection.h deleted file mode 100644 index 48314cf173..0000000000 --- a/src/Three20UICommon/Headers/UIViewControllerGarbageCollection.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIViewController (TTGarbageCollection) - -+ (void)doGarbageCollectionWithSelector:(SEL)selector controllerSet:(NSMutableSet*)controllers; - -- (void)unsetCommonProperties; - -@end - diff --git a/src/Three20UICommon/Headers/UIWindowAdditions.h b/src/Three20UICommon/Headers/UIWindowAdditions.h deleted file mode 100644 index 0e3a00eb7b..0000000000 --- a/src/Three20UICommon/Headers/UIWindowAdditions.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIWindow (TTCategory) - -/** - * Searches the view hierarchy recursively for the first responder, starting with this window. - */ -- (UIView*)findFirstResponder; - -/** - * Searches the view hierarchy recursively for the first responder, starting with topView. - */ -- (UIView*)findFirstResponderInView:(UIView*)topView; - -@end diff --git a/src/Three20UICommon/README.mdown b/src/Three20UICommon/README.mdown deleted file mode 100644 index 3d2484395d..0000000000 --- a/src/Three20UICommon/README.mdown +++ /dev/null @@ -1,29 +0,0 @@ - -UICommon -======== - -These are the most basic parts required for all Three20UI components. This library acts -as the UI's "core", and itself only depends upon Core. - -Dependencies ------------- - -* Core - -Breakdown ---------- - -Following is a logical breakdown of the components included in this library. - -### Global - -A set of global methods that provide support for various common rudimentary tasks, including: - -* Operating system version -* Keyboard visibility -* Standard alert dialogs -* Common UI metrics - -### Additions - -Utilities for UIViewControllers and UIWindows. See the respective files for documentation. diff --git a/src/Three20UICommon/Sources/TTBaseViewController.m b/src/Three20UICommon/Sources/TTBaseViewController.m deleted file mode 100644 index 56bf5bc480..0000000000 --- a/src/Three20UICommon/Sources/TTBaseViewController.m +++ /dev/null @@ -1,392 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UICommon/TTBaseViewController.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// UICommon (Private) -#import "Three20UICommon/private/UIViewControllerGarbageCollection.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTBaseViewController - -@synthesize navigationBarStyle = _navigationBarStyle; -@synthesize navigationBarTintColor = _navigationBarTintColor; -@synthesize statusBarStyle = _statusBarStyle; -@synthesize isViewAppearing = _isViewAppearing; -@synthesize hasViewAppeared = _hasViewAppeared; -@synthesize autoresizesForKeyboard = _autoresizesForKeyboard; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - _navigationBarStyle = UIBarStyleDefault; - _statusBarStyle = [[UIApplication sharedApplication] statusBarStyle]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithNibName:nil bundle:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TTDCONDITIONLOG(TTDFLAG_VIEWCONTROLLERS, @"DEALLOC %@", self); - - [self unsetCommonProperties]; - - TT_RELEASE_SAFELY(_navigationBarTintColor); - TT_RELEASE_SAFELY(_frozenState); - - // Removes keyboard notification observers for - self.autoresizesForKeyboard = NO; - - // You would think UIViewController would call this in dealloc, but it doesn't! - // I would prefer not to have to redundantly put all view releases in dealloc and - // viewDidUnload, so my solution is just to call viewDidUnload here. - [self viewDidUnload]; - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)resizeForKeyboard:(NSNotification*)notification appearing:(BOOL)appearing { - CGRect keyboardBounds; - [[notification.userInfo objectForKey:UIKeyboardBoundsUserInfoKey] getValue:&keyboardBounds]; - - CGPoint keyboardStart; - [[notification.userInfo objectForKey:UIKeyboardCenterBeginUserInfoKey] getValue:&keyboardStart]; - - CGPoint keyboardEnd; - [[notification.userInfo objectForKey:UIKeyboardCenterEndUserInfoKey] getValue:&keyboardEnd]; - - BOOL animated = keyboardStart.y != keyboardEnd.y; - if (animated) { - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - } - - if (appearing) { - [self keyboardWillAppear:animated withBounds:keyboardBounds]; - - } else { - [self keyboardDidDisappear:animated withBounds:keyboardBounds]; - } - - if (animated) { - [UIView commitAnimations]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)frozenState { - return _frozenState; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFrozenState:(NSDictionary*)frozenState { - [_frozenState release]; - _frozenState = [frozenState retain]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - _isViewAppearing = YES; - _hasViewAppeared = YES; - - if (!self.popupViewController) { - UINavigationBar* bar = self.navigationController.navigationBar; - bar.tintColor = _navigationBarTintColor; - bar.barStyle = _navigationBarStyle; - - if (!TTIsPad()) { - [[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle animated:YES]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - _isViewAppearing = NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didReceiveMemoryWarning { - TTDCONDITIONLOG(TTDFLAG_VIEWCONTROLLERS, @"MEMORY WARNING FOR %@", self); - - if (_hasViewAppeared && !_isViewAppearing) { - NSMutableDictionary* state = [[NSMutableDictionary alloc] init]; - [self persistView:state]; - self.frozenState = state; - TT_RELEASE_SAFELY(state); - - // This will come around to calling viewDidUnload - [super didReceiveMemoryWarning]; - - _hasViewAppeared = NO; - - } else { - [super didReceiveMemoryWarning]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - if (TTIsPad()) { - return YES; - - } else { - UIViewController* popup = [self popupViewController]; - if (popup) { - return [popup shouldAutorotateToInterfaceOrientation:interfaceOrientation]; - - } else { - return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation - duration:(NSTimeInterval)duration { - UIViewController* popup = [self popupViewController]; - - if (popup) { - return [popup willAnimateRotationToInterfaceOrientation: fromInterfaceOrientation - duration: duration]; - - } else { - return [super willAnimateRotationToInterfaceOrientation: fromInterfaceOrientation - duration: duration]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - UIViewController* popup = [self popupViewController]; - - if (popup) { - return [popup didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - - } else { - return [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)rotatingHeaderView { - UIViewController* popup = [self popupViewController]; - - if (popup) { - return [popup rotatingHeaderView]; - - } else { - return [super rotatingHeaderView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)rotatingFooterView { - UIViewController* popup = [self popupViewController]; - - if (popup) { - return [popup rotatingFooterView]; - - } else { - return [super rotatingFooterView]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIKeyboardNotifications - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardWillShow:(NSNotification*)notification { - if (self.isViewAppearing) { - [self resizeForKeyboard:notification appearing:YES]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardDidShow:(NSNotification*)notification { -#ifdef __IPHONE_3_21 - CGRect frameStart; - [[notification.userInfo objectForKey:UIKeyboardFrameBeginUserInfoKey] getValue:&frameStart]; - - CGRect keyboardBounds = CGRectMake(0, 0, frameStart.size.width, frameStart.size.height); -#else - CGRect keyboardBounds; - [[notification.userInfo objectForKey:UIKeyboardBoundsUserInfoKey] getValue:&keyboardBounds]; -#endif - - [self keyboardDidAppear:YES withBounds:keyboardBounds]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardDidHide:(NSNotification*)notification { - if (self.isViewAppearing) { - [self resizeForKeyboard:notification appearing:NO]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardWillHide:(NSNotification*)notification { -#ifdef __IPHONE_3_21 - CGRect frameEnd; - [[notification.userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] getValue:&frameEnd]; - - CGRect keyboardBounds = CGRectMake(0, 0, frameEnd.size.width, frameEnd.size.height); -#else - CGRect keyboardBounds; - [[notification.userInfo objectForKey:UIKeyboardBoundsUserInfoKey] getValue:&keyboardBounds]; -#endif - - [self keyboardWillDisappear:YES withBounds:keyboardBounds]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setAutoresizesForKeyboard:(BOOL)autoresizesForKeyboard { - if (autoresizesForKeyboard != _autoresizesForKeyboard) { - _autoresizesForKeyboard = autoresizesForKeyboard; - - if (_autoresizesForKeyboard) { - [[NSNotificationCenter defaultCenter] addObserver: self - selector: @selector(keyboardWillShow:) - name: UIKeyboardWillShowNotification - object: nil]; - [[NSNotificationCenter defaultCenter] addObserver: self - selector: @selector(keyboardWillHide:) - name: UIKeyboardWillHideNotification - object: nil]; - [[NSNotificationCenter defaultCenter] addObserver: self - selector: @selector(keyboardDidShow:) - name: UIKeyboardDidShowNotification - object: nil]; - [[NSNotificationCenter defaultCenter] addObserver: self - selector: @selector(keyboardDidHide:) - name: UIKeyboardDidHideNotification - object: nil]; - - } else { - [[NSNotificationCenter defaultCenter] removeObserver: self - name: UIKeyboardWillShowNotification - object: nil]; - [[NSNotificationCenter defaultCenter] removeObserver: self - name: UIKeyboardWillHideNotification - object: nil]; - [[NSNotificationCenter defaultCenter] removeObserver: self - name: UIKeyboardDidShowNotification - object: nil]; - [[NSNotificationCenter defaultCenter] removeObserver: self - name: UIKeyboardDidHideNotification - object: nil]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardWillAppear:(BOOL)animated withBounds:(CGRect)bounds { - // Empty default implementation. -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardWillDisappear:(BOOL)animated withBounds:(CGRect)bounds { - // Empty default implementation. -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardDidAppear:(BOOL)animated withBounds:(CGRect)bounds { - // Empty default implementation. -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)keyboardDidDisappear:(BOOL)animated withBounds:(CGRect)bounds { - // Empty default implementation. -} - - -@end diff --git a/src/Three20UICommon/Sources/TTGlobalUICommon.m b/src/Three20UICommon/Sources/TTGlobalUICommon.m deleted file mode 100644 index 30518f12b8..0000000000 --- a/src/Three20UICommon/Sources/TTGlobalUICommon.m +++ /dev/null @@ -1,212 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UICommon/TTGlobalUICommon.h" - -// UI -#import "Three20UICommon/UIWindowAdditions.h" - -// Core -#import "Three20Core/TTGlobalCoreLocale.h" - -const CGFloat ttkDefaultRowHeight = 44; - -const CGFloat ttkDefaultPortraitToolbarHeight = 44; -const CGFloat ttkDefaultLandscapeToolbarHeight = 33; - -const CGFloat ttkDefaultPortraitKeyboardHeight = 216; -const CGFloat ttkDefaultLandscapeKeyboardHeight = 160; -const CGFloat ttkDefaultPadPortraitKeyboardHeight = 264; -const CGFloat ttkDefaultPadLandscapeKeyboardHeight = 352; - -const CGFloat ttkGroupedTableCellInset = 9; -const CGFloat ttkGroupedPadTableCellInset = 42; - -const CGFloat ttkDefaultTransitionDuration = 0.3; -const CGFloat ttkDefaultFastTransitionDuration = 0.2; -const CGFloat ttkDefaultFlipTransitionDuration = 0.7; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -float TTOSVersion() { - return [[[UIDevice currentDevice] systemVersion] floatValue]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTOSVersionIsAtLeast(float version) { - // Floating-point comparison is pretty bad, so let's cut it some slack with an epsilon. - static const CGFloat kEpsilon = 0.0000001; - -#ifdef __IPHONE_4_2 - return 4.2 - version >= -kEpsilon; -#endif -#ifdef __IPHONE_4_1 - return 4.1 - version >= -kEpsilon; -#endif -#ifdef __IPHONE_4_0 - return 4.0 - version >= -kEpsilon; -#endif -#ifdef __IPHONE_3_2 - return 3.2 - version >= -kEpsilon; -#endif -#ifdef __IPHONE_3_1 - return 3.1 - version >= -kEpsilon; -#endif -#ifdef __IPHONE_3_0 - return 3.0 - version >= -kEpsilon; -#endif -#ifdef __IPHONE_2_2 - return 2.2 - version >= -kEpsilon; -#endif -#ifdef __IPHONE_2_1 - return 2.1 - version >= -kEpsilon; -#endif -#ifdef __IPHONE_2_0 - return 2.0 - version >= -kEpsilon; -#endif - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsKeyboardVisible() { - // Operates on the assumption that the keyboard is visible if and only if there is a first - // responder; i.e. a control responding to key events - UIWindow* window = [UIApplication sharedApplication].keyWindow; - return !![window findFirstResponder]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsPhoneSupported() { - NSString* deviceType = [UIDevice currentDevice].model; - return [deviceType isEqualToString:@"iPhone"]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsPad() { -#ifdef __IPHONE_3_2 - return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad; -#else - return NO; -#endif -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -UIDeviceOrientation TTDeviceOrientation() { - UIDeviceOrientation orient = [UIDevice currentDevice].orientation; - if (UIDeviceOrientationUnknown == orient) { - return UIDeviceOrientationPortrait; - - } else { - return orient; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -BOOL TTIsSupportedOrientation(UIInterfaceOrientation orientation) { - if (TTIsPad()) { - return YES; - - } else { - switch (orientation) { - case UIInterfaceOrientationPortrait: - case UIInterfaceOrientationLandscapeLeft: - case UIInterfaceOrientationLandscapeRight: - return YES; - default: - return NO; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGAffineTransform TTRotateTransformForOrientation(UIInterfaceOrientation orientation) { - if (orientation == UIInterfaceOrientationLandscapeLeft) { - return CGAffineTransformMakeRotation(M_PI*1.5); - - } else if (orientation == UIInterfaceOrientationLandscapeRight) { - return CGAffineTransformMakeRotation(M_PI/2); - - } else if (orientation == UIInterfaceOrientationPortraitUpsideDown) { - return CGAffineTransformMakeRotation(-M_PI); - - } else { - return CGAffineTransformIdentity; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGRect TTApplicationFrame() { - CGRect frame = [UIScreen mainScreen].applicationFrame; - return CGRectMake(0, 0, frame.size.width, frame.size.height); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGFloat TTToolbarHeightForOrientation(UIInterfaceOrientation orientation) { - if (UIInterfaceOrientationIsPortrait(orientation) || TTIsPad()) { - return TT_ROW_HEIGHT; - - } else { - return TT_LANDSCAPE_TOOLBAR_HEIGHT; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGFloat TTKeyboardHeightForOrientation(UIInterfaceOrientation orientation) { - if (TTIsPad()) { - return UIInterfaceOrientationIsPortrait(orientation) ? TT_IPAD_KEYBOARD_HEIGHT - : TT_IPAD_LANDSCAPE_KEYBOARD_HEIGHT; - - } else { - return UIInterfaceOrientationIsPortrait(orientation) ? TT_KEYBOARD_HEIGHT - : TT_LANDSCAPE_KEYBOARD_HEIGHT; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGFloat TTGroupedTableCellInset() { - return TTIsPad() ? ttkGroupedPadTableCellInset : ttkGroupedTableCellInset; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -void TTAlert(NSString* message) { - UIAlertView* alert = [[[UIAlertView alloc] initWithTitle:TTLocalizedString(@"Alert", @"") - message:message delegate:nil - cancelButtonTitle:TTLocalizedString(@"OK", @"") - otherButtonTitles:nil] autorelease]; - [alert show]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -void TTAlertNoTitle(NSString* message) { - UIAlertView* alert = [[[UIAlertView alloc] initWithTitle:nil - message:message - delegate:nil - cancelButtonTitle:TTLocalizedString(@"OK", @"") - otherButtonTitles:nil] autorelease]; - [alert show]; -} diff --git a/src/Three20UICommon/Sources/UISplitViewController+TTNavigator.m b/src/Three20UICommon/Sources/UISplitViewController+TTNavigator.m deleted file mode 100644 index 29bcc2fd9f..0000000000 --- a/src/Three20UICommon/Sources/UISplitViewController+TTNavigator.m +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "UISplitViewController+TTNavigator.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -TT_FIX_CATEGORY_BUG(UISplitViewController_TTNavigator) - -@implementation UISplitViewController (TTNavigator) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canContainControllers { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canBeTopViewController { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)superController { - return nil; -} - - -@end diff --git a/src/Three20UICommon/Sources/UIView+TTUICommon.m b/src/Three20UICommon/Sources/UIView+TTUICommon.m deleted file mode 100644 index d1a360314a..0000000000 --- a/src/Three20UICommon/Sources/UIView+TTUICommon.m +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "UIView+TTUICommon.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIView_TTUICommon) - -@implementation UIView (TTUICommon) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)viewController { - for (UIView* next = [self superview]; next; next = next.superview) { - UIResponder* nextResponder = [next nextResponder]; - if ([nextResponder isKindOfClass:[UIViewController class]]) { - return (UIViewController*)nextResponder; - } - } - return nil; -} - - -@end - diff --git a/src/Three20UICommon/Sources/UIViewControllerAdditions.m b/src/Three20UICommon/Sources/UIViewControllerAdditions.m deleted file mode 100644 index d6b351ed1b..0000000000 --- a/src/Three20UICommon/Sources/UIViewControllerAdditions.m +++ /dev/null @@ -1,390 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UICommon/UIViewControllerAdditions.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" -#import "Three20UICommon/TTBaseViewController.h" - -// UICommon (private) -#import "Three20UICommon/private/UIViewControllerGarbageCollection.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" - -static NSMutableDictionary* gSuperControllers = nil; -static NSMutableDictionary* gPopupViewControllers = nil; - -// Garbage collection state -static NSMutableSet* gsCommonControllers = nil; -static NSTimer* gsGarbageCollectorTimer = nil; - -static const NSTimeInterval kGarbageCollectionInterval = 20; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIViewControllerAdditions) - -@implementation UIViewController (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Garbage Collection -/** - * What's this for? - * - * When view controllers are deallocated, we need to remove them from a set of - * global data structures. These global data structures provide additional functionality on - * top of the UIViewController class, such as setting the super controller. - * - * Removal was previously accomplished by swizzling the dealloc method of UIViewController with a - * custom implementation. Apple has now stated that we can no longer due this. - * - * See TTGarbageCollection additions at the bottom of this file for more implementation details. - * - * TODO (jverkoey May 19, 2010): Consider phasing out the use of an addition entirely. Instead, - * place all functionality within the TTBaseViewController class. - */ - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Common used here in the name because this is the UICommon lib. - */ -+ (NSMutableSet*)ttCommonControllers { - if (nil == gsCommonControllers) { - gsCommonControllers = [[NSMutableSet alloc] init]; - } - - return gsCommonControllers; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)doCommonGarbageCollection { - NSMutableSet* controllers = [UIViewController ttCommonControllers]; - - [self doGarbageCollectionWithSelector: @selector(unsetCommonProperties) - controllerSet: controllers]; - - if ([controllers count] == 0) { - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Killing the common garbage collector."); - [gsGarbageCollectorTimer invalidate]; - TT_RELEASE_SAFELY(gsGarbageCollectorTimer); - TT_RELEASE_SAFELY(gsCommonControllers); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)ttAddCommonController:(UIViewController*)controller { - - // TTBaseViewController calls unsetCommonProperties in its dealloc, so we don't need - // to set up the garbage collector in that case. - if (![controller isKindOfClass:[TTBaseViewController class]]) { - [[UIViewController ttCommonControllers] addObject:controller]; - - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Adding a common controller."); - - if (nil == gsGarbageCollectorTimer) { - gsGarbageCollectorTimer = - [[NSTimer scheduledTimerWithTimeInterval: kGarbageCollectionInterval - target: [UIViewController class] - selector: @selector(doCommonGarbageCollection) - userInfo: nil - repeats: YES] retain]; - } -#if TTDFLAG_CONTROLLERGARBAGECOLLECTION - - } else { - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Not adding a common controller."); -#endif - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canContainControllers { - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)canBeTopViewController { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)superController { - UIViewController* parent = self.parentViewController; - if (nil != parent) { - return parent; - - } else { - NSString* key = [NSString stringWithFormat:@"%d", self.hash]; - return [gSuperControllers objectForKey:key]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSuperController:(UIViewController*)viewController { - NSString* key = [NSString stringWithFormat:@"%d", self.hash]; - if (nil != viewController) { - if (nil == gSuperControllers) { - gSuperControllers = TTCreateNonRetainingDictionary(); - } - [gSuperControllers setObject:viewController forKey:key]; - - [UIViewController ttAddCommonController:self]; - - } else { - [gSuperControllers removeObjectForKey:key]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)topSubcontroller { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)ttPreviousViewController { - NSArray* viewControllers = self.navigationController.viewControllers; - if (viewControllers.count > 1) { - NSUInteger controllerIndex = [viewControllers indexOfObject:self]; - if (controllerIndex != NSNotFound && controllerIndex > 0) { - return [viewControllers objectAtIndex:controllerIndex-1]; - } - } - - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)nextViewController { - NSArray* viewControllers = self.navigationController.viewControllers; - if (viewControllers.count > 1) { - NSUInteger controllerIndex = [viewControllers indexOfObject:self]; - if (controllerIndex != NSNotFound && controllerIndex+1 < viewControllers.count) { - return [viewControllers objectAtIndex:controllerIndex+1]; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)popupViewController { - NSString* key = [NSString stringWithFormat:@"%d", self.hash]; - return [gPopupViewControllers objectForKey:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setPopupViewController:(UIViewController*)viewController { - NSString* key = [NSString stringWithFormat:@"%d", self.hash]; - if (viewController) { - if (!gPopupViewControllers) { - gPopupViewControllers = TTCreateNonRetainingDictionary(); - } - [gPopupViewControllers setObject:viewController forKey:key]; - - [UIViewController ttAddCommonController:self]; - - } else { - [gPopupViewControllers removeObjectForKey:key]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addSubcontroller:(UIViewController*)controller animated:(BOOL)animated - transition:(UIViewAnimationTransition)transition { - if (self.navigationController) { - [self.navigationController addSubcontroller:controller animated:animated - transition:transition]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeFromSupercontroller { - [self removeFromSupercontrollerAnimated:YES]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeFromSupercontrollerAnimated:(BOOL)animated { - if (self.navigationController) { - [self.navigationController popViewControllerAnimated:animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)bringControllerToFront:(UIViewController*)controller animated:(BOOL)animated { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)keyForSubcontroller:(UIViewController*)controller { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)subcontrollerForKey:(NSString*)key { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)persistView:(NSMutableDictionary*)state { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)restoreView:(NSDictionary*)state { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)persistNavigationPath:(NSMutableArray*)path { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)delayDidEnd { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)showBars:(BOOL)show animated:(BOOL)animated { -#ifdef __IPHONE_3_2 - if ([[UIApplication sharedApplication] - respondsToSelector:@selector(setStatusBarHidden:withAnimation:)]) - [[UIApplication sharedApplication] setStatusBarHidden:!show - withAnimation:(animated - ? UIStatusBarAnimationFade - : UIStatusBarAnimationNone)]; - else -#endif - [[UIApplication sharedApplication] setStatusBarHidden:!show animated:animated]; - - if (animated) { - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:TT_TRANSITION_DURATION]; - } - self.navigationController.navigationBar.alpha = show ? 1 : 0; - if (animated) { - [UIView commitAnimations]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dismissModalViewController { - [self dismissModalViewControllerAnimated:YES]; -} - - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UIViewController (TTGarbageCollection) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * The basic idea. - * Whenever you set the original navigator URL path for a controller, we add the controller - * to a global navigator controllers list. We then run the following garbage collection every - * kGarbageCollectionInterval seconds. If any controllers have a retain count of 1, then - * we can safely say that nobody is using it anymore and release it. - */ -+ (void)doGarbageCollectionWithSelector:(SEL)selector controllerSet:(NSMutableSet*)controllers { - if ([controllers count] > 0) { - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Checking %d controllers for garbage.", [controllers count]); - - NSSet* fullControllerList = [controllers copy]; - for (UIViewController* controller in fullControllerList) { - - // Subtract one from the retain count here due to the copied set. - NSInteger retainCount = [controller retainCount] - 1; - - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Retain count for %X is %d", (unsigned int)controller, retainCount); - - if (retainCount == 1) { - // If this fails, you've somehow added a controller that doesn't use - // the given selector. Check the controller type and the selector itself. - TTDASSERT([controller respondsToSelector:selector]); - if ([controller respondsToSelector:selector]) { - [controller performSelector:selector]; - } - - // The object's retain count is now 1, so when we release the copied set below, - // the object will be completely released. - [controllers removeObject:controller]; - } - } - - TT_RELEASE_SAFELY(fullControllerList); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)unsetCommonProperties { - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Unsetting this controller's properties: %X", (unsigned int)self); - - self.superController = nil; - self.popupViewController = nil; -} - - -@end diff --git a/src/Three20UICommon/Sources/UIWindowAdditions.m b/src/Three20UICommon/Sources/UIWindowAdditions.m deleted file mode 100644 index 0cd0c406b4..0000000000 --- a/src/Three20UICommon/Sources/UIWindowAdditions.m +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UICommon/UIWindowAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIWindowAdditions) - -@implementation UIWindow (TTCategory) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)findFirstResponder { - return [self findFirstResponderInView:self]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIView*)findFirstResponderInView:(UIView*)topView { - if ([topView isFirstResponder]) { - return topView; - } - - for (UIView* subView in topView.subviews) { - if ([subView isFirstResponder]) { - return subView; - } - - UIView* firstResponderCheck = [self findFirstResponderInView:subView]; - if (nil != firstResponderCheck) { - return firstResponderCheck; - } - } - return nil; -} - - -@end diff --git a/src/Three20UICommon/Three20UICommon.xcodeproj/project.pbxproj b/src/Three20UICommon/Three20UICommon.xcodeproj/project.pbxproj deleted file mode 100755 index da7cb05dd8..0000000000 --- a/src/Three20UICommon/Three20UICommon.xcodeproj/project.pbxproj +++ /dev/null @@ -1,614 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 666E16BF12944956001C1D97 /* UISplitViewController+TTNavigator.h in Headers */ = {isa = PBXBuildFile; fileRef = 666E16BB12944956001C1D97 /* UISplitViewController+TTNavigator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666E16C012944956001C1D97 /* UIView+TTUICommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 666E16BC12944956001C1D97 /* UIView+TTUICommon.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 666E16C512944961001C1D97 /* UISplitViewController+TTNavigator.m in Sources */ = {isa = PBXBuildFile; fileRef = 666E16C112944961001C1D97 /* UISplitViewController+TTNavigator.m */; }; - 666E16C612944961001C1D97 /* UIView+TTUICommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 666E16C212944961001C1D97 /* UIView+TTUICommon.m */; }; - 6E3C377F118C94E50079637E /* TTGlobalUICommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C377E118C94E50079637E /* TTGlobalUICommon.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3781118C94FC0079637E /* TTGlobalUICommon.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3780118C94FC0079637E /* TTGlobalUICommon.m */; }; - 6E3C37A9118C96670079637E /* UIWindowAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C37A8118C96670079637E /* UIWindowAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C37AD118C96700079637E /* UIWindowAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C37AC118C96700079637E /* UIWindowAdditions.m */; }; - 6E3C37D1118C96FA0079637E /* UIViewControllerAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C37D0118C96FA0079637E /* UIViewControllerAdditions.m */; }; - 6E3C37D6118C97040079637E /* UIViewControllerAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C37D5118C97040079637E /* UIViewControllerAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6454741184D2CD00F08CB1 /* Three20UICommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454731184D2CD00F08CB1 /* Three20UICommon.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6459381187645D00F08CB1 /* UICommonTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6459371187645D00F08CB1 /* UICommonTests.m */; }; - 6E7B1039119235BF001359FE /* TTBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7B1037119235BF001359FE /* TTBaseViewController.m */; }; - 6E7B103B119235CF001359FE /* TTBaseViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E7B103A119235CF001359FE /* TTBaseViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E7B116911924440001359FE /* UIViewControllerGarbageCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E7B116811924440001359FE /* UIViewControllerGarbageCollection.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E7F9476118E1DC600443B46 /* UIViewControllerAdditionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F9475118E1DC600443B46 /* UIViewControllerAdditionTests.m */; }; - 6EDAE96A118C99580008133C /* Three20UICommon+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EDAE969118C99580008133C /* Three20UICommon+Additions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE7366C11849C5800A35176 /* libThree20Core.a */; }; - 6EE739D01184BB0400A35176 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libThree20UICommon.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE7367011849C6300A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE736C611849FA000A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 666E16BB12944956001C1D97 /* UISplitViewController+TTNavigator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UISplitViewController+TTNavigator.h"; path = "Headers/UISplitViewController+TTNavigator.h"; sourceTree = ""; }; - 666E16BC12944956001C1D97 /* UIView+TTUICommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIView+TTUICommon.h"; path = "Headers/UIView+TTUICommon.h"; sourceTree = ""; }; - 666E16C112944961001C1D97 /* UISplitViewController+TTNavigator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UISplitViewController+TTNavigator.m"; path = "Sources/UISplitViewController+TTNavigator.m"; sourceTree = ""; }; - 666E16C212944961001C1D97 /* UIView+TTUICommon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIView+TTUICommon.m"; path = "Sources/UIView+TTUICommon.m"; sourceTree = ""; }; - 6E3C377E118C94E50079637E /* TTGlobalUICommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGlobalUICommon.h; path = Headers/TTGlobalUICommon.h; sourceTree = ""; }; - 6E3C3780118C94FC0079637E /* TTGlobalUICommon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGlobalUICommon.m; path = Sources/TTGlobalUICommon.m; sourceTree = ""; }; - 6E3C37A8118C96670079637E /* UIWindowAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIWindowAdditions.h; path = Headers/UIWindowAdditions.h; sourceTree = ""; }; - 6E3C37AC118C96700079637E /* UIWindowAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIWindowAdditions.m; path = Sources/UIWindowAdditions.m; sourceTree = ""; }; - 6E3C37D0118C96FA0079637E /* UIViewControllerAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIViewControllerAdditions.m; path = Sources/UIViewControllerAdditions.m; sourceTree = ""; }; - 6E3C37D5118C97040079637E /* UIViewControllerAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIViewControllerAdditions.h; path = Headers/UIViewControllerAdditions.h; sourceTree = ""; }; - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E6454731184D2CD00F08CB1 /* Three20UICommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20UICommon.h; path = Headers/Three20UICommon.h; sourceTree = ""; }; - 6E6458CB11875F8400F08CB1 /* Three20UICommon_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20UICommon_Prefix.pch; path = Headers/Three20UICommon_Prefix.pch; sourceTree = ""; }; - 6E6459371187645D00F08CB1 /* UICommonTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UICommonTests.m; path = UnitTests/UICommonTests.m; sourceTree = ""; }; - 6E7B1037119235BF001359FE /* TTBaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTBaseViewController.m; path = Sources/TTBaseViewController.m; sourceTree = ""; }; - 6E7B103A119235CF001359FE /* TTBaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTBaseViewController.h; path = Headers/TTBaseViewController.h; sourceTree = ""; }; - 6E7B116811924440001359FE /* UIViewControllerGarbageCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIViewControllerGarbageCollection.h; path = Headers/UIViewControllerGarbageCollection.h; sourceTree = ""; }; - 6E7F9475118E1DC600443B46 /* UIViewControllerAdditionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIViewControllerAdditionTests.m; path = UnitTests/UIViewControllerAdditionTests.m; sourceTree = ""; }; - 6E7F951C118E241E00443B46 /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = ""; }; - 6EDAE969118C99580008133C /* Three20UICommon+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Three20UICommon+Additions.h"; path = "Headers/Three20UICommon+Additions.h"; sourceTree = ""; }; - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EE7364B11849B3D00A35176 /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - BEF31F3A0F352DF5000DE5D2 /* libThree20UICommon.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libThree20UICommon.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* UICommonUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UICommonUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */, - 6EE739D01184BB0400A35176 /* libThree20UICommon.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libThree20UICommon.a */, - EB9E6C6210B6A8F800DE563C /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6E7F951C118E241E00443B46 /* README.mdown */, - 6E6454731184D2CD00F08CB1 /* Three20UICommon.h */, - 6EDAE969118C99580008133C /* Three20UICommon+Additions.h */, - 6E6458CB11875F8400F08CB1 /* Three20UICommon_Prefix.pch */, - 6EE737001184A1D500A35176 /* Source */, - 6E08B743118397FA00DA1579 /* Dependencies */, - 6EE7364D11849B4200A35176 /* Configurations */, - 6E08B274118282F700DA1579 /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 6E08B274118282F700DA1579 /* Tests */ = { - isa = PBXGroup; - children = ( - 6EE7364611849AF200A35176 /* Resources */, - 6E6459371187645D00F08CB1 /* UICommonTests.m */, - 6E7F9475118E1DC600443B46 /* UIViewControllerAdditionTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6E08B743118397FA00DA1579 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E3C37AF118C967B0079637E /* Additions */ = { - isa = PBXGroup; - children = ( - 666E16BB12944956001C1D97 /* UISplitViewController+TTNavigator.h */, - 666E16C112944961001C1D97 /* UISplitViewController+TTNavigator.m */, - 666E16BC12944956001C1D97 /* UIView+TTUICommon.h */, - 666E16C212944961001C1D97 /* UIView+TTUICommon.m */, - 6E3C37D5118C97040079637E /* UIViewControllerAdditions.h */, - 6E3C37D0118C96FA0079637E /* UIViewControllerAdditions.m */, - 6E7B116A11924443001359FE /* Private */, - 6E3C37A8118C96670079637E /* UIWindowAdditions.h */, - 6E3C37AC118C96700079637E /* UIWindowAdditions.m */, - ); - name = Additions; - sourceTree = ""; - }; - 6E7B1035119235AA001359FE /* Controllers */ = { - isa = PBXGroup; - children = ( - 6E7B103A119235CF001359FE /* TTBaseViewController.h */, - 6E7B1037119235BF001359FE /* TTBaseViewController.m */, - ); - name = Controllers; - sourceTree = ""; - }; - 6E7B116A11924443001359FE /* Private */ = { - isa = PBXGroup; - children = ( - 6E7B116811924440001359FE /* UIViewControllerGarbageCollection.h */, - ); - name = Private; - sourceTree = ""; - }; - 6EE7364611849AF200A35176 /* Resources */ = { - isa = PBXGroup; - children = ( - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6EE7364D11849B4200A35176 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6EE7364B11849B3D00A35176 /* Library.xcconfig */, - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */, - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6EE7366711849C5800A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE7366C11849C5800A35176 /* libThree20Core.a */, - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EE737001184A1D500A35176 /* Source */ = { - isa = PBXGroup; - children = ( - 6E3C377E118C94E50079637E /* TTGlobalUICommon.h */, - 6E3C3780118C94FC0079637E /* TTGlobalUICommon.m */, - 6E7B1035119235AA001359FE /* Controllers */, - 6E3C37AF118C967B0079637E /* Additions */, - ); - name = Source; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E6454741184D2CD00F08CB1 /* Three20UICommon.h in Headers */, - 6E3C377F118C94E50079637E /* TTGlobalUICommon.h in Headers */, - 6E3C37A9118C96670079637E /* UIWindowAdditions.h in Headers */, - 6E3C37D6118C97040079637E /* UIViewControllerAdditions.h in Headers */, - 6EDAE96A118C99580008133C /* Three20UICommon+Additions.h in Headers */, - 6E7B103B119235CF001359FE /* TTBaseViewController.h in Headers */, - 6E7B116911924440001359FE /* UIViewControllerGarbageCollection.h in Headers */, - 666E16BF12944956001C1D97 /* UISplitViewController+TTNavigator.h in Headers */, - 666E16C012944956001C1D97 /* UIView+TTUICommon.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* Three20UICommon */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20UICommon" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E645F461187B01F00F08CB1 /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E6601131ADFDB00ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EE7367111849C6300A35176 /* PBXTargetDependency */, - ); - name = Three20UICommon; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libThree20UICommon.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* Three20UICommonUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20UICommonUnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6EE736C511849F9D00A35176 /* PBXTargetDependency */, - 6EE736C711849FA000A35176 /* PBXTargetDependency */, - ); - name = Three20UICommonUnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* UICommonUnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20UICommon" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EE7366711849C5800A35176 /* Products */; - ProjectRef = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* Three20UICommon */, - EB9E6C6110B6A8F800DE563C /* Three20UICommonUnitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6EE7366C11849C5800A35176 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E6601131ADFDB00ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E645F461187B01F00F08CB1 /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3C3781118C94FC0079637E /* TTGlobalUICommon.m in Sources */, - 6E3C37AD118C96700079637E /* UIWindowAdditions.m in Sources */, - 6E3C37D1118C96FA0079637E /* UIViewControllerAdditions.m in Sources */, - 6E7B1039119235BF001359FE /* TTBaseViewController.m in Sources */, - 666E16C512944961001C1D97 /* UISplitViewController+TTNavigator.m in Sources */, - 666E16C612944961001C1D97 /* UIView+TTUICommon.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E6459381187645D00F08CB1 /* UICommonTests.m in Sources */, - 6E7F9476118E1DC600443B46 /* UIViewControllerAdditionTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6EE7367111849C6300A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6EE7367011849C6300A35176 /* PBXContainerItemProxy */; - }; - 6EE736C511849F9D00A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */; - }; - 6EE736C711849FA000A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* Three20UICommon */; - targetProxy = 6EE736C611849FA000A35176 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20UICommon" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20UICommon" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20UICommonUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/Three20UICommon/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/Three20UICommon/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/Three20UICommon/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/Three20UICommon/UnitTests/UICommonTests.m b/src/Three20UICommon/UnitTests/UICommonTests.m deleted file mode 100644 index fc4e2f58fb..0000000000 --- a/src/Three20UICommon/UnitTests/UICommonTests.m +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -@interface UICommonTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UICommonTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTTOSVersion { - // Difficult to test this guy. -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testTTOSVersionIsAtLeast { -#ifdef __IPHONE_4_2 - STAssertTrue(TTOSVersionIsAtLeast(4.2), @"Should be at least 4.2."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(4.2), @"Should be lower than 4.2."); -#endif - -#ifdef __IPHONE_4_1 - STAssertTrue(TTOSVersionIsAtLeast(4.1), @"Should be at least 4.1."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(4.1), @"Should be lower than 4.1."); -#endif - -#ifdef __IPHONE_4_0 - STAssertTrue(TTOSVersionIsAtLeast(4.0), @"Should be at least 4.0."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(4.0), @"Should be lower than 4.0."); -#endif - -#ifdef __IPHONE_3_2 - STAssertTrue(TTOSVersionIsAtLeast(3.2), @"Should be at least 3.2."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(3.2), @"Should be lower than 3.2."); -#endif - -#ifdef __IPHONE_3_1 - STAssertTrue(TTOSVersionIsAtLeast(3.1), @"Should be at least 3.1."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(3.1), @"Should be lower than 3.1."); -#endif - -#ifdef __IPHONE_3_0 - STAssertTrue(TTOSVersionIsAtLeast(3.0), @"Should be at least 3.0."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(3.0), @"Should be lower than 3.0."); -#endif - -#ifdef __IPHONE_2_2 - STAssertTrue(TTOSVersionIsAtLeast(2.2), @"Should be at least 2.2."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(2.2), @"Should be lower than 2.2."); -#endif - -#ifdef __IPHONE_2_1 - STAssertTrue(TTOSVersionIsAtLeast(2.1), @"Should be at least 2.1."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(2.1), @"Should be lower than 2.1."); -#endif - -#ifdef __IPHONE_2_0 - STAssertTrue(TTOSVersionIsAtLeast(2.0), @"Should be at least 2.0."); -#else - STAssertTrue(!TTOSVersionIsAtLeast(2.0), @"Should be lower than 2.0."); -#endif -} - - -@end diff --git a/src/Three20UICommon/UnitTests/UIViewControllerAdditionTests.m b/src/Three20UICommon/UnitTests/UIViewControllerAdditionTests.m deleted file mode 100644 index 691bbfa942..0000000000 --- a/src/Three20UICommon/UnitTests/UIViewControllerAdditionTests.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import - -// UICommon -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -@interface UIViewControllerAdditionTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UIViewControllerAdditionTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)test_canContainControllers { - UIViewController* controller = [[UIViewController alloc] init]; - - STAssertFalse([controller canContainControllers], - @"Basic view controller can't contain other controllers."); - - TT_RELEASE_SAFELY(controller); -} - - -@end diff --git a/src/Three20UINavigator/Configurations/Library.xcconfig b/src/Three20UINavigator/Configurations/Library.xcconfig deleted file mode 100644 index 9e9db5b427..0000000000 --- a/src/Three20UINavigator/Configurations/Library.xcconfig +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = Three20UINavigator -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 diff --git a/src/Three20UINavigator/Configurations/Project.xcconfig b/src/Three20UINavigator/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/Three20UINavigator/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/Three20UINavigator/Configurations/UnitTests.xcconfig b/src/Three20UINavigator/Configurations/UnitTests.xcconfig deleted file mode 100644 index 06c175fff4..0000000000 --- a/src/Three20UINavigator/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = UINavigatorUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(UIKIT_FX) diff --git a/src/Three20UINavigator/Headers/TTBaseNavigationController.h b/src/Three20UINavigator/Headers/TTBaseNavigationController.h deleted file mode 100644 index 5c56d08ca0..0000000000 --- a/src/Three20UINavigator/Headers/TTBaseNavigationController.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * The base navigation view controller that overrides popViewControllerAnimated and provides - * inverse animations when popping a view controller. - */ -@interface TTBaseNavigationController : UINavigationController { - -} - -/** - * TODO: Move this to a private category header. - */ -- (void)pushAnimationDidStop; - -- (void)pushViewController: (UIViewController*)controller - animatedWithTransition: (UIViewAnimationTransition)transition; - -/** - * Pops a view controller with a transition other than the standard sliding animation. - */ -- (UIViewController*)popViewControllerAnimatedWithTransition:(UIViewAnimationTransition)transition; - - -@end diff --git a/src/Three20UINavigator/Headers/TTBaseNavigator.h b/src/Three20UINavigator/Headers/TTBaseNavigator.h deleted file mode 100644 index 43bcb15082..0000000000 --- a/src/Three20UINavigator/Headers/TTBaseNavigator.h +++ /dev/null @@ -1,285 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -#import "Three20UINavigator/TTNavigatorPersistenceMode.h" - -@protocol TTNavigatorDelegate; -@protocol TTNavigatorRootContainer; -@class TTURLAction; -@class TTURLMap; -@class TTURLPattern; - -/** - * A URL-based navigation system with built-in persistence. - */ -@interface TTBaseNavigator : NSObject < - UIPopoverControllerDelegate -> { - TTURLMap* _URLMap; - - UIWindow* _window; - - UIViewController* _rootViewController; - NSMutableArray* _delayedControllers; - UIPopoverController* _popoverController; - - NSString* _persistenceKey; - TTNavigatorPersistenceMode _persistenceMode; - NSTimeInterval _persistenceExpirationAge; - - BOOL _delayCount; - - BOOL _supportsShakeToReload; - BOOL _opensExternalURLs; - - id _delegate; - id _rootContainer; -} - -/** - * The URL map used to translate between URLs and view controllers. - * - * @see TTURLMap - */ -@property (nonatomic, readonly) TTURLMap* URLMap; - -/** - * The window that contains the view controller hierarchy. - * - * By default retrieves the keyWindow. If there is no keyWindow, creates a new - * TTNavigatorWindow. - */ -@property (nonatomic, retain) UIWindow* window; - -/** - * A container that holds the root view controller. - * - * If nil, the window is treated as the root container. - * - * @default nil - */ -@property (nonatomic, assign) id rootContainer; - -/** - * The controller that is at the root of the view controller hierarchy. - */ -@property (nonatomic, readonly) UIViewController* rootViewController; - -/** - * The currently visible view controller. - */ -@property (nonatomic, readonly) UIViewController* visibleViewController; - -/** - * The view controller that is currently on top of the navigation stack. - * - * This differs from visibleViewController in that it ignores things like search - * display controllers which are visible, but not part of navigation. - */ -@property (nonatomic, readonly) UIViewController* topViewController; - -/** - * The URL of the currently visible view controller; - * - * Setting this property will open a new URL. - */ -@property (nonatomic, copy) NSString* URL; - -/** - * The key to use for storing persistence information. - * - * Three bits of information are stored for persistence. - * If a key name is given, these values will first be stored within a dictionary and - * then persisted with the given key name. - * If a key name is not given, the values are stored individually. - * - * @default nil - */ -@property (nonatomic, copy) NSString* persistenceKey; - -/** - * How view controllers are automatically persisted on termination and restored on launch. - * - * @default TTNavigatorPersistenceModeNone - */ -@property (nonatomic) TTNavigatorPersistenceMode persistenceMode; - -/** - * The age at which persisted view controllers are too old to be restored. - * - * In some cases, it is a good practice not to restore really old navigation paths, because - * the user probably won't remember how they got there, and would prefer to start from the - * beginning. - * - * Set this to 0 to restore from any age. - * - * @default 0 - */ -@property (nonatomic) NSTimeInterval persistenceExpirationAge; - -/** - * Causes the current view controller to be reloaded when shaking the phone. - * - * @default NO - */ -@property (nonatomic) BOOL supportsShakeToReload; - -/** - * Allows URLs to be opened externally if they don't match any patterns. - * - * @default NO - */ -@property (nonatomic) BOOL opensExternalURLs; - -/** - * Indicates that we are asking controllers to delay heavy operations until a later time. - * - * @default NO - */ -@property (nonatomic, readonly) BOOL isDelayed; - -@property (nonatomic, assign) id delegate; - -/** - * Determines the navigator that contains this view. - * - * Traverse the view hierarchy until the root view container is reached. If this root container - * conforms to the TTNavigatorRootContainer protocol, we call getNavigatorForController: - * with the top-most controller that contains this view that /isn't/ the container. - * If getNavigatorForController: returns a navigator, this navigator is returned. - * Otherwise, the global navigator is returned. - * - * If the given view is not, in fact, a view, which is the case if a UIBarButtonItem is passed, - * returns the global navigator via [TTBaseNavigator globalNavigator]. - * - * If you need to use a specific navigator for UIBarButtonItem, handle the button tap - * yourself and use navigatorForView: on an actual view in the controller. - */ -+ (TTBaseNavigator*)navigatorForView:(UIView*)view; - -+ (TTBaseNavigator*)globalNavigator; -+ (void)setGlobalNavigator:(TTBaseNavigator*)navigator; - -/** - * Load and display the view controller with a pattern that matches the URL. - * - * This method replaces all other openURL methods by using the chainable TTURLAction object. - * - * If there is not yet a rootViewController, the view controller loaded with this URL - * will be assigned as the rootViewController and inserted into the keyWindow. If there is not - * a keyWindow, a UIWindow will be created and displayed. - * - * Example TTURLAction initialization: - * [[TTURLAction actionWithURLPath:@"tt://some/path"] - * applyAnimated:YES] - * - * Each apply* method on the TTURLAction object returns self, allowing you to chain methods - * when initializing the object. This allows for a flexible method that requires a shifting set - * of parameters that have specific defaults. The old openURL* methods are being phased out, so - * please start using openURLAction instead. - */ -- (UIViewController*)openURLAction:(TTURLAction*)URLAction; - -/** - * Opens a sequence of URLs. - * - * @return The view controller of the last opened URL. - */ -- (UIViewController*)openURLs:(NSString*)URL,...; - -/** - * Gets a view controller for the URL without opening it. - * - * @return The view controller mapped to URL. - */ -- (UIViewController*)viewControllerForURL:(NSString*)URL; - -/** - * Gets a view controller for the URL without opening it. - * - * @return The view controller mapped to URL. - */ -- (UIViewController*)viewControllerForURL:(NSString*)URL query:(NSDictionary*)query; - -/** - * Gets a view controller for the URL without opening it. - * - * @return The view controller mapped to URL. - */ -- (UIViewController*)viewControllerForURL:(NSString*)URL query:(NSDictionary*)query - pattern:(TTURLPattern**)pattern; - -/** - * Tells the navigator to delay heavy operations. - * - * Initializing controllers can be very expensive, so if you are going to do some animation - * while this might be happening, this will tell controllers created through the navigator - * that they should hold off so as not to slow down the operations. - */ -- (void)beginDelay; - -/** - * Tells controllers that were created during the delay to finish what they were planning to do. - */ -- (void)endDelay; - -/** - * Cancels the delay without notifying delayed controllers. - */ -- (void)cancelDelay; - -/** - * Persists all view controllers to user defaults. - */ -- (void)persistViewControllers; - -/** - * Restores all view controllers from user defaults and returns the last one. - */ -- (UIViewController*)restoreViewControllers; - -/** - * Persists a view controller's state and recursively persists the next view controller after it. - * - * Do not call this directly except from within a view controller that is being directed - * by the app map to persist itself. - */ -- (void)persistController:(UIViewController*)controller path:(NSMutableArray*)path; - -/** - * Removes all view controllers from the window and releases them. - */ -- (void)removeAllViewControllers; - -/** - * Gets a navigation path which can be used to locate an object. - */ -- (NSString*)pathForObject:(id)object; - -/** - * Finds an object using its navigation path. - */ -- (id)objectForPath:(NSString*)path; - -/** - * Erases all data stored in user defaults. - */ -- (void)resetDefaults; - -@end diff --git a/src/Three20UINavigator/Headers/TTBaseNavigatorInternal.h b/src/Three20UINavigator/Headers/TTBaseNavigatorInternal.h deleted file mode 100644 index f2e2b7ff6b..0000000000 --- a/src/Three20UINavigator/Headers/TTBaseNavigatorInternal.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTBaseNavigator.h" - -@interface TTBaseNavigator (TTInternal) - -- (void)presentDependantController: (UIViewController*)controller - parentController: (UIViewController*)parentController - mode: (TTNavigationMode)mode - action: (TTURLAction*)action; - -- (UIViewController*)getVisibleChildController:(UIViewController*)controller; - -- (Class)navigationControllerClass; - -@end diff --git a/src/Three20UINavigator/Headers/TTGlobalNavigatorMetrics.h b/src/Three20UINavigator/Headers/TTGlobalNavigatorMetrics.h deleted file mode 100644 index 26ac0b09af..0000000000 --- a/src/Three20UINavigator/Headers/TTGlobalNavigatorMetrics.h +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * @return the current orientation of the visible view controller. - */ -UIInterfaceOrientation TTInterfaceOrientation(); - -/** - * @return the bounds of the screen with device orientation factored in. - */ -CGRect TTScreenBounds(); - -/** - * @return the application frame below the navigation bar. - */ -CGRect TTNavigationFrame(); - -/** - * @return the application frame below the navigation bar and above a toolbar. - */ -CGRect TTToolbarNavigationFrame(); - -/** - * @return the application frame below the navigation bar and above the keyboard. - */ -CGRect TTKeyboardNavigationFrame(); - -/** - * @return the height of the area containing the status bar and possibly the in-call status bar. - */ -CGFloat TTStatusHeight(); - -/** - * @return the height of the area containing the status bar and navigation bar. - */ -CGFloat TTBarsHeight(); - -/** - * @return the height of a toolbar considering the current orientation. - */ -CGFloat TTToolbarHeight(); - -/** - * @return the height of the keyboard considering the current orientation. - */ -CGFloat TTKeyboardHeight(); diff --git a/src/Three20UINavigator/Headers/TTNavigationMode.h b/src/Three20UINavigator/Headers/TTNavigationMode.h deleted file mode 100644 index 9d6f9dda6b..0000000000 --- a/src/Three20UINavigator/Headers/TTNavigationMode.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -typedef enum { - TTNavigationModeNone, - TTNavigationModeCreate, // a new view controller is created each time - TTNavigationModeShare, // a new view controller is created, cached and re-used - TTNavigationModeModal, // a new view controller is created and presented modally - TTNavigationModePopover, // a new view controller is created and presented in a popover - TTNavigationModeExternal, // an external app will be opened -} TTNavigationMode; diff --git a/src/Three20UINavigator/Headers/TTNavigatorDelegate.h b/src/Three20UINavigator/Headers/TTNavigatorDelegate.h deleted file mode 100644 index 604f6866ef..0000000000 --- a/src/Three20UINavigator/Headers/TTNavigatorDelegate.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class TTBaseNavigator; - -@protocol TTNavigatorDelegate -@optional - -/** - * Asks if the URL should be opened and allows the delegate to prevent it. - * See -navigator:URLToOpen: for a superset of functionality - */ -- (BOOL)navigator:(TTBaseNavigator*)navigator shouldOpenURL:(NSURL*)URL; - -/** - * Asks if the URL should be opened and allows the delegate to return a different URL to open - * instead. A return value of nil indicates the URL should not be opened. - * - * This is a superset of the functionality of -navigator:shouldOpenURL:. Returning YES from that - * method is equivalent to returning URL from this method. - */ -- (NSURL*)navigator:(TTBaseNavigator*)navigator URLToOpen:(NSURL*)URL; - -/** - * The URL is about to be opened in a controller. - * - * If the controller argument is nil, the URL is going to be opened externally. - */ -- (void)navigator:(TTBaseNavigator*)navigator willOpenURL:(NSURL*)URL - inViewController:(UIViewController*)controller; - -@end diff --git a/src/Three20UINavigator/Headers/TTNavigatorPersistenceMode.h b/src/Three20UINavigator/Headers/TTNavigatorPersistenceMode.h deleted file mode 100644 index 6d68e2cb68..0000000000 --- a/src/Three20UINavigator/Headers/TTNavigatorPersistenceMode.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -typedef enum { - TTNavigatorPersistenceModeNone, // no persistence - TTNavigatorPersistenceModeTop, // persists only the top-level controller - TTNavigatorPersistenceModeAll, // persists all navigation paths -} TTNavigatorPersistenceMode; - diff --git a/src/Three20UINavigator/Headers/TTNavigatorRootContainer.h b/src/Three20UINavigator/Headers/TTNavigatorRootContainer.h deleted file mode 100644 index 5752fe1408..0000000000 --- a/src/Three20UINavigator/Headers/TTNavigatorRootContainer.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@class TTBaseNavigator; - -@protocol TTNavigatorRootContainer - -@required - -- (void)navigator:(TTBaseNavigator*)navigator setRootViewController:(UIViewController*)controller; - -- (TTBaseNavigator*)getNavigatorForController:(UIViewController*)controller; - -@end - diff --git a/src/Three20UINavigator/Headers/TTNavigatorViewController.h b/src/Three20UINavigator/Headers/TTNavigatorViewController.h deleted file mode 100644 index 077c006946..0000000000 --- a/src/Three20UINavigator/Headers/TTNavigatorViewController.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UICommon/TTBaseViewController.h" - -/** - * Cleans up navigator properties when the controller is released. Used by the garbage - * collector found in UICommon's UIViewControllerAdditions.m. - */ -@interface TTNavigatorViewController : TTBaseViewController { - -} - -@end diff --git a/src/Three20UINavigator/Headers/TTURLAction.h b/src/Three20UINavigator/Headers/TTURLAction.h deleted file mode 100644 index cc4741a291..0000000000 --- a/src/Three20UINavigator/Headers/TTURLAction.h +++ /dev/null @@ -1,123 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * This object bundles up a set of parameters and ships them off - * to TTBasicNavigator's openURLAction method. This object is designed with the chaining principle - * in mind. Once you've created a TTURLAction object, you can apply any other property to the - * object via the apply* methods. Each of these methods returns self, allowing you to chain them. - * - * Example: - * [[TTURLAction actionWithURLPath:@"tt://some/path"] applyAnimated:YES]; - * Create an autoreleased URL action object with the path @"tt://some/path" that is animated. - * - * For the default values, see the apply method documentation below. - */ -@interface TTURLAction : NSObject { - NSString* _urlPath; - NSString* _parentURLPath; - NSDictionary* _query; - NSDictionary* _state; - BOOL _animated; - BOOL _withDelay; - - CGRect _sourceRect; - UIView* _sourceView; - UIBarButtonItem* _sourceButton; - - UIViewAnimationTransition _transition; -} - -@property (nonatomic, copy) NSString* urlPath; -@property (nonatomic, copy) NSString* parentURLPath; -@property (nonatomic, copy) NSDictionary* query; -@property (nonatomic, copy) NSDictionary* state; -@property (nonatomic, assign) BOOL animated; -@property (nonatomic, assign) BOOL withDelay; -@property (nonatomic, assign) CGRect sourceRect; -@property (nonatomic, retain) UIView* sourceView; -@property (nonatomic, retain) UIBarButtonItem* sourceButton; -@property (nonatomic, assign) UIViewAnimationTransition transition; - -/** - * Create an autoreleased TTURLAction object. - */ -+ (id)action; - -/** - * Create an autoreleased TTURLAction object with a URL path. - */ -+ (id)actionWithURLPath:(NSString*)urlPath; - -/** - * Initialize a TTURLAction object with a URL path. - * - * Designated initializer. - */ -- (id)initWithURLPath:(NSString*)urlPath; - -- (id)init; - -/** - * @default nil - */ -- (TTURLAction*)applyParentURLPath:(NSString*)parentURLPath; - -/** - * @default nil - */ -- (TTURLAction*)applyQuery:(NSDictionary*)query; - -/** - * @default nil - */ -- (TTURLAction*)applyState:(NSDictionary*)state; - -/** - * @default NO - */ -- (TTURLAction*)applyAnimated:(BOOL)animated; - -/** - * @default NO - */ -- (TTURLAction*)applyWithDelay:(BOOL)withDelay; - -/** - * @default CGRectZero - */ -- (TTURLAction*)applySourceRect:(CGRect)sourceRect; - -/** - * @default nil - */ -- (TTURLAction*)applySourceView:(UIView*)sourceView; - -/** - * @default nil - */ -- (TTURLAction*)applySourceButton:(UIBarButtonItem*)sourceButton; - -/** - * @default UIViewAnimationTransitionNone - */ -- (TTURLAction*)applyTransition:(UIViewAnimationTransition)transition; - - -@end diff --git a/src/Three20UINavigator/Headers/TTURLArgumentType.h b/src/Three20UINavigator/Headers/TTURLArgumentType.h deleted file mode 100644 index 926e370a22..0000000000 --- a/src/Three20UINavigator/Headers/TTURLArgumentType.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -typedef enum { - TTURLArgumentTypeNone, - TTURLArgumentTypePointer, - TTURLArgumentTypeBool, - TTURLArgumentTypeInteger, - TTURLArgumentTypeLongLong, - TTURLArgumentTypeFloat, - TTURLArgumentTypeDouble, -} TTURLArgumentType; diff --git a/src/Three20UINavigator/Headers/TTURLArguments.h b/src/Three20UINavigator/Headers/TTURLArguments.h deleted file mode 100644 index 5938233aed..0000000000 --- a/src/Three20UINavigator/Headers/TTURLArguments.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UINavigator (private) -#import "Three20UINavigator/private/TTURLArgumentType.h" - -TTURLArgumentType TTConvertArgumentType(char argType); -TTURLArgumentType TTURLArgumentTypeForProperty(Class cls, NSString* propertyName); - diff --git a/src/Three20UINavigator/Headers/TTURLGeneratorPattern.h b/src/Three20UINavigator/Headers/TTURLGeneratorPattern.h deleted file mode 100644 index f542cb0abc..0000000000 --- a/src/Three20UINavigator/Headers/TTURLGeneratorPattern.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UINavigator/TTURLPattern.h" - -@interface TTURLGeneratorPattern : TTURLPattern { - Class _targetClass; -} - -@property (nonatomic, assign) Class targetClass; - -- (id)initWithTargetClass:(Class)targetClass; - -- (void)compile; -- (NSString*)generateURLFromObject:(id)object; - -@end diff --git a/src/Three20UINavigator/Headers/TTURLLiteral.h b/src/Three20UINavigator/Headers/TTURLLiteral.h deleted file mode 100644 index 5825d39f54..0000000000 --- a/src/Three20UINavigator/Headers/TTURLLiteral.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI (private) -#import "Three20UINavigator/private/TTURLPatternText.h" - -@interface TTURLLiteral : NSObject { - NSString* _name; -} - -@property (nonatomic, copy) NSString* name; - -@end diff --git a/src/Three20UINavigator/Headers/TTURLMap.h b/src/Three20UINavigator/Headers/TTURLMap.h deleted file mode 100644 index f735bc0a6b..0000000000 --- a/src/Three20UINavigator/Headers/TTURLMap.h +++ /dev/null @@ -1,169 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -#import "Three20UINavigator/TTNavigationMode.h" - -@class TTURLNavigatorPattern; -@class TTURLGeneratorPattern; - -@interface TTURLMap : NSObject { - NSMutableDictionary* _objectMappings; - - NSMutableArray* _objectPatterns; - NSMutableArray* _fragmentPatterns; - NSMutableDictionary* _stringPatterns; - - NSMutableDictionary* _schemes; - - TTURLNavigatorPattern* _defaultObjectPattern; - TTURLNavigatorPattern* _hashPattern; - - BOOL _invalidPatterns; -} - -/** - * Adds a URL pattern which will perform a selector on an object when loaded. - */ -- (void)from:(NSString*)URL toObject:(id)object; -- (void)from:(NSString*)URL toObject:(id)object selector:(SEL)selector; - -/** - * Adds a URL pattern which will create and present a view controller when loaded. - * - * The selector will be called on the view controller after is created, and arguments from - * the URL will be extracted using the pattern and passed to the selector. - * - * target can be either a Class which is a subclass of UIViewController, or an object which - * implements a method that returns a UIViewController instance. If you use an object, the - * selector will be called with arguments extracted from the URL, and the view controller that - * you return will be the one that is presented. - */ -- (void)from:(NSString*)URL toViewController:(id)target; -- (void)from:(NSString*)URL toViewController:(id)target selector:(SEL)selector; -- (void)from:(NSString*)URL toViewController:(id)target transition:(NSInteger)transition; -- (void)from:(NSString*)URL parent:(NSString*)parentURL - toViewController:(id)target selector:(SEL)selector transition:(NSInteger)transition; - -/** - * Adds a URL pattern which will create and present a share view controller when loaded. - * - * Controllers created with the "share" mode, meaning that it will be created once and re-used - * until it is destroyed. - */ -- (void)from:(NSString*)URL toSharedViewController:(id)target; -- (void)from:(NSString*)URL toSharedViewController:(id)target selector:(SEL)selector; -- (void)from:(NSString*)URL parent:(NSString*)parentURL - toSharedViewController:(id)target; -- (void)from:(NSString*)URL parent:(NSString*)parentURL - toSharedViewController:(id)target selector:(SEL)selector; - -/** - * Adds a URL pattern which will create and present a modal view controller when loaded. - */ -- (void)from:(NSString*)URL toModalViewController:(id)target; -- (void)from:(NSString*)URL toModalViewController:(id)target selector:(SEL)selector; -- (void)from:(NSString*)URL toModalViewController:(id)target transition:(NSInteger)transition; -- (void)from:(NSString*)URL parent:(NSString*)parentURL - toModalViewController:(id)target selector:(SEL)selector transition:(NSInteger)transition; - -- (void)from:(NSString*)URL toPopoverViewController:(id)target; -- (void)from:(NSString*)URL toPopoverViewController:(id)target selector:(SEL)selector; - -/** - * Adds a mapping from a class to a generated URL. - */ -- (void)from:(Class)cls toURL:(NSString*)URL; - -/** - * Adds a mapping from a class and a special name to a generated URL. - */ -- (void)from:(Class)cls name:(NSString*)name toURL:(NSString*)URL; - -/** - * Adds a direct mapping from a literal URL to an object. - * - * The URL must not be a pattern - it must be the a literal URL. All requests to open this URL will - * return the object bound to it, rather than going through the pattern matching process to create - * a new object. - * - * Mapped objects are not retained. You are responsible for removing the mapping when the object - * is destroyed, or risk crashes. - */ -- (void)setObject:(id)object forURL:(NSString*)URL; - -/** - * Removes all objects and patterns mapped to a URL. - */ -- (void)removeURL:(NSString*)URL; - -/** - * Removes all URLs bound to an object. - */ -- (void)removeObject:(id)object; - -/** - * Removes objects bound literally to the URL. - */ -- (void)removeObjectForURL:(NSString*)URL; - -/** - * Removes all bound objects; - */ -- (void)removeAllObjects; - -/** - * Gets or creates the object with a pattern that matches the URL. - * - * Object mappings are checked first, and if no object is bound to the URL then pattern - * matching is used to create a new object. - */ -- (id)objectForURL:(NSString*)URL; -- (id)objectForURL:(NSString*)URL query:(NSDictionary*)query; -- (id)objectForURL:(NSString*)URL query:(NSDictionary*)query - pattern:(TTURLNavigatorPattern**)pattern; - -- (id)dispatchURL:(NSString*)URL toTarget:(id)target query:(NSDictionary*)query; - -/** - * Tests if there is a pattern that matches the URL and if so returns its navigation mode. - */ -- (TTNavigationMode)navigationModeForURL:(NSString*)URL; - -/** - * Tests if there is a pattern that matches the URL and if so returns its transition. - */ -- (NSInteger)transitionForURL:(NSString*)URL; - -/** - * Returns YES if there is a registered pattern with the URL scheme. - */ -- (BOOL)isSchemeSupported:(NSString*)scheme; - -/** - * Returns YES if the URL is destined for an external app. - */ -- (BOOL)isAppURL:(NSURL*)URL; - -/** - * Gets a URL that has been mapped to the object. - */ -- (NSString*)URLForObject:(id)object; -- (NSString*)URLForObject:(id)object withName:(NSString*)name; - -@end diff --git a/src/Three20UINavigator/Headers/TTURLNavigatorPattern.h b/src/Three20UINavigator/Headers/TTURLNavigatorPattern.h deleted file mode 100644 index bcb351142e..0000000000 --- a/src/Three20UINavigator/Headers/TTURLNavigatorPattern.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UI -#import "Three20UINavigator/TTURLPattern.h" -#import "Three20UINavigator/TTNavigationMode.h" - -@interface TTURLNavigatorPattern : TTURLPattern { - Class _targetClass; - id _targetObject; - TTNavigationMode _navigationMode; - NSString* _parentURL; - NSInteger _transition; - NSInteger _argumentCount; -} - -@property (nonatomic, assign) Class targetClass; -@property (nonatomic, assign) id targetObject; -@property (nonatomic, readonly) TTNavigationMode navigationMode; -@property (nonatomic, copy) NSString* parentURL; -@property (nonatomic, assign) NSInteger transition; -@property (nonatomic, assign) NSInteger argumentCount; -@property (nonatomic, readonly) BOOL isUniversal; -@property (nonatomic, readonly) BOOL isFragment; - -- (id)initWithTarget:(id)target; -- (id)initWithTarget:(id)target mode:(TTNavigationMode)navigationMode; - -- (void)compile; - -- (BOOL)matchURL:(NSURL*)URL; - -- (id)invoke:(id)target withURL:(NSURL*)URL query:(NSDictionary*)query; - -/** - * either instantiates an object or delegates object creation - * depending on current configuration - * @return the newly created object or nil if something went wrong - */ -- (id)createObjectFromURL:(NSURL*)URL query:(NSDictionary*)query; - -@end diff --git a/src/Three20UINavigator/Headers/TTURLObject.h b/src/Three20UINavigator/Headers/TTURLObject.h deleted file mode 100644 index 71791bde76..0000000000 --- a/src/Three20UINavigator/Headers/TTURLObject.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@protocol TTURLObject -@optional - -/** - * Converts the object to a URL using TTURLMap. - */ -@property (nonatomic, readonly) NSString* URLValue; - -/** - * Converts the object to a specially-named URL using TTURLMap. - */ -- (NSString*)URLValueWithName:(NSString*)name; - - -@end diff --git a/src/Three20UINavigator/Headers/TTURLPattern.h b/src/Three20UINavigator/Headers/TTURLPattern.h deleted file mode 100644 index 859e422eb7..0000000000 --- a/src/Three20UINavigator/Headers/TTURLPattern.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@protocol TTURLPatternText; - -@interface TTURLPattern : NSObject { - NSString* _URL; - NSString* _scheme; - NSMutableArray* _path; - NSMutableDictionary* _query; - id _fragment; - NSInteger _specificity; - SEL _selector; -} - -@property (nonatomic, copy) NSString* URL; -@property (nonatomic, readonly) NSString* scheme; -@property (nonatomic, readonly) NSInteger specificity; -@property (nonatomic, readonly) Class classForInvocation; -@property (nonatomic) SEL selector; - -- (void)setSelectorIfPossible:(SEL)selector; - -- (void)compileURL; - -@end diff --git a/src/Three20UINavigator/Headers/TTURLPatternInternal.h b/src/Three20UINavigator/Headers/TTURLPatternInternal.h deleted file mode 100644 index 53e19ceba1..0000000000 --- a/src/Three20UINavigator/Headers/TTURLPatternInternal.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTURLPattern.h" - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTURLPattern (TTInternal) - -- (void)setSelectorWithNames:(NSArray*)names; - -@end diff --git a/src/Three20UINavigator/Headers/TTURLPatternText.h b/src/Three20UINavigator/Headers/TTURLPatternText.h deleted file mode 100644 index 7142d36af3..0000000000 --- a/src/Three20UINavigator/Headers/TTURLPatternText.h +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -@protocol TTURLPatternText -@required - -- (BOOL)match:(NSString*)text; - -- (NSString*)convertPropertyOfObject:(id)object; - -@end diff --git a/src/Three20UINavigator/Headers/TTURLSelector.h b/src/Three20UINavigator/Headers/TTURLSelector.h deleted file mode 100644 index 563e34ba34..0000000000 --- a/src/Three20UINavigator/Headers/TTURLSelector.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UINavigator (private) -#import "Three20UINavigator/private/TTURLArgumentType.h" - -@interface TTURLSelector : NSObject { - NSString* _name; - SEL _selector; - TTURLSelector* _next; -} - -@property (nonatomic, readonly) NSString* name; -@property (nonatomic, retain) TTURLSelector* next; - -- (id)initWithName:(NSString*)name; - -- (NSString*)perform:(id)object returnType:(TTURLArgumentType)returnType; - -@end diff --git a/src/Three20UINavigator/Headers/TTURLWildcard.h b/src/Three20UINavigator/Headers/TTURLWildcard.h deleted file mode 100644 index 2eb5e78a09..0000000000 --- a/src/Three20UINavigator/Headers/TTURLWildcard.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// UINavigator (private) -#import "Three20UINavigator/private/TTURLPatternText.h" -#import "Three20UINavigator/private/TTURLArgumentType.h" - -@class TTURLSelector; - -@interface TTURLWildcard : NSObject { - NSString* _name; - NSInteger _argIndex; - TTURLArgumentType _argType; - TTURLSelector* _selector; -} - -@property (nonatomic, copy) NSString* name; -@property (nonatomic) NSInteger argIndex; -@property (nonatomic) TTURLArgumentType argType; -@property (nonatomic, retain) TTURLSelector* selector; - -- (void)deduceSelectorForClass:(Class)cls; - -@end diff --git a/src/Three20UINavigator/Headers/Three20UINavigator+Additions.h b/src/Three20UINavigator/Headers/Three20UINavigator+Additions.h deleted file mode 100644 index e202f78771..0000000000 --- a/src/Three20UINavigator/Headers/Three20UINavigator+Additions.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/Three20UINavigator.h" - -// Additions -#import "Three20UINavigator/UIViewController+TTNavigator.h" diff --git a/src/Three20UINavigator/Headers/Three20UINavigator.h b/src/Three20UINavigator/Headers/Three20UINavigator.h deleted file mode 100644 index 0bf7d9563c..0000000000 --- a/src/Three20UINavigator/Headers/Three20UINavigator.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -#import "Three20UINavigator/TTURLObject.h" - -// - View Controllers -#import "Three20UINavigator/TTNavigatorViewController.h" -#import "Three20UINavigator/TTBaseNavigationController.h" - -// - Navigator -#import "Three20UINavigator/TTNavigatorPersistenceMode.h" -#import "Three20UINavigator/TTBaseNavigator.h" -#import "Three20UINavigator/TTNavigatorDelegate.h" -#import "Three20UINavigator/TTNavigatorRootContainer.h" - -// -- URL Action -#import "Three20UINavigator/TTURLAction.h" - -// -- URL Map -#import "Three20UINavigator/TTURLMap.h" -#import "Three20UINavigator/TTNavigationMode.h" - -// -- URL Pattern -#import "Three20UINavigator/TTURLPattern.h" - -// --- Patterns -#import "Three20UINavigator/TTURLGeneratorPattern.h" -#import "Three20UINavigator/TTURLNavigatorPattern.h" diff --git a/src/Three20UINavigator/Headers/Three20UINavigator_Prefix.pch b/src/Three20UINavigator/Headers/Three20UINavigator_Prefix.pch deleted file mode 100644 index cc0746d20c..0000000000 --- a/src/Three20UINavigator/Headers/Three20UINavigator_Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the 'Three20UINavigator' target in the 'Three20UINavigator' project -// - -#ifdef __OBJC__ - #import - #import -#endif - diff --git a/src/Three20UINavigator/Headers/UIViewController+TTNavigator.h b/src/Three20UINavigator/Headers/UIViewController+TTNavigator.h deleted file mode 100644 index cf419af952..0000000000 --- a/src/Three20UINavigator/Headers/UIViewController+TTNavigator.h +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIViewController (TTNavigator) - -/** - * The default initializer sent to view controllers opened through TTNavigator. - */ -- (id)initWithNavigatorURL:(NSURL*)URL query:(NSDictionary*)query; - -/** - * The current URL that this view controller represents. - */ -@property (nonatomic, readonly) NSString* navigatorURL; - -/** - * The URL that was used to load this controller through TTNavigator. - * - * Do not ever change the value of this property. TTNavigator will assign this - * when creating your view controller, and it expects it to remain constant throughout - * the view controller's life. You can override navigatorURL if you want to specify - * a different URL for your view controller to use when persisting and restoring it. - */ -@property (nonatomic, copy) NSString* originalNavigatorURL; - -/** - * A temporary holding place for persisted view state waiting to be restored. - * - * While restoring controllers, TTURLMap will assign this the dictionary created by persistView. - * Ultimately, this state is bound for the restoreView call, but it is up to subclasses to - * call restoreView at the appropriate time -- usually after the view has been created. - * - * After you've restored the state, you should set frozenState to nil. - */ -@property (nonatomic, copy) NSDictionary* frozenState; - -/** - * Forcefully initiates garbage collection. You may call this in your didReceiveMemoryWarning - * message if you are worried about garbage collection memory consumption. - * - * See Articles/UI/GarbageCollection.mdown for a more detailed discussion. - */ -+ (void)doNavigatorGarbageCollection; - -@end diff --git a/src/Three20UINavigator/Headers/UIViewController+TTNavigatorGarbageCollection.h b/src/Three20UINavigator/Headers/UIViewController+TTNavigatorGarbageCollection.h deleted file mode 100644 index 3a8700be04..0000000000 --- a/src/Three20UINavigator/Headers/UIViewController+TTNavigatorGarbageCollection.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface UIViewController (TTNavigatorGarbageCollection) - -+ (void)ttAddNavigatorController:(UIViewController*)controller; - -/** - * What used to the "swizzled" deallocation of UIViewControllers is now accomplished here. - * This garbage collection method is called on controllers that have been completely released. - * - * @protected - */ -- (void)unsetNavigatorProperties; - -@end - diff --git a/src/Three20UINavigator/README.mdown b/src/Three20UINavigator/README.mdown deleted file mode 100644 index e6dbd3f399..0000000000 --- a/src/Three20UINavigator/README.mdown +++ /dev/null @@ -1,30 +0,0 @@ - -UINavigator -=========== - -This is the base Three20 navigator implementation. It provides the URL actions, maps, -and patterns required by the navigator. - -Dependencies ------------- - -* Core -* UICommon - -Breakdown ---------- - -Following is a logical breakdown of the components included in this library. - -### Global - -Metrics made available by the navigator. - -### TTBaseNavigator - -The base implementation of the navigator object that relies only on Core and UICommon. The -fully-featured navigator is available in UI. - -### TTURLAction - -Action objects used to tell the navigator what to do. diff --git a/src/Three20UINavigator/Sources/TTBaseNavigationController.m b/src/Three20UINavigator/Sources/TTBaseNavigationController.m deleted file mode 100644 index 41263fb57b..0000000000 --- a/src/Three20UINavigator/Sources/TTBaseNavigationController.m +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTBaseNavigationController.h" - -// UINavigator -#import "Three20UINavigator/TTBaseNavigator.h" -#import "Three20UINavigator/TTURLMap.h" - -// UINavigator (Additions) -#import "Three20UINavigator/UIViewController+TTNavigator.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTBaseNavigationController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewAnimationTransition)invertTransition:(UIViewAnimationTransition)transition { - switch (transition) { - case UIViewAnimationTransitionCurlUp: - return UIViewAnimationTransitionCurlDown; - case UIViewAnimationTransitionCurlDown: - return UIViewAnimationTransitionCurlUp; - case UIViewAnimationTransitionFlipFromLeft: - return UIViewAnimationTransitionFlipFromRight; - case UIViewAnimationTransitionFlipFromRight: - return UIViewAnimationTransitionFlipFromLeft; - default: - return UIViewAnimationTransitionNone; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)pushAnimationDidStop { -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UINavigationController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)popViewControllerAnimated:(BOOL)animated { - if (animated) { - NSString* URL = self.topViewController.originalNavigatorURL; - UIViewAnimationTransition transition = URL - ? [[TTBaseNavigator globalNavigator].URLMap transitionForURL:URL] - : UIViewAnimationTransitionNone; - if (transition) { - UIViewAnimationTransition inverseTransition = [self invertTransition:transition]; - return [self popViewControllerAnimatedWithTransition:inverseTransition]; - } - } - - return [super popViewControllerAnimated:animated]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)pushViewController: (UIViewController*)controller - animatedWithTransition: (UIViewAnimationTransition)transition { - [self pushViewController:controller animated:NO]; - - [UIView beginAnimations:nil context:nil]; - [UIView setAnimationDuration:TT_FLIP_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(pushAnimationDidStop)]; - [UIView setAnimationTransition:transition forView:self.view cache:YES]; - [UIView commitAnimations]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)popViewControllerAnimatedWithTransition:(UIViewAnimationTransition)transition { - UIViewController* poppedController = [self popViewControllerAnimated:NO]; - - [UIView beginAnimations:nil context:NULL]; - [UIView setAnimationDuration:TT_FLIP_TRANSITION_DURATION]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(pushAnimationDidStop)]; - [UIView setAnimationTransition:transition forView:self.view cache:NO]; - [UIView commitAnimations]; - - return poppedController; -} - - -@end - diff --git a/src/Three20UINavigator/Sources/TTBaseNavigator.m b/src/Three20UINavigator/Sources/TTBaseNavigator.m deleted file mode 100644 index 6526cafc79..0000000000 --- a/src/Three20UINavigator/Sources/TTBaseNavigator.m +++ /dev/null @@ -1,1011 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTBaseNavigator.h" - -// UINavigator -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" -#import "Three20UINavigator/TTNavigatorDelegate.h" -#import "Three20UINavigator/TTNavigatorRootContainer.h" -#import "Three20UINavigator/TTBaseNavigationController.h" -#import "Three20UINavigator/TTURLAction.h" -#import "Three20UINavigator/TTURLMap.h" -#import "Three20UINavigator/TTURLNavigatorPattern.h" -#import "Three20UINavigator/UIViewController+TTNavigator.h" - -// UINavigator (private) -#import "Three20UINavigator/private/TTBaseNavigatorInternal.h" - -// UICommon -#import "Three20UICommon/UIView+TTUICommon.h" -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Core -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" -#import "Three20Core/NSDateAdditions.h" - -static TTBaseNavigator* gNavigator = nil; - -static NSString* kNavigatorHistoryKey = @"TTNavigatorHistory"; -static NSString* kNavigatorHistoryTimeKey = @"TTNavigatorHistoryTime"; -static NSString* kNavigatorHistoryImportantKey = @"TTNavigatorHistoryImportant"; - -#ifdef __IPHONE_4_0 -UIKIT_EXTERN NSString *const UIApplicationDidEnterBackgroundNotification -__attribute__((weak_import)); -UIKIT_EXTERN NSString *const UIApplicationWillEnterForegroundNotification -__attribute__((weak_import)); -#endif - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTBaseNavigator - -@synthesize delegate = _delegate; -@synthesize URLMap = _URLMap; -@synthesize window = _window; -@synthesize rootViewController = _rootViewController; -@synthesize persistenceKey = _persistenceKey; -@synthesize persistenceExpirationAge = _persistenceExpirationAge; -@synthesize persistenceMode = _persistenceMode; -@synthesize supportsShakeToReload = _supportsShakeToReload; -@synthesize opensExternalURLs = _opensExternalURLs; -@synthesize rootContainer = _rootContainer; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - _URLMap = [[TTURLMap alloc] init]; - _persistenceMode = TTNavigatorPersistenceModeNone; - - NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; - [center addObserver:self - selector:@selector(applicationWillLeaveForeground:) - name:UIApplicationWillTerminateNotification - object:nil]; -#ifdef __IPHONE_4_0 - if (nil != &UIApplicationDidEnterBackgroundNotification) { - [center addObserver:self - selector:@selector(applicationWillLeaveForeground:) - name:UIApplicationDidEnterBackgroundNotification - object:nil]; - } -#endif - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; - _delegate = nil; - TT_RELEASE_SAFELY(_window); - TT_RELEASE_SAFELY(_rootViewController); - TT_RELEASE_SAFELY(_popoverController); - TT_RELEASE_SAFELY(_delayedControllers); - TT_RELEASE_SAFELY(_URLMap); - TT_RELEASE_SAFELY(_persistenceKey); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBaseNavigator*)globalNavigator { - return gNavigator; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)setGlobalNavigator:(TTBaseNavigator*)navigator { - if (gNavigator != navigator) { - [gNavigator release]; - gNavigator = [navigator retain]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTBaseNavigator*)navigatorForView:(UIView*)view { - // If this is called with a UIBarButtonItem, we can't traverse a view hierarchy to find the - // navigator, return the global navigator as a fallback. - if (![view isKindOfClass:[UIView class]]) { - return [TTBaseNavigator globalNavigator]; - } - - id container = nil; - UIViewController* controller = nil; // The iterator. - UIViewController* childController = nil; // The last iterated controller. - - for (controller = view.viewController; - nil != controller; - controller = controller.parentViewController) { - if ([controller conformsToProtocol:@protocol(TTNavigatorRootContainer)]) { - container = (id)controller; - break; - } - - childController = controller; - } - - TTBaseNavigator* navigator = [container getNavigatorForController:childController]; - if (nil == navigator) { - navigator = [TTBaseNavigator globalNavigator]; - } - - return navigator; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * The goal of this method is to return the currently visible view controller, referred to here as - * the "front" view controller. Tab bar controllers and navigation controllers are special-cased, - * and when a controller has a modal controller, the method recurses as necessary. - * - * @private - */ -+ (UIViewController*)frontViewControllerForController:(UIViewController*)controller { - if ([controller isKindOfClass:[UITabBarController class]]) { - UITabBarController* tabBarController = (UITabBarController*)controller; - - if (tabBarController.selectedViewController) { - controller = tabBarController.selectedViewController; - - } else { - controller = [tabBarController.viewControllers objectAtIndex:0]; - } - - } else if ([controller isKindOfClass:[UINavigationController class]]) { - UINavigationController* navController = (UINavigationController*)controller; - controller = navController.topViewController; - } - - if (controller.modalViewController) { - return [TTBaseNavigator frontViewControllerForController:controller.modalViewController]; - - } else { - return controller; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Similar to frontViewControllerForController, this method attempts to return the "front" - * navigation controller. This makes the assumption that a tab bar controller has navigation - * controllers as children. - * If the root controller isn't a tab controller or a navigation controller, then no navigation - * controller will be returned. - * - * @private - */ -- (UINavigationController*)frontNavigationController { - if ([_rootViewController isKindOfClass:[UITabBarController class]]) { - UITabBarController* tabBarController = (UITabBarController*)_rootViewController; - - if (tabBarController.selectedViewController) { - return (UINavigationController*)tabBarController.selectedViewController; - - } else { - return (UINavigationController*)[tabBarController.viewControllers objectAtIndex:0]; - } - - } else if ([_rootViewController isKindOfClass:[UINavigationController class]]) { - return (UINavigationController*)_rootViewController; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)frontViewController { - UINavigationController* navController = self.frontNavigationController; - if (navController) { - return [TTBaseNavigator frontViewControllerForController:navController]; - - } else { - return [TTBaseNavigator frontViewControllerForController:_rootViewController]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setRootViewController:(UIViewController*)controller { - if (controller != _rootViewController) { - [_rootViewController release]; - _rootViewController = [controller retain]; - - if (nil != _rootContainer) { - [_rootContainer navigator:self setRootViewController:_rootViewController]; - - } else { - [self.window addSubview:_rootViewController.view]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Prepare the given controller's parent controller and return it. Ensures that the parent - * controller exists in the navigation hierarchy. If it doesn't exist, and the given controller - * isn't a container, then a UINavigationController will be made the root controller. - * - * @private - */ -- (UIViewController*)parentForController: (UIViewController*)controller - isContainer: (BOOL)isContainer - parentURLPath: (NSString*)parentURLPath { - if (controller == _rootViewController) { - return nil; - - } else { - // If this is the first controller, and it is not a "container", forcibly put - // a navigation controller at the root of the controller hierarchy. - if (nil == _rootViewController && !isContainer) { - [self setRootViewController:[[[[self navigationControllerClass] alloc] init] autorelease]]; - } - - if (nil != parentURLPath) { - return [self openURLAction:[TTURLAction actionWithURLPath:parentURLPath]]; - - } else { - UIViewController* parent = self.topViewController; - if (parent != controller) { - return parent; - - } else { - return nil; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * A modal controller is a view controller that is presented over another controller and hides - * the original controller completely. Classic examples include the Safari login controller when - * authenticating on a network, creating a new contact in Contacts, and the Camera controller. - * - * If the controller that is being presented is not a UINavigationController, then a - * UINavigationController is created and the controller is pushed onto the navigation controller. - * The navigation controller is then displayed instead. - * - * @private - */ -- (void)presentModalController: (UIViewController*)controller - parentController: (UIViewController*)parentController - animated: (BOOL)animated - transition: (NSInteger)transition { - controller.modalTransitionStyle = transition; - - if ([controller isKindOfClass:[UINavigationController class]]) { - [parentController presentModalViewController: controller - animated: animated]; - - } else { - UINavigationController* navController = [[[[self navigationControllerClass] alloc] init] - autorelease]; - [navController pushViewController: controller - animated: NO]; - [parentController presentModalViewController: navController - animated: animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)presentPopoverController: (UIViewController*)controller - sourceButton: (UIBarButtonItem*)sourceButton - sourceView: (UIView*)sourceView - sourceRect: (CGRect)sourceRect - animated: (BOOL)animated { - TTDASSERT(nil != sourceButton || nil != sourceView); - - if (nil == sourceButton && nil == sourceView) { - return; - } - - if (nil != _popoverController) { - [_popoverController dismissPopoverAnimated:animated]; - TT_RELEASE_SAFELY(_popoverController); - } - - _popoverController = [[UIPopoverController alloc] initWithContentViewController:controller]; - _popoverController.delegate = self; - if (nil != sourceButton) { - [_popoverController presentPopoverFromBarButtonItem: sourceButton - permittedArrowDirections: UIPopoverArrowDirectionAny - animated: animated]; - - } else { - [_popoverController presentPopoverFromRect: sourceRect - inView: sourceView - permittedArrowDirections: UIPopoverArrowDirectionAny - animated: animated]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @return NO if the controller already has a super controller and is simply made visible. - * YES if the controller is the new root or if it did not have a super controller. - * - * @private - */ -- (BOOL)presentController: (UIViewController*)controller - parentController: (UIViewController*)parentController - mode: (TTNavigationMode)mode - action: (TTURLAction*)action { - BOOL didPresentNewController = YES; - - if (nil == _rootViewController) { - [self setRootViewController:controller]; - - } else { - UIViewController* previousSuper = controller.superController; - if (nil != previousSuper) { - if (previousSuper != parentController) { - // The controller already exists, so we just need to make it visible - for (UIViewController* superController = previousSuper; controller; ) { - UIViewController* nextSuper = superController.superController; - [superController bringControllerToFront: controller - animated: !nextSuper]; - controller = superController; - superController = nextSuper; - } - } - didPresentNewController = NO; - - } else if (nil != parentController) { - [self presentDependantController: controller - parentController: parentController - mode: mode - action: action]; - } - } - - return didPresentNewController; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)presentController: (UIViewController*)controller - parentURLPath: (NSString*)parentURLPath - withPattern: (TTURLNavigatorPattern*)pattern - action: (TTURLAction*)action { - BOOL didPresentNewController = NO; - - if (nil != controller) { - UIViewController* topViewController = self.topViewController; - - if (controller != topViewController) { - UIViewController* parentController = [self parentForController: controller - isContainer: [controller - canContainControllers] - parentURLPath: parentURLPath - ? parentURLPath - : pattern.parentURL]; - - if (nil != parentController && parentController != topViewController) { - [self presentController: parentController - parentController: nil - mode: TTNavigationModeNone - action: [TTURLAction actionWithURLPath:nil]]; - } - - didPresentNewController = [self - presentController: controller - parentController: parentController - mode: pattern.navigationMode - action: action]; - } - } - return didPresentNewController; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @protected - */ -- (void)didRestoreController:(UIViewController*)controller { - // Purposefully empty implementation. Meant to be overridden. -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)openURLAction:(TTURLAction*)action { - if (nil == action || nil == action.urlPath) { - return nil; - } - - // We may need to modify the urlPath, so let's create a local copy. - NSString* urlPath = action.urlPath; - - NSURL* theURL = [NSURL URLWithString:urlPath]; - if ([_URLMap isAppURL:theURL]) { - [[UIApplication sharedApplication] openURL:theURL]; - return nil; - } - - if (nil == theURL.scheme) { - if (nil != theURL.fragment) { - urlPath = [self.URL stringByAppendingString:urlPath]; - - } else { - urlPath = [@"http://" stringByAppendingString:urlPath]; - } - theURL = [NSURL URLWithString:urlPath]; - } - - // Allows the delegate to prevent opening this URL - if ([_delegate respondsToSelector:@selector(navigator:shouldOpenURL:)]) { - if (![_delegate navigator:self shouldOpenURL:theURL]) { - return nil; - } - } - - // Allows the delegate to modify the URL to be opened, as well as reject it. This delegate - // method is intended to supersede -navigator:shouldOpenURL:. - if ([_delegate respondsToSelector:@selector(navigator:URLToOpen:)]) { - NSURL *newURL = [_delegate navigator:self URLToOpen:theURL]; - if (!newURL) { - return nil; - - } else { - theURL = newURL; - urlPath = newURL.absoluteString; - } - } - - if (action.withDelay) { - [self beginDelay]; - } - - TTDCONDITIONLOG(TTDFLAG_NAVIGATOR, @"OPENING URL %@", urlPath); - - TTURLNavigatorPattern* pattern = nil; - UIViewController* controller = [self viewControllerForURL: urlPath - query: action.query - pattern: &pattern]; - if (nil != controller) { - if (nil != action.state) { - [controller restoreView:action.state]; - controller.frozenState = action.state; - - [self didRestoreController:controller]; - } - - if ([_delegate respondsToSelector:@selector(navigator:willOpenURL:inViewController:)]) { - [_delegate navigator: self - willOpenURL: theURL - inViewController: controller]; - } - - action.transition = action.transition ? action.transition : pattern.transition; - - BOOL wasNew = [self presentController: controller - parentURLPath: action.parentURLPath - withPattern: pattern - action: action]; - - if (action.withDelay && !wasNew) { - [self cancelDelay]; - } - - } else if (_opensExternalURLs) { - if ([_delegate respondsToSelector:@selector(navigator:willOpenURL:inViewController:)]) { - [_delegate navigator: self - willOpenURL: theURL - inViewController: nil]; - } - - [[UIApplication sharedApplication] openURL:theURL]; - } - - return controller; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @protected - */ -- (Class)windowClass { - return [UIWindow class]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSNotifications - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationWillLeaveForeground:(void *)ignored { - if (_persistenceMode) { - [self persistViewControllers]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIWindow*)window { - if (nil == _window) { - UIWindow* keyWindow = [UIApplication sharedApplication].keyWindow; - if (nil != keyWindow) { - _window = [keyWindow retain]; - - } else { - _window = [[[self windowClass] alloc] initWithFrame:TTScreenBounds()]; - [_window makeKeyAndVisible]; - } - } - return _window; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)visibleViewController { - UIViewController* controller = _rootViewController; - while (nil != controller) { - UIViewController* child = controller.modalViewController; - - if (nil == child) { - child = [self getVisibleChildController:controller]; - } - - if (nil != child) { - controller = child; - - } else { - return controller; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)topViewController { - UIViewController* controller = _rootViewController; - while (controller) { - UIViewController* child = controller.popupViewController; - if (!child || ![child canBeTopViewController]) { - child = controller.modalViewController; - } - if (!child) { - child = controller.topSubcontroller; - } - if (child) { - if (child == _rootViewController) { - return child; - - } else { - controller = child; - } - - } else { - return controller; - } - } - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)URL { - return self.topViewController.navigatorURL; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setURL:(NSString*)URLPath { - [self openURLAction:[[TTURLAction actionWithURLPath: URLPath] - applyAnimated: YES]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)openURLs:(NSString*)URL,... { - UIViewController* controller = nil; - va_list ap; - va_start(ap, URL); - while (URL) { - controller = [self openURLAction:[TTURLAction actionWithURLPath:URL]]; - URL = va_arg(ap, id); - } - va_end(ap); - - return controller; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)viewControllerForURL:(NSString*)URL { - return [self viewControllerForURL:URL query:nil pattern:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)viewControllerForURL:(NSString*)URL query:(NSDictionary*)query { - return [self viewControllerForURL:URL query:query pattern:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)viewControllerForURL: (NSString*)URL - query: (NSDictionary*)query - pattern: (TTURLNavigatorPattern**)pattern { - NSRange fragmentRange = [URL rangeOfString:@"#" options:NSBackwardsSearch]; - if (fragmentRange.location != NSNotFound) { - NSString* baseURL = [URL substringToIndex:fragmentRange.location]; - if ([self.URL isEqualToString:baseURL]) { - UIViewController* controller = self.visibleViewController; - id result = [_URLMap dispatchURL:URL toTarget:controller query:query]; - if ([result isKindOfClass:[UIViewController class]]) { - return result; - - } else { - return controller; - } - - } else { - id object = [_URLMap objectForURL:baseURL query:nil pattern:pattern]; - if (object) { - id result = [_URLMap dispatchURL:URL toTarget:object query:query]; - if ([result isKindOfClass:[UIViewController class]]) { - return result; - - } else { - return object; - } - - } else { - return nil; - } - } - } - - id object = [_URLMap objectForURL:URL query:query pattern:pattern]; - if (object) { - UIViewController* controller = object; - controller.originalNavigatorURL = URL; - - if (_delayCount) { - if (!_delayedControllers) { - _delayedControllers = [[NSMutableArray alloc] initWithObjects:controller,nil]; - - } else { - [_delayedControllers addObject:controller]; - } - } - - return controller; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isDelayed { - return _delayCount > 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)beginDelay { - ++_delayCount; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)endDelay { - if (_delayCount && !--_delayCount) { - for (UIViewController* controller in _delayedControllers) { - [controller delayDidEnd]; - } - - TT_RELEASE_SAFELY(_delayedControllers); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)cancelDelay { - if (_delayCount && !--_delayCount) { - TT_RELEASE_SAFELY(_delayedControllers); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)persistViewControllers { - NSMutableArray* path = [NSMutableArray array]; - [self persistController:_rootViewController path:path]; - TTDCONDITIONLOG(TTDFLAG_NAVIGATOR, @"DEBUG PERSIST %@", path); - - // Check if any of the paths were "important", and therefore unable to expire - BOOL important = NO; - for (NSDictionary* state in path) { - if ([state objectForKey:@"__important__"]) { - important = YES; - break; - } - } - - NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; - if (path.count) { - NSDate* historyTime = [NSDate date]; - NSNumber* historyImportant = [NSNumber numberWithInt:important]; - - if (TTIsStringWithAnyText(_persistenceKey)) { - NSDictionary* persistedValues = [NSDictionary dictionaryWithObjectsAndKeys: - path, kNavigatorHistoryKey, - historyTime, kNavigatorHistoryTimeKey, - historyImportant, kNavigatorHistoryImportantKey, - nil]; - [defaults setObject:persistedValues forKey:_persistenceKey]; - - } else { - [defaults setObject:path forKey:kNavigatorHistoryKey]; - [defaults setObject:historyTime forKey:kNavigatorHistoryTimeKey]; - [defaults setObject:historyImportant forKey:kNavigatorHistoryImportantKey]; - } - - [defaults synchronize]; - - } else { - [self resetDefaults]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)restoreViewControllers { - NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; - NSDate* timestamp = nil; - NSArray* path = nil; - BOOL important = NO; - - if (TTIsStringWithAnyText(_persistenceKey)) { - NSDictionary* persistedValues = [defaults objectForKey:_persistenceKey]; - - timestamp = [persistedValues objectForKey:kNavigatorHistoryTimeKey]; - path = [persistedValues objectForKey:kNavigatorHistoryKey]; - important = [[persistedValues objectForKey:kNavigatorHistoryImportantKey] boolValue]; - - } else { - timestamp = [defaults objectForKey:kNavigatorHistoryTimeKey]; - path = [defaults objectForKey:kNavigatorHistoryKey]; - important = [[defaults objectForKey:kNavigatorHistoryImportantKey] boolValue]; - } - TTDCONDITIONLOG(TTDFLAG_NAVIGATOR, @"DEBUG RESTORE %@ FROM %@", - path, [timestamp formatRelativeTime]); - - BOOL expired = _persistenceExpirationAge - && -timestamp.timeIntervalSinceNow > _persistenceExpirationAge; - if (expired && !important) { - return nil; - } - - UIViewController* controller = nil; - BOOL passedContainer = NO; - for (NSDictionary* state in path) { - NSString* URL = [state objectForKey:@"__navigatorURL__"]; - controller = [self openURLAction:[[TTURLAction actionWithURLPath: URL] - applyState: state]]; - - // Stop if we reach a model view controller whose model could not be synchronously loaded. - // That is because the controller after it may depend on the data it could not load, so - // we'd better not risk opening more controllers that may not be able to function. - // if ([controller isKindOfClass:[TTModelViewController class]]) { - // TTModelViewController* modelViewController = (TTModelViewController*)controller; - // if (!modelViewController.model.isLoaded) { - // break; - // } - // } - - // Stop after one controller if we are in "persist top" mode - if (_persistenceMode == TTNavigatorPersistenceModeTop && passedContainer) { - break; - } - - passedContainer = [controller canContainControllers]; - } - - [self.window makeKeyAndVisible]; - - return controller; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)persistController:(UIViewController*)controller path:(NSMutableArray*)path { - NSString* URL = controller.navigatorURL; - if (URL) { - // Let the controller persists its own arbitrary state - NSMutableDictionary* state = [NSMutableDictionary dictionaryWithObject:URL - forKey:@"__navigatorURL__"]; - if ([controller persistView:state]) { - [path addObject:state]; - } - } - [controller persistNavigationPath:path]; - - if (controller.modalViewController - && controller.modalViewController.parentViewController == controller) { - [self persistController:controller.modalViewController path:path]; - - } else if (controller.popupViewController - && controller.popupViewController.superController == controller) { - [self persistController:controller.popupViewController path:path]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeAllViewControllers { - [_rootViewController.view removeFromSuperview]; - TT_RELEASE_SAFELY(_rootViewController); - [_URLMap removeAllObjects]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)pathForObject:(id)object { - if ([object isKindOfClass:[UIViewController class]]) { - NSMutableArray* paths = [NSMutableArray array]; - for (UIViewController* controller = object; controller; ) { - UIViewController* superController = controller.superController; - NSString* key = [superController keyForSubcontroller:controller]; - if (key) { - [paths addObject:key]; - } - controller = superController; - } - - return [paths componentsJoinedByString:@"/"]; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectForPath:(NSString*)path { - NSArray* keys = [path componentsSeparatedByString:@"/"]; - UIViewController* controller = _rootViewController; - for (NSString* key in [keys reverseObjectEnumerator]) { - controller = [controller subcontrollerForKey:key]; - } - return controller; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)resetDefaults { - NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; - - if (TTIsStringWithAnyText(_persistenceKey)) { - [defaults removeObjectForKey:_persistenceKey]; - - } else { - [defaults removeObjectForKey:kNavigatorHistoryKey]; - [defaults removeObjectForKey:kNavigatorHistoryTimeKey]; - [defaults removeObjectForKey:kNavigatorHistoryImportantKey]; - } - - [defaults synchronize]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIPopoverControllerDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController { - if (popoverController == _popoverController) { - TT_RELEASE_SAFELY(_popoverController); - } -} - - - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTBaseNavigator (TTInternal) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Present a view controller that strictly depends on the existence of the parent controller. - */ -- (void)presentDependantController: (UIViewController*)controller - parentController: (UIViewController*)parentController - mode: (TTNavigationMode)mode - action: (TTURLAction*)action { - - if (mode == TTNavigationModeModal) { - [self presentModalController: controller - parentController: parentController - animated: action.animated - transition: action.transition]; - - } else if (mode == TTNavigationModePopover) { - [self presentPopoverController: controller - sourceButton: action.sourceButton - sourceView: action.sourceView - sourceRect: action.sourceRect - animated: action.animated]; - - } else { - [parentController addSubcontroller: controller - animated: action.animated - transition: action.transition]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIViewController*)getVisibleChildController:(UIViewController*)controller { - return controller.topSubcontroller; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (Class)navigationControllerClass { - return [TTBaseNavigationController class]; -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTGlobalNavigatorMetrics.m b/src/Three20UINavigator/Sources/TTGlobalNavigatorMetrics.m deleted file mode 100644 index ebb25f219d..0000000000 --- a/src/Three20UINavigator/Sources/TTGlobalNavigatorMetrics.m +++ /dev/null @@ -1,109 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTGlobalNavigatorMetrics.h" - -// UINavigator -#import "Three20UINavigator/TTBaseNavigator.h" - -// UICommon -#import "Three20UICommon/TTGlobalUICommon.h" - -// Core -#import "Three20Core/TTGlobalCoreRects.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -UIInterfaceOrientation TTInterfaceOrientation() { - UIInterfaceOrientation orient = [UIApplication sharedApplication].statusBarOrientation; - if (UIDeviceOrientationUnknown == orient) { - return [TTBaseNavigator globalNavigator].visibleViewController.interfaceOrientation; - - } else { - return orient; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGRect TTScreenBounds() { - CGRect bounds = [UIScreen mainScreen].bounds; - if (UIInterfaceOrientationIsLandscape(TTInterfaceOrientation())) { - CGFloat width = bounds.size.width; - bounds.size.width = bounds.size.height; - bounds.size.height = width; - } - return bounds; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGRect TTNavigationFrame() { - CGRect frame = [UIScreen mainScreen].applicationFrame; - return CGRectMake(0, 0, frame.size.width, frame.size.height - TTToolbarHeight()); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGRect TTToolbarNavigationFrame() { - CGRect frame = [UIScreen mainScreen].applicationFrame; - return CGRectMake(0, 0, frame.size.width, frame.size.height - TTToolbarHeight()*2); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGRect TTKeyboardNavigationFrame() { - return TTRectContract(TTNavigationFrame(), 0, TTKeyboardHeight()); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGFloat TTStatusHeight() { - UIInterfaceOrientation orientation = TTInterfaceOrientation(); - if (orientation == UIInterfaceOrientationLandscapeLeft) { - return [UIScreen mainScreen].applicationFrame.origin.x; - - } else if (orientation == UIInterfaceOrientationLandscapeRight) { - return -[UIScreen mainScreen].applicationFrame.origin.x; - - } else { - return [UIScreen mainScreen].applicationFrame.origin.y; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGFloat TTBarsHeight() { - CGRect frame = [UIApplication sharedApplication].statusBarFrame; - if (UIInterfaceOrientationIsPortrait(TTInterfaceOrientation())) { - return frame.size.height + TT_ROW_HEIGHT; - - } else { - return frame.size.width + TT_LANDSCAPE_TOOLBAR_HEIGHT; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGFloat TTToolbarHeight() { - return TTToolbarHeightForOrientation(TTInterfaceOrientation()); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -CGFloat TTKeyboardHeight() { - return TTKeyboardHeightForOrientation(TTInterfaceOrientation()); -} diff --git a/src/Three20UINavigator/Sources/TTNavigatorViewController.m b/src/Three20UINavigator/Sources/TTNavigatorViewController.m deleted file mode 100644 index 5cbc549e13..0000000000 --- a/src/Three20UINavigator/Sources/TTNavigatorViewController.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTNavigatorViewController.h" - -// UINavigator (private) -#import "Three20UINavigator/private/UIViewController+TTNavigatorGarbageCollection.h" - -// Core -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTNavigatorViewController - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) dealloc { - [self unsetNavigatorProperties]; - - [super dealloc]; -} - - -@end - diff --git a/src/Three20UINavigator/Sources/TTURLAction.m b/src/Three20UINavigator/Sources/TTURLAction.m deleted file mode 100644 index 4da3a55a10..0000000000 --- a/src/Three20UINavigator/Sources/TTURLAction.m +++ /dev/null @@ -1,151 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTURLAction.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLAction - -@synthesize urlPath = _urlPath; -@synthesize parentURLPath = _parentURLPath; -@synthesize query = _query; -@synthesize state = _state; -@synthesize animated = _animated; -@synthesize withDelay = _withDelay; -@synthesize sourceRect = _sourceRect; -@synthesize sourceView = _sourceView; -@synthesize sourceButton = _sourceButton; -@synthesize transition = _transition; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)action { - return [[[self alloc] init] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)actionWithURLPath:(NSString*)urlPath { - return [[[self alloc] initWithURLPath:urlPath] autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithURLPath:(NSString*)urlPath { - if (self = [super init]) { - self.urlPath = urlPath; - self.animated = NO; - self.withDelay = NO; - self.transition = UIViewAnimationTransitionNone; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithURLPath:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_urlPath); - TT_RELEASE_SAFELY(_parentURLPath); - TT_RELEASE_SAFELY(_query); - TT_RELEASE_SAFELY(_state); - TT_RELEASE_SAFELY(_sourceView); - TT_RELEASE_SAFELY(_sourceButton); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applyParentURLPath:(NSString*)parentURLPath { - self.parentURLPath = parentURLPath; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applyQuery:(NSDictionary*)query { - self.query = query; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applyState:(NSDictionary*)state { - self.state = state; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applyAnimated:(BOOL)animated { - self.animated = animated; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applyWithDelay:(BOOL)withDelay { - self.withDelay = withDelay; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applySourceRect:(CGRect)sourceRect { - self.sourceRect = sourceRect; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applySourceView:(UIView*)sourceView { - self.sourceView = sourceView; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applySourceButton:(UIBarButtonItem*)sourceButton { - self.sourceButton = sourceButton; - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLAction*)applyTransition:(UIViewAnimationTransition)transition { - self.transition = transition; - return self; -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTURLArguments.m b/src/Three20UINavigator/Sources/TTURLArguments.m deleted file mode 100644 index 0c744768ca..0000000000 --- a/src/Three20UINavigator/Sources/TTURLArguments.m +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/private/TTURLArguments.h" - -#import - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -TTURLArgumentType TTConvertArgumentType(char argType) { - if (argType == 'c' - || argType == 'i' - || argType == 's' - || argType == 'l' - || argType == 'C' - || argType == 'I' - || argType == 'S' - || argType == 'L') { - return TTURLArgumentTypeInteger; - - } else if (argType == 'q' || argType == 'Q') { - return TTURLArgumentTypeLongLong; - - } else if (argType == 'f') { - return TTURLArgumentTypeFloat; - - } else if (argType == 'd') { - return TTURLArgumentTypeDouble; - - } else if (argType == 'B') { - return TTURLArgumentTypeBool; - - } else { - return TTURLArgumentTypePointer; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -TTURLArgumentType TTURLArgumentTypeForProperty(Class cls, NSString* propertyName) { - objc_property_t prop = class_getProperty(cls, propertyName.UTF8String); - if (prop) { - const char* type = property_getAttributes(prop); - return TTConvertArgumentType(type[1]); - - } else { - return TTURLArgumentTypeNone; - } -} diff --git a/src/Three20UINavigator/Sources/TTURLGeneratorPattern.m b/src/Three20UINavigator/Sources/TTURLGeneratorPattern.m deleted file mode 100644 index 022bd77c06..0000000000 --- a/src/Three20UINavigator/Sources/TTURLGeneratorPattern.m +++ /dev/null @@ -1,125 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTURLGeneratorPattern.h" - -// UI (private) -#import "Three20UINavigator/private/TTURLWildcard.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLGeneratorPattern - -@synthesize targetClass = _targetClass; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTargetClass:(id)targetClass { - if (self = [super init]) { - _targetClass = targetClass; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithTargetClass:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLPattern - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (Class)classForInvocation { - return _targetClass; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)compile { - [self compileURL]; - - for (id pattern in _path) { - if ([pattern isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)pattern; - [wildcard deduceSelectorForClass:_targetClass]; - } - } - - for (id pattern in [_query objectEnumerator]) { - if ([pattern isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)pattern; - [wildcard deduceSelectorForClass:_targetClass]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)generateURLFromObject:(id)object { - NSMutableArray* paths = [NSMutableArray array]; - NSMutableArray* queries = nil; - [paths addObject:[NSString stringWithFormat:@"%@:/", _scheme]]; - - for (id patternText in _path) { - NSString* value = [patternText convertPropertyOfObject:object]; - [paths addObject:value]; - } - - for (NSString* name in [_query keyEnumerator]) { - id patternText = [_query objectForKey:name]; - NSString* value = [patternText convertPropertyOfObject:object]; - NSString* pair = [NSString stringWithFormat:@"%@=%@", name, value]; - if (!queries) { - queries = [NSMutableArray array]; - } - [queries addObject:pair]; - } - - NSString* path = [paths componentsJoinedByString:@"/"]; - if (queries) { - NSString* query = [queries componentsJoinedByString:@"&"]; - return [path stringByAppendingFormat:@"?%@", query]; - - } else { - return path; - } -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTURLLiteral.m b/src/Three20UINavigator/Sources/TTURLLiteral.m deleted file mode 100644 index 3e593169c0..0000000000 --- a/src/Three20UINavigator/Sources/TTURLLiteral.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/private/TTURLLiteral.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLLiteral - -@synthesize name = _name; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_name); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)match:(NSString*)text { - return [text isEqualToString:_name]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)convertPropertyOfObject:(id)object { - return _name; -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTURLMap.m b/src/Three20UINavigator/Sources/TTURLMap.m deleted file mode 100644 index ecc1972d0f..0000000000 --- a/src/Three20UINavigator/Sources/TTURLMap.m +++ /dev/null @@ -1,537 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTURLMap.h" - -// UINavigator -#import "Three20UINavigator/TTURLNavigatorPattern.h" -#import "Three20UINavigator/TTURLGeneratorPattern.h" - -// UINavigator (private) -#import "Three20UINavigator/private/UIViewController+TTNavigatorGarbageCollection.h" - -// Core -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTCorePreprocessorMacros.h" - -#import - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLMap - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_objectMappings); - TT_RELEASE_SAFELY(_objectPatterns); - TT_RELEASE_SAFELY(_fragmentPatterns); - TT_RELEASE_SAFELY(_stringPatterns); - TT_RELEASE_SAFELY(_schemes); - TT_RELEASE_SAFELY(_defaultObjectPattern); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * @return a unique key for a class with a given name. - * @private - */ -- (NSString*)keyForClass:(Class)cls withName:(NSString*)name { - const char* className = class_getName(cls); - return [NSString stringWithFormat:@"%s_%@", className, (nil != name) ? name : @""]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * What's a scheme? - * It's a specific URL that is registered with the URL map. - * Example: - * @"tt://some/path" - * - * This method registers them. - * - * @private - */ -- (void)registerScheme:(NSString*)scheme { - if (nil != scheme) { - if (nil == _schemes) { - _schemes = [[NSMutableDictionary alloc] init]; - } - [_schemes setObject:[NSNull null] forKey:scheme]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addObjectPattern: (TTURLNavigatorPattern*)pattern - forURL: (NSString*)URL { - pattern.URL = URL; - [pattern compile]; - [self registerScheme:pattern.scheme]; - - if (pattern.isUniversal) { - [_defaultObjectPattern release]; - _defaultObjectPattern = [pattern retain]; - - } else if (pattern.isFragment) { - if (!_fragmentPatterns) { - _fragmentPatterns = [[NSMutableArray alloc] init]; - } - [_fragmentPatterns addObject:pattern]; - - } else { - _invalidPatterns = YES; - - if (!_objectPatterns) { - _objectPatterns = [[NSMutableArray alloc] init]; - } - - [_objectPatterns addObject:pattern]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addStringPattern: (TTURLGeneratorPattern*)pattern - forURL: (NSString*)URL - withName: (NSString*)name { - pattern.URL = URL; - [pattern compile]; - [self registerScheme:pattern.scheme]; - - if (!_stringPatterns) { - _stringPatterns = [[NSMutableDictionary alloc] init]; - } - - NSString* key = [self keyForClass:pattern.targetClass withName:name]; - [_stringPatterns setObject:pattern forKey:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTURLNavigatorPattern*)matchObjectPattern:(NSURL*)URL { - if (_invalidPatterns) { - [_objectPatterns sortUsingSelector:@selector(compareSpecificity:)]; - _invalidPatterns = NO; - } - - for (TTURLNavigatorPattern* pattern in _objectPatterns) { - if ([pattern matchURL:URL]) { - return pattern; - } - } - - - return _defaultObjectPattern; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isWebURL:(NSURL*)URL { - return [URL.scheme caseInsensitiveCompare:@"http"] == NSOrderedSame - || [URL.scheme caseInsensitiveCompare:@"https"] == NSOrderedSame - || [URL.scheme caseInsensitiveCompare:@"ftp"] == NSOrderedSame - || [URL.scheme caseInsensitiveCompare:@"ftps"] == NSOrderedSame - || [URL.scheme caseInsensitiveCompare:@"data"] == NSOrderedSame - || [URL.scheme caseInsensitiveCompare:@"file"] == NSOrderedSame; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isExternalURL:(NSURL*)URL { - if ([URL.host isEqualToString:@"maps.google.com"] - || [URL.host isEqualToString:@"itunes.apple.com"] - || [URL.host isEqualToString:@"phobos.apple.com"]) { - return YES; - - } else { - return NO; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Mapping - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toObject:(id)target { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target]; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toObject:(id)target selector:(SEL)selector { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target]; - pattern.selector = selector; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toViewController:(id)target { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeCreate]; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toViewController:(id)target selector:(SEL)selector { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeCreate]; - pattern.selector = selector; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toViewController:(id)target transition:(NSInteger)transition { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeCreate]; - pattern.transition = transition; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL parent:(NSString*)parentURL - toViewController:(id)target selector:(SEL)selector transition:(NSInteger)transition { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeCreate]; - pattern.parentURL = parentURL; - pattern.selector = selector; - pattern.transition = transition; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toSharedViewController:(id)target { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeShare]; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toSharedViewController:(id)target selector:(SEL)selector { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeShare]; - pattern.selector = selector; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL parent:(NSString*)parentURL - toSharedViewController:(id)target { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeShare]; - pattern.parentURL = parentURL; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL parent:(NSString*)parentURL - toSharedViewController:(id)target selector:(SEL)selector { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeShare]; - pattern.parentURL = parentURL; - pattern.selector = selector; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toModalViewController:(id)target { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeModal]; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toModalViewController:(id)target selector:(SEL)selector { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeModal]; - pattern.selector = selector; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toModalViewController:(id)target transition:(NSInteger)transition { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeModal]; - pattern.transition = transition; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL parent:(NSString*)parentURL - toModalViewController:(id)target selector:(SEL)selector transition:(NSInteger)transition { - TTURLNavigatorPattern* pattern = [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModeModal]; - pattern.parentURL = parentURL; - pattern.selector = selector; - pattern.transition = transition; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toPopoverViewController:(id)target { - TTURLNavigatorPattern* pattern = - [[TTURLNavigatorPattern alloc] initWithTarget: target - mode: TTNavigationModePopover]; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(NSString*)URL toPopoverViewController:(id)target selector:(SEL)selector { - TTURLNavigatorPattern* pattern = - [[TTURLNavigatorPattern alloc] initWithTarget:target - mode:TTNavigationModePopover]; - pattern.selector = selector; - [self addObjectPattern:pattern forURL:URL]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(Class)cls toURL:(NSString*)URL { - TTURLGeneratorPattern* pattern = [[TTURLGeneratorPattern alloc] initWithTargetClass:cls]; - [self addStringPattern:pattern forURL:URL withName:nil]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)from:(Class)cls name:(NSString*)name toURL:(NSString*)URL { - TTURLGeneratorPattern* pattern = [[TTURLGeneratorPattern alloc] initWithTargetClass:cls]; - [self addStringPattern:pattern forURL:URL withName:name]; - [pattern release]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObject:(id)object forURL:(NSString*)URL { - if (nil == _objectMappings) { - _objectMappings = TTCreateNonRetainingDictionary(); - } - // XXXjoe Normalize the URL first - [_objectMappings setObject:object forKey:URL]; - - if ([object isKindOfClass:[UIViewController class]]) { - [UIViewController ttAddNavigatorController:object]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeURL:(NSString*)URL { - [_objectMappings removeObjectForKey:URL]; - - for (TTURLNavigatorPattern* pattern in _objectPatterns) { - if ([URL isEqualToString:pattern.URL]) { - [_objectPatterns removeObject:pattern]; - break; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeObject:(id)object { - // XXXjoe IMPLEMENT ME -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeObjectForURL:(NSString*)URL { - [_objectMappings removeObjectForKey:URL]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)removeAllObjects { - TT_RELEASE_SAFELY(_objectMappings); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectForURL:(NSString*)URL { - return [self objectForURL:URL query:nil pattern:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectForURL:(NSString*)URL query:(NSDictionary*)query { - return [self objectForURL:URL query:query pattern:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectForURL: (NSString*)URL - query: (NSDictionary*)query - pattern: (TTURLNavigatorPattern**)outPattern { - id object = nil; - if (_objectMappings) { - object = [_objectMappings objectForKey:URL]; - if (object && !outPattern) { - return object; - } - } - - NSURL* theURL = [NSURL URLWithString:URL]; - TTURLNavigatorPattern* pattern = [self matchObjectPattern:theURL]; - if (pattern) { - if (!object) { - object = [pattern createObjectFromURL:theURL query:query]; - } - if (pattern.navigationMode == TTNavigationModeShare && object) { - [self setObject:object forURL:URL]; - } - if (outPattern) { - *outPattern = pattern; - } - return object; - - } else { - return nil; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)dispatchURL:(NSString*)URL toTarget:(id)target query:(NSDictionary*)query { - NSURL* theURL = [NSURL URLWithString:URL]; - for (TTURLNavigatorPattern* pattern in _fragmentPatterns) { - if ([pattern matchURL:theURL]) { - return [pattern invoke:target withURL:theURL query:query]; - } - } - - // If there is no match, check if the fragment points to a method on the target - if (theURL.fragment) { - SEL selector = NSSelectorFromString(theURL.fragment); - if (selector && [target respondsToSelector:selector]) { - [target performSelector:selector]; - } - } - - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTNavigationMode)navigationModeForURL:(NSString*)URL { - NSURL* theURL = [NSURL URLWithString:URL]; - if (![self isAppURL:theURL]) { - TTURLNavigatorPattern* pattern = [self matchObjectPattern:theURL]; - if (pattern) { - return pattern.navigationMode; - } - } - return TTNavigationModeExternal; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSInteger)transitionForURL:(NSString*)URL { - TTURLNavigatorPattern* pattern = [self matchObjectPattern:[NSURL URLWithString:URL]]; - return pattern.transition; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isSchemeSupported:(NSString*)scheme { - return nil != scheme && !![_schemes objectForKey:scheme]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isAppURL:(NSURL*)URL { - return [self isExternalURL:URL] - || ([[UIApplication sharedApplication] canOpenURL:URL] - && ![self isSchemeSupported:URL.scheme] - && ![self isWebURL:URL]); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)URLForObject:(id)object { - return [self URLForObject:object withName:nil]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)URLForObject:(id)object withName:(NSString*)name { - Class cls = [object class] == object ? object : [object class]; - while (cls) { - NSString* key = [self keyForClass:cls withName:name]; - TTURLGeneratorPattern* pattern = [_stringPatterns objectForKey:key]; - if (pattern) { - return [pattern generateURLFromObject:object]; - - } else { - cls = class_getSuperclass(cls); - } - } - return nil; -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTURLNavigatorPattern.m b/src/Three20UINavigator/Sources/TTURLNavigatorPattern.m deleted file mode 100644 index 4307a1f798..0000000000 --- a/src/Three20UINavigator/Sources/TTURLNavigatorPattern.m +++ /dev/null @@ -1,495 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTURLNavigatorPattern.h" - -// UINavigator (private) -#import "Three20UINavigator/private/TTURLPatternInternal.h" -#import "Three20UINavigator/private/TTURLWildcard.h" -#import "Three20UINavigator/private/TTURLArguments.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/NSStringAdditions.h" - -#import - -static NSString* kUniversalURLPattern = @"*"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLNavigatorPattern - -@synthesize targetClass = _targetClass; -@synthesize targetObject = _targetObject; -@synthesize navigationMode = _navigationMode; -@synthesize parentURL = _parentURL; -@synthesize transition = _transition; -@synthesize argumentCount = _argumentCount; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTarget: (id)target - mode: (TTNavigationMode)navigationMode { - if (self = [super init]) { - _navigationMode = navigationMode; - - if ([target class] == target && navigationMode) { - _targetClass = target; - - } else { - _targetObject = target; - } - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTarget:(id)target { - if (self = [self initWithTarget:target mode:TTNavigationModeNone]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [self initWithTarget:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_parentURL); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString *)description { - if (nil != _targetClass) { - return [NSString stringWithFormat:@"%@ => %@", _URL, _targetClass]; - - } else { - return [NSString stringWithFormat:@"%@ => %@", _URL, _targetObject]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)instantiatesClass { - return nil != _targetClass && TTNavigationModeNone != _navigationMode; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)callsInstanceMethod { - return (nil != _targetObject && [_targetObject class] != _targetObject) - || nil != _targetClass; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSComparisonResult)compareSpecificity:(TTURLPattern*)pattern2 { - if (_specificity > pattern2.specificity) { - return NSOrderedAscending; - - } else if (_specificity < pattern2.specificity) { - return NSOrderedDescending; - - } else { - return NSOrderedSame; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)deduceSelector { - NSMutableArray* parts = [NSMutableArray array]; - - for (id pattern in _path) { - if ([pattern isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)pattern; - if (wildcard.name) { - [parts addObject:wildcard.name]; - } - } - } - - for (id pattern in [_query objectEnumerator]) { - if ([pattern isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)pattern; - if (wildcard.name) { - [parts addObject:wildcard.name]; - } - } - } - - if ([_fragment isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)_fragment; - if (wildcard.name) { - [parts addObject:wildcard.name]; - } - } - - if (parts.count) { - [self setSelectorWithNames:parts]; - if (!_selector) { - [parts addObject:@"query"]; - [self setSelectorWithNames:parts]; - } - - } else { - [self setSelectorIfPossible:@selector(initWithNavigatorURL:query:)]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)analyzeArgument: (id)pattern - method: (Method)method - argNames: (NSArray*)argNames { - if ([pattern isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)pattern; - wildcard.argIndex = [argNames indexOfObject:wildcard.name]; - if (wildcard.argIndex == NSNotFound) { - TTDINFO(@"Argument %@ not found in @selector(%s)", wildcard.name, sel_getName(_selector)); - - } else { - char argType[256]; - method_getArgumentType(method, wildcard.argIndex+2, argType, 256); - wildcard.argType = TTConvertArgumentType(argType[0]); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)analyzeMethod { - Class cls = [self classForInvocation]; - Method method = [self callsInstanceMethod] - ? class_getInstanceMethod(cls, _selector) - : class_getClassMethod(cls, _selector); - if (method) { - _argumentCount = method_getNumberOfArguments(method)-2; - - // Look up the index and type of each argument in the method - const char* selName = sel_getName(_selector); - NSString* selectorName = [[NSString alloc] initWithBytesNoCopy:(char*)selName - length:strlen(selName) - encoding:NSASCIIStringEncoding freeWhenDone:NO]; - - NSArray* argNames = [selectorName componentsSeparatedByString:@":"]; - - for (id pattern in _path) { - [self analyzeArgument:pattern method:method argNames:argNames]; - } - - for (id pattern in [_query objectEnumerator]) { - [self analyzeArgument:pattern method:method argNames:argNames]; - } - - if (_fragment) { - [self analyzeArgument:_fragment method:method argNames:argNames]; - } - - [selectorName release]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)analyzeProperties { - Class cls = [self classForInvocation]; - - for (id pattern in _path) { - if ([pattern isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)pattern; - [wildcard deduceSelectorForClass:cls]; - } - } - - for (id pattern in [_query objectEnumerator]) { - if ([pattern isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)pattern; - [wildcard deduceSelectorForClass:cls]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)setArgument: (NSString*)text - pattern: (id)patternText - forInvocation: (NSInvocation*)invocation { - if ([patternText isKindOfClass:[TTURLWildcard class]]) { - TTURLWildcard* wildcard = (TTURLWildcard*)patternText; - NSInteger argIndex = wildcard.argIndex; - if (argIndex != NSNotFound && argIndex < _argumentCount) { - switch (wildcard.argType) { - case TTURLArgumentTypeNone: { - break; - } - case TTURLArgumentTypeInteger: { - int val = [text intValue]; - [invocation setArgument:&val atIndex:argIndex+2]; - break; - } - case TTURLArgumentTypeLongLong: { - long long val = [text longLongValue]; - [invocation setArgument:&val atIndex:argIndex+2]; - break; - } - case TTURLArgumentTypeFloat: { - float val = [text floatValue]; - [invocation setArgument:&val atIndex:argIndex+2]; - break; - } - case TTURLArgumentTypeDouble: { - double val = [text doubleValue]; - [invocation setArgument:&val atIndex:argIndex+2]; - break; - } - case TTURLArgumentTypeBool: { - BOOL val = [text boolValue]; - [invocation setArgument:&val atIndex:argIndex+2]; - break; - } - default: { - [invocation setArgument:&text atIndex:argIndex+2]; - break; - } - } - return YES; - } - } - return NO; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setArgumentsFromURL: (NSURL*)URL - forInvocation: (NSInvocation*)invocation - query: (NSDictionary*)query { - NSInteger remainingArgs = _argumentCount; - NSMutableDictionary* unmatchedArgs = query ? [[query mutableCopy] autorelease] : nil; - - NSArray* pathComponents = URL.path.pathComponents; - for (NSInteger i = 0; i < _path.count; ++i) { - id patternText = [_path objectAtIndex:i]; - NSString* text = i == 0 ? URL.host : [pathComponents objectAtIndex:i]; - if ([self setArgument:text pattern:patternText forInvocation:invocation]) { - --remainingArgs; - } - } - - NSDictionary* URLQuery = [URL.query queryContentsUsingEncoding:NSUTF8StringEncoding]; - if (URLQuery.count) { - for (NSString* name in [URLQuery keyEnumerator]) { - id patternText = [_query objectForKey:name]; - NSString* text = [[URLQuery objectForKey:name] objectAtIndex:0]; - if (patternText) { - if ([self setArgument:text pattern:patternText forInvocation:invocation]) { - --remainingArgs; - } - - } else { - if (!unmatchedArgs) { - unmatchedArgs = [NSMutableDictionary dictionary]; - } - [unmatchedArgs setObject:text forKey:name]; - } - } - } - - if (remainingArgs && unmatchedArgs.count) { - // If there are unmatched arguments, and the method signature has extra arguments, - // then pass the dictionary of unmatched arguments as the last argument - [invocation setArgument:&unmatchedArgs atIndex:_argumentCount+1]; - } - - if (URL.fragment && _fragment) { - [self setArgument:URL.fragment pattern:_fragment forInvocation:invocation]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLPattern - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (Class)classForInvocation { - return _targetClass ? _targetClass : [_targetObject class]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isUniversal { - return [_URL isEqualToString:kUniversalURLPattern]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)isFragment { - return [_URL rangeOfString:@"#" options:NSBackwardsSearch].location != NSNotFound; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)compile { - if ([_URL isEqualToString:kUniversalURLPattern]) { - if (!_selector) { - [self deduceSelector]; - } - - } else { - [self compileURL]; - - // XXXjoe Don't do this if the pattern is a URL generator - if (!_selector) { - [self deduceSelector]; - } - if (_selector) { - [self analyzeMethod]; - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)matchURL:(NSURL*)URL { - if (!URL.scheme || !URL.host || ![_scheme isEqualToString:URL.scheme]) { - return NO; - } - - NSArray* pathComponents = URL.path.pathComponents; - NSInteger componentCount = URL.path.length ? pathComponents.count : (URL.host ? 1 : 0); - if (componentCount != _path.count) { - return NO; - } - - if (_path.count && URL.host) { - idhostPattern = [_path objectAtIndex:0]; - if (![hostPattern match:URL.host]) { - return NO; - } - } - - for (NSInteger i = 1; i < _path.count; ++i) { - idpathPattern = [_path objectAtIndex:i]; - NSString* pathText = [pathComponents objectAtIndex:i]; - if (![pathPattern match:pathText]) { - return NO; - } - } - - if ((URL.fragment && !_fragment) || (_fragment && !URL.fragment)) { - return NO; - - } else if (URL.fragment && _fragment && ![_fragment match:URL.fragment]) { - return NO; - } - - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)invoke: (id)target - withURL: (NSURL*)URL - query: (NSDictionary*)query { - id returnValue = nil; - - NSMethodSignature *sig = [target methodSignatureForSelector:self.selector]; - if (sig) { - NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:sig]; - [invocation setTarget:target]; - [invocation setSelector:self.selector]; - if (self.isUniversal) { - [invocation setArgument:&URL atIndex:2]; - if (query) { - [invocation setArgument:&query atIndex:3]; - } - - } else { - [self setArgumentsFromURL:URL forInvocation:invocation query:query]; - } - [invocation invoke]; - - if (sig.methodReturnLength) { - [invocation getReturnValue:&returnValue]; - } - } - - return returnValue; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)createObjectFromURL: (NSURL*)URL - query: (NSDictionary*)query { - id returnValue = nil; - - if (self.instantiatesClass) { - //suppress static analyzer warning for this part - // - invoke:withURL:query actually calls an - init method - // which returns either a new object with retain count of +1 - // or returnValue (which already has +1 retain count) -#ifndef __clang_analyzer__ - returnValue = [_targetClass alloc]; - if (_selector) { - returnValue = [self invoke:returnValue withURL:URL query:query]; - - } else { - returnValue = [returnValue init]; - } - [returnValue autorelease]; -#endif - - } else { - id target = [_targetObject retain]; - if (_selector) { - returnValue = [self invoke:target withURL:URL query:query]; - - } else { - TTDWARNING(@"No object created from URL:'%@' URL"); - } - [target release]; - } - return returnValue; -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTURLPattern.m b/src/Three20UINavigator/Sources/TTURLPattern.m deleted file mode 100644 index 92612509db..0000000000 --- a/src/Three20UINavigator/Sources/TTURLPattern.m +++ /dev/null @@ -1,166 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/TTURLPattern.h" - -// UINavigator (Private) -#import "Three20UINavigator/private/TTURLWildcard.h" -#import "Three20UINavigator/private/TTURLLiteral.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/NSStringAdditions.h" - -#import - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLPattern - -@synthesize URL = _URL; -@synthesize scheme = _scheme; -@synthesize specificity = _specificity; -@synthesize selector = _selector; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - _path = [[NSMutableArray alloc] init]; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_URL); - TT_RELEASE_SAFELY(_scheme); - TT_RELEASE_SAFELY(_path); - TT_RELEASE_SAFELY(_query); - TT_RELEASE_SAFELY(_fragment); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Private - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)parseText:(NSString*)text { - NSInteger len = text.length; - if (len >= 2 - && [text characterAtIndex:0] == '(' - && [text characterAtIndex:len - 1] == ')') { - NSInteger endRange = len > 3 && [text characterAtIndex:len - 2] == ':' - ? len - 3 - : len - 2; - - NSString* name = len > 2 ? [text substringWithRange:NSMakeRange(1, endRange)] : nil; - - TTURLWildcard* wildcard = [[[TTURLWildcard alloc] init] autorelease]; - wildcard.name = name; - - ++_specificity; - - return wildcard; - - } else { - TTURLLiteral* literal = [[[TTURLLiteral alloc] init] autorelease]; - literal.name = text; - _specificity += 2; - return literal; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parsePathComponent:(NSString*)value { - id component = [self parseText:value]; - [_path addObject:component]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parseParameter:(NSString*)name value:(NSString*)value { - if (nil == _query) { - _query = [[NSMutableDictionary alloc] init]; - } - - id component = [self parseText:value]; - [_query setObject:component forKey:name]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (Class)classForInvocation { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSelectorIfPossible:(SEL)selector { - Class cls = [self classForInvocation]; - if (nil == cls - || class_respondsToSelector(cls, selector) - || class_getClassMethod(cls, selector)) { - _selector = selector; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)compileURL { - NSURL* URL = [NSURL URLWithString:_URL]; - _scheme = [URL.scheme copy]; - if (URL.host) { - [self parsePathComponent:URL.host]; - - if (URL.path) { - for (NSString* name in URL.path.pathComponents) { - if (![name isEqualToString:@"/"]) { - [self parsePathComponent:name]; - } - } - } - } - - if (URL.query) { - NSDictionary* query = [URL.query queryContentsUsingEncoding:NSUTF8StringEncoding]; - for (NSString* name in [query keyEnumerator]) { - NSString* value = [[query objectForKey:name] objectAtIndex:0]; - [self parseParameter:name value:value]; - } - } - - if (URL.fragment) { - _fragment = [[self parseText:URL.fragment] retain]; - } -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTURLPatternInternal.m b/src/Three20UINavigator/Sources/TTURLPatternInternal.m deleted file mode 100644 index d83bc0787f..0000000000 --- a/src/Three20UINavigator/Sources/TTURLPatternInternal.m +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/private/TTURLPatternInternal.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -TT_FIX_CATEGORY_BUG(TTURLPatternInternal) - -@implementation TTURLPattern (TTInternal) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setSelectorWithNames:(NSArray*)names { - NSString* selectorName = [[names componentsJoinedByString:@":"] stringByAppendingString:@":"]; - SEL selector = NSSelectorFromString(selectorName); - [self setSelectorIfPossible:selector]; -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTURLSelector.m b/src/Three20UINavigator/Sources/TTURLSelector.m deleted file mode 100644 index 6981d2b5a0..0000000000 --- a/src/Three20UINavigator/Sources/TTURLSelector.m +++ /dev/null @@ -1,112 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/private/TTURLSelector.h" - -// UINavigator (private) -#import "Three20UINavigator/private/TTURLArguments.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLSelector - -@synthesize name = _name; -@synthesize next = _next; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithName:(NSString*)name { - if (self = [super init]) { - _name = [name copy]; - _selector = NSSelectorFromString(_name); - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_name); - TT_RELEASE_SAFELY(_next); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)perform:(id)object returnType:(TTURLArgumentType)returnType { - if (_next) { - id value = [object performSelector:_selector]; - return [_next perform:value returnType:returnType]; - - } else { - NSMethodSignature *sig = [object methodSignatureForSelector:_selector]; - NSInvocation* invocation = [NSInvocation invocationWithMethodSignature:sig]; - [invocation setTarget:object]; - [invocation setSelector:_selector]; - [invocation invoke]; - - if (!returnType) { - returnType = TTURLArgumentTypeForProperty([object class], _name); - } - - switch (returnType) { - case TTURLArgumentTypeNone: { - return @""; - } - case TTURLArgumentTypeInteger: { - int val; - [invocation getReturnValue:&val]; - return [NSString stringWithFormat:@"%d", val]; - } - case TTURLArgumentTypeLongLong: { - long long val; - [invocation getReturnValue:&val]; - return [NSString stringWithFormat:@"%lld", val]; - } - case TTURLArgumentTypeFloat: { - float val; - [invocation getReturnValue:&val]; - return [NSString stringWithFormat:@"%f", val]; - } - case TTURLArgumentTypeDouble: { - double val; - [invocation getReturnValue:&val]; - return [NSString stringWithFormat:@"%f", val]; - } - case TTURLArgumentTypeBool: { - BOOL val; - [invocation getReturnValue:&val]; - return [NSString stringWithFormat:@"%d", val]; - } - default: { - id val; - [invocation getReturnValue:&val]; - return [NSString stringWithFormat:@"%@", val]; - } - } - return @""; - } -} - - -@end diff --git a/src/Three20UINavigator/Sources/TTURLWildcard.m b/src/Three20UINavigator/Sources/TTURLWildcard.m deleted file mode 100644 index 96a4341eae..0000000000 --- a/src/Three20UINavigator/Sources/TTURLWildcard.m +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/private/TTURLWildcard.h" - -// UINavigator (private) -#import "Three20UINavigator/private/TTURLArguments.h" -#import "Three20UINavigator/private/TTURLSelector.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLWildcard - -@synthesize name = _name; -@synthesize argIndex = _argIndex; -@synthesize argType = _argType; -@synthesize selector = _selector; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - _argIndex = NSNotFound; - _argType = TTURLArgumentTypeNone; - } - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_name); - TT_RELEASE_SAFELY(_selector); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)match:(NSString*)text { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)convertPropertyOfObject:(id)object { - if (_selector) { - return [_selector perform:object returnType:_argType]; - - } else { - return @""; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)deduceSelectorForClass:(Class)cls { - NSArray* names = [_name componentsSeparatedByString:@"."]; - if (names.count > 1) { - TTURLSelector* selector = nil; - for (NSString* name in names) { - TTURLSelector* newSelector = [[[TTURLSelector alloc] initWithName:name] autorelease]; - if (selector) { - selector.next = newSelector; - - } else { - self.selector = newSelector; - } - selector = newSelector; - } - - } else { - self.argType = TTURLArgumentTypeForProperty(cls, _name); - self.selector = [[[TTURLSelector alloc] initWithName:_name] autorelease]; - } -} - - -@end diff --git a/src/Three20UINavigator/Sources/UIViewController+TTNavigator.m b/src/Three20UINavigator/Sources/UIViewController+TTNavigator.m deleted file mode 100644 index 534bd34f79..0000000000 --- a/src/Three20UINavigator/Sources/UIViewController+TTNavigator.m +++ /dev/null @@ -1,197 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20UINavigator/UIViewController+TTNavigator.h" - -// UINavigator -#import "Three20UINavigator/TTBaseNavigator.h" -#import "Three20UINavigator/TTURLMap.h" -#import "Three20UINavigator/TTNavigatorViewController.h" - -// UICommon -#import "Three20UICommon/UIViewControllerAdditions.h" - -// UICommon (private) -#import "Three20UICommon/private/UIViewControllerGarbageCollection.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" - -static NSMutableDictionary* gNavigatorURLs = nil; - -static NSMutableSet* gsNavigatorControllers = nil; -static NSTimer* gsGarbageCollectorTimer = nil; - -static const NSTimeInterval kGarbageCollectionInterval = 20; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Additions. - */ -TT_FIX_CATEGORY_BUG(UIViewController_TTNavigator) - -@implementation UIViewController (TTNavigator) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNavigatorURL:(NSURL*)URL query:(NSDictionary*)query { - if (self = [self initWithNibName:nil bundle:nil]) { - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Garbage Collection - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (NSMutableSet*)ttNavigatorControllers { - if (nil == gsNavigatorControllers) { - gsNavigatorControllers = [[NSMutableSet alloc] init]; - } - return gsNavigatorControllers; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)doNavigatorGarbageCollection { - NSMutableSet* controllers = [UIViewController ttNavigatorControllers]; - - [self doGarbageCollectionWithSelector: @selector(unsetNavigatorProperties) - controllerSet: controllers]; - - if ([controllers count] == 0) { - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Killing the navigator garbage collector."); - [gsGarbageCollectorTimer invalidate]; - TT_RELEASE_SAFELY(gsGarbageCollectorTimer); - TT_RELEASE_SAFELY(gsNavigatorControllers); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)ttAddNavigatorController:(UIViewController*)controller { - - // TTNavigatorViewController calls unsetNavigatorProperties in its dealloc. - // UICommon has its own garbage collector that will unset another set of properties. - if (![controller isKindOfClass:[TTNavigatorViewController class]]) { - - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Adding a navigator controller."); - - [[UIViewController ttNavigatorControllers] addObject:controller]; - - if (nil == gsGarbageCollectorTimer) { - gsGarbageCollectorTimer = - [[NSTimer scheduledTimerWithTimeInterval: kGarbageCollectionInterval - target: [UIViewController class] - selector: @selector(doNavigatorGarbageCollection) - userInfo: nil - repeats: YES] retain]; - } -#if TTDFLAG_CONTROLLERGARBAGECOLLECTION - - } else { - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Not adding a navigator controller."); -#endif - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)navigatorURL { - return self.originalNavigatorURL; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)originalNavigatorURL { - NSString* key = [NSString stringWithFormat:@"%d", self.hash]; - return [gNavigatorURLs objectForKey:key]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setOriginalNavigatorURL:(NSString*)URL { - NSString* key = [NSString stringWithFormat:@"%d", self.hash]; - if (nil != URL) { - if (nil == gNavigatorURLs) { - gNavigatorURLs = [[NSMutableDictionary alloc] init]; - } - [gNavigatorURLs setObject:URL forKey:key]; - - [UIViewController ttAddNavigatorController:self]; - - } else { - [gNavigatorURLs removeObjectForKey:key]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)frozenState { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setFrozenState:(NSDictionary*)frozenState { -} - - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UIViewController (TTNavigatorGarbageCollection) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)unsetNavigatorProperties { - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Unsetting this controller's properties: %X", (unsigned int)self); - - NSString* urlPath = self.originalNavigatorURL; - if (nil != urlPath) { - TTDCONDITIONLOG(TTDFLAG_CONTROLLERGARBAGECOLLECTION, - @"Removing this URL path: %@", urlPath); - - [[TTBaseNavigator globalNavigator].URLMap removeObjectForURL:urlPath]; - self.originalNavigatorURL = nil; - } -} - - -@end diff --git a/src/Three20UINavigator/Three20UINavigator.xcodeproj/project.pbxproj b/src/Three20UINavigator/Three20UINavigator.xcodeproj/project.pbxproj deleted file mode 100755 index fcef772150..0000000000 --- a/src/Three20UINavigator/Three20UINavigator.xcodeproj/project.pbxproj +++ /dev/null @@ -1,861 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 666E16DD12944999001C1D97 /* TTNavigatorRootContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 666E16DC12944999001C1D97 /* TTNavigatorRootContainer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C35ED118B75800079637E /* TTNavigatorDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C35EA118B75800079637E /* TTNavigatorDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3611118B77F70079637E /* TTURLAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3610118B77F70079637E /* TTURLAction.m */; }; - 6E3C3614118B77FE0079637E /* TTURLAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3613118B77FE0079637E /* TTURLAction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3623118B78310079637E /* TTURLMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3622118B78310079637E /* TTURLMap.m */; }; - 6E3C3626118B78420079637E /* TTURLMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3625118B78420079637E /* TTURLMap.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3632118B78950079637E /* TTURLGeneratorPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C362D118B78950079637E /* TTURLGeneratorPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3633118B78950079637E /* TTURLNavigatorPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C362E118B78950079637E /* TTURLNavigatorPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3634118B78950079637E /* TTURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C362F118B78950079637E /* TTURLPattern.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3635118B78950079637E /* TTURLPatternInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3630118B78950079637E /* TTURLPatternInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E3C3636118B78950079637E /* TTURLPatternText.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3631118B78950079637E /* TTURLPatternText.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E3C3641118B78F20079637E /* TTURLArguments.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C363F118B78F20079637E /* TTURLArguments.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E3C3642118B78F20079637E /* TTURLArgumentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3640118B78F20079637E /* TTURLArgumentType.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E3C3649118B79140079637E /* TTURLLiteral.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3646118B79140079637E /* TTURLLiteral.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E3C364A118B79140079637E /* TTURLSelector.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3647118B79140079637E /* TTURLSelector.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E3C364B118B79140079637E /* TTURLWildcard.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3648118B79140079637E /* TTURLWildcard.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E3C3651118B79740079637E /* TTURLGeneratorPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C364E118B79740079637E /* TTURLGeneratorPattern.m */; }; - 6E3C3652118B79740079637E /* TTURLNavigatorPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C364F118B79740079637E /* TTURLNavigatorPattern.m */; }; - 6E3C3653118B79740079637E /* TTURLPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3650118B79740079637E /* TTURLPattern.m */; }; - 6E3C3664118B798F0079637E /* TTURLLiteral.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3660118B798F0079637E /* TTURLLiteral.m */; }; - 6E3C3665118B798F0079637E /* TTURLPatternInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3661118B798F0079637E /* TTURLPatternInternal.m */; }; - 6E3C3666118B798F0079637E /* TTURLSelector.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3662118B798F0079637E /* TTURLSelector.m */; }; - 6E3C3667118B798F0079637E /* TTURLWildcard.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3663118B798F0079637E /* TTURLWildcard.m */; }; - 6E3C3672118B79B90079637E /* TTURLArguments.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3671118B79B90079637E /* TTURLArguments.m */; }; - 6E3C36C8118B7E0C0079637E /* TTURLObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C36C7118B7E0C0079637E /* TTURLObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3754118C8E180079637E /* TTBaseNavigator.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3753118C8E180079637E /* TTBaseNavigator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3756118C8E210079637E /* TTBaseNavigator.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3755118C8E210079637E /* TTBaseNavigator.m */; }; - 6E3C3759118C8E490079637E /* TTNavigatorPersistenceMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3758118C8E490079637E /* TTNavigatorPersistenceMode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6081C011B0C08600C93CD4 /* TTBaseNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6081BF11B0C08600C93CD4 /* TTBaseNavigationController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6081C211B0C08D00C93CD4 /* TTBaseNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E6081C111B0C08D00C93CD4 /* TTBaseNavigationController.m */; }; - 6E6454741184D2CD00F08CB1 /* Three20UINavigator.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6454731184D2CD00F08CB1 /* Three20UINavigator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E7B106811923A76001359FE /* TTNavigatorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7B106611923A76001359FE /* TTNavigatorViewController.m */; }; - 6E7B106E11923A92001359FE /* TTNavigatorViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E7B106D11923A92001359FE /* TTNavigatorViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E7B107011923AC1001359FE /* UIViewController+TTNavigatorGarbageCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E7B106F11923AC1001359FE /* UIViewController+TTNavigatorGarbageCollection.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E7F945E118E1B0E00443B46 /* UIViewControllerAdditionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F945D118E1B0E00443B46 /* UIViewControllerAdditionTests.m */; }; - 6E7F94B4118E210300443B46 /* TTURLActionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E7F94B3118E210300443B46 /* TTURLActionTests.m */; }; - 6E7F94C4118E22E400443B46 /* TTNavigationMode.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E7F94C1118E22B200443B46 /* TTNavigationMode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E86A98D118CF55D00662DA5 /* TTBaseNavigatorInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E86A98C118CF55D00662DA5 /* TTBaseNavigatorInternal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6EDAE962118C99200008133C /* UIViewController+TTNavigator.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EDAE961118C99200008133C /* UIViewController+TTNavigator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EDAE964118C99280008133C /* UIViewController+TTNavigator.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EDAE963118C99280008133C /* UIViewController+TTNavigator.m */; }; - 6EDAE96C118C99C10008133C /* Three20UINavigator+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EDAE96B118C99C10008133C /* Three20UINavigator+Additions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EDAE9CB118CA1C80008133C /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3C37BA118C96A60079637E /* libThree20UICommon.a */; }; - 6EDAE9EA118CA3610008133C /* TTGlobalNavigatorMetrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EDAE9E9118CA3610008133C /* TTGlobalNavigatorMetrics.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EDAE9EC118CA3680008133C /* TTGlobalNavigatorMetrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EDAE9EB118CA3680008133C /* TTGlobalNavigatorMetrics.m */; }; - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EE7366C11849C5800A35176 /* libThree20Core.a */; }; - 6EE739D01184BB0400A35176 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libThree20UINavigator.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E3C37B9118C96A60079637E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3C37B4118C96A60079637E /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3C37BB118C96A60079637E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3C37B4118C96A60079637E /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3C37BE118C96C20079637E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3C37B4118C96A60079637E /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3C37C0118C96CB0079637E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3C37B4118C96A60079637E /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE7367011849C6300A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EE736C611849FA000A35176 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 666E16DC12944999001C1D97 /* TTNavigatorRootContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigatorRootContainer.h; path = Headers/TTNavigatorRootContainer.h; sourceTree = ""; }; - 6E3C35EA118B75800079637E /* TTNavigatorDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigatorDelegate.h; path = Headers/TTNavigatorDelegate.h; sourceTree = ""; }; - 6E3C3610118B77F70079637E /* TTURLAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLAction.m; path = Sources/TTURLAction.m; sourceTree = ""; }; - 6E3C3613118B77FE0079637E /* TTURLAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLAction.h; path = Headers/TTURLAction.h; sourceTree = ""; }; - 6E3C3622118B78310079637E /* TTURLMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLMap.m; path = Sources/TTURLMap.m; sourceTree = ""; }; - 6E3C3625118B78420079637E /* TTURLMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLMap.h; path = Headers/TTURLMap.h; sourceTree = ""; }; - 6E3C362D118B78950079637E /* TTURLGeneratorPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLGeneratorPattern.h; path = Headers/TTURLGeneratorPattern.h; sourceTree = ""; }; - 6E3C362E118B78950079637E /* TTURLNavigatorPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLNavigatorPattern.h; path = Headers/TTURLNavigatorPattern.h; sourceTree = ""; }; - 6E3C362F118B78950079637E /* TTURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLPattern.h; path = Headers/TTURLPattern.h; sourceTree = ""; }; - 6E3C3630118B78950079637E /* TTURLPatternInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLPatternInternal.h; path = Headers/TTURLPatternInternal.h; sourceTree = ""; }; - 6E3C3631118B78950079637E /* TTURLPatternText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLPatternText.h; path = Headers/TTURLPatternText.h; sourceTree = ""; }; - 6E3C363F118B78F20079637E /* TTURLArguments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLArguments.h; path = Headers/TTURLArguments.h; sourceTree = ""; }; - 6E3C3640118B78F20079637E /* TTURLArgumentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLArgumentType.h; path = Headers/TTURLArgumentType.h; sourceTree = ""; }; - 6E3C3646118B79140079637E /* TTURLLiteral.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLLiteral.h; path = Headers/TTURLLiteral.h; sourceTree = ""; }; - 6E3C3647118B79140079637E /* TTURLSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLSelector.h; path = Headers/TTURLSelector.h; sourceTree = ""; }; - 6E3C3648118B79140079637E /* TTURLWildcard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLWildcard.h; path = Headers/TTURLWildcard.h; sourceTree = ""; }; - 6E3C364E118B79740079637E /* TTURLGeneratorPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLGeneratorPattern.m; path = Sources/TTURLGeneratorPattern.m; sourceTree = ""; }; - 6E3C364F118B79740079637E /* TTURLNavigatorPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLNavigatorPattern.m; path = Sources/TTURLNavigatorPattern.m; sourceTree = ""; }; - 6E3C3650118B79740079637E /* TTURLPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLPattern.m; path = Sources/TTURLPattern.m; sourceTree = ""; }; - 6E3C3660118B798F0079637E /* TTURLLiteral.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLLiteral.m; path = Sources/TTURLLiteral.m; sourceTree = ""; }; - 6E3C3661118B798F0079637E /* TTURLPatternInternal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLPatternInternal.m; path = Sources/TTURLPatternInternal.m; sourceTree = ""; }; - 6E3C3662118B798F0079637E /* TTURLSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLSelector.m; path = Sources/TTURLSelector.m; sourceTree = ""; }; - 6E3C3663118B798F0079637E /* TTURLWildcard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLWildcard.m; path = Sources/TTURLWildcard.m; sourceTree = ""; }; - 6E3C3671118B79B90079637E /* TTURLArguments.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLArguments.m; path = Sources/TTURLArguments.m; sourceTree = ""; }; - 6E3C36C7118B7E0C0079637E /* TTURLObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLObject.h; path = Headers/TTURLObject.h; sourceTree = ""; }; - 6E3C3753118C8E180079637E /* TTBaseNavigator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTBaseNavigator.h; path = Headers/TTBaseNavigator.h; sourceTree = ""; }; - 6E3C3755118C8E210079637E /* TTBaseNavigator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTBaseNavigator.m; path = Sources/TTBaseNavigator.m; sourceTree = ""; }; - 6E3C3758118C8E490079637E /* TTNavigatorPersistenceMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigatorPersistenceMode.h; path = Headers/TTNavigatorPersistenceMode.h; sourceTree = ""; }; - 6E3C37B4118C96A60079637E /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E6081BF11B0C08600C93CD4 /* TTBaseNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTBaseNavigationController.h; path = Headers/TTBaseNavigationController.h; sourceTree = ""; }; - 6E6081C111B0C08D00C93CD4 /* TTBaseNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTBaseNavigationController.m; path = Sources/TTBaseNavigationController.m; sourceTree = ""; }; - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E6454731184D2CD00F08CB1 /* Three20UINavigator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20UINavigator.h; path = Headers/Three20UINavigator.h; sourceTree = ""; }; - 6E6458CB11875F8400F08CB1 /* Three20UINavigator_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Three20UINavigator_Prefix.pch; path = Headers/Three20UINavigator_Prefix.pch; sourceTree = ""; }; - 6E7B106611923A76001359FE /* TTNavigatorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTNavigatorViewController.m; path = Sources/TTNavigatorViewController.m; sourceTree = ""; }; - 6E7B106D11923A92001359FE /* TTNavigatorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigatorViewController.h; path = Headers/TTNavigatorViewController.h; sourceTree = ""; }; - 6E7B106F11923AC1001359FE /* UIViewController+TTNavigatorGarbageCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+TTNavigatorGarbageCollection.h"; path = "Headers/UIViewController+TTNavigatorGarbageCollection.h"; sourceTree = ""; }; - 6E7F945D118E1B0E00443B46 /* UIViewControllerAdditionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIViewControllerAdditionTests.m; path = UnitTests/UIViewControllerAdditionTests.m; sourceTree = ""; }; - 6E7F94B3118E210300443B46 /* TTURLActionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLActionTests.m; path = UnitTests/TTURLActionTests.m; sourceTree = ""; }; - 6E7F94C1118E22B200443B46 /* TTNavigationMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTNavigationMode.h; path = Headers/TTNavigationMode.h; sourceTree = ""; }; - 6E7F9520118E2BB600443B46 /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = ""; }; - 6E86A98C118CF55D00662DA5 /* TTBaseNavigatorInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTBaseNavigatorInternal.h; path = Headers/TTBaseNavigatorInternal.h; sourceTree = ""; }; - 6EDAE961118C99200008133C /* UIViewController+TTNavigator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+TTNavigator.h"; path = "Headers/UIViewController+TTNavigator.h"; sourceTree = ""; }; - 6EDAE963118C99280008133C /* UIViewController+TTNavigator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+TTNavigator.m"; path = "Sources/UIViewController+TTNavigator.m"; sourceTree = ""; }; - 6EDAE96B118C99C10008133C /* Three20UINavigator+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Three20UINavigator+Additions.h"; path = "Headers/Three20UINavigator+Additions.h"; sourceTree = ""; }; - 6EDAE9E9118CA3610008133C /* TTGlobalNavigatorMetrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTGlobalNavigatorMetrics.h; path = Headers/TTGlobalNavigatorMetrics.h; sourceTree = ""; }; - 6EDAE9EB118CA3680008133C /* TTGlobalNavigatorMetrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTGlobalNavigatorMetrics.m; path = Sources/TTGlobalNavigatorMetrics.m; sourceTree = ""; }; - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EE7364B11849B3D00A35176 /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - BEF31F3A0F352DF5000DE5D2 /* libThree20UINavigator.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libThree20UINavigator.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* UINavigatorUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UINavigatorUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EE736C811849FAB00A35176 /* libThree20Core.a in Frameworks */, - 6EDAE9CB118CA1C80008133C /* libThree20UICommon.a in Frameworks */, - 6EE739D01184BB0400A35176 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libThree20UINavigator.a */, - EB9E6C6210B6A8F800DE563C /* UINavigatorUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6E7F9520118E2BB600443B46 /* README.mdown */, - 6E6454731184D2CD00F08CB1 /* Three20UINavigator.h */, - 6EDAE96B118C99C10008133C /* Three20UINavigator+Additions.h */, - 6E6458CB11875F8400F08CB1 /* Three20UINavigator_Prefix.pch */, - 6EE737001184A1D500A35176 /* Source */, - 6E08B743118397FA00DA1579 /* Dependencies */, - 6EE7364D11849B4200A35176 /* Configurations */, - 6E08B274118282F700DA1579 /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 6E08B274118282F700DA1579 /* Tests */ = { - isa = PBXGroup; - children = ( - 6EE7364611849AF200A35176 /* Resources */, - 6E7F94B3118E210300443B46 /* TTURLActionTests.m */, - 6E7F945D118E1B0E00443B46 /* UIViewControllerAdditionTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6E08B743118397FA00DA1579 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */, - 6E3C37B4118C96A60079637E /* Three20UICommon.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E3C3615118B78010079637E /* URL Action */ = { - isa = PBXGroup; - children = ( - 6E3C3613118B77FE0079637E /* TTURLAction.h */, - 6E3C3610118B77F70079637E /* TTURLAction.m */, - ); - name = "URL Action"; - sourceTree = ""; - }; - 6E3C3627118B784C0079637E /* URL Map */ = { - isa = PBXGroup; - children = ( - 6E3C3625118B78420079637E /* TTURLMap.h */, - 6E3C3622118B78310079637E /* TTURLMap.m */, - 6E7F94C1118E22B200443B46 /* TTNavigationMode.h */, - ); - name = "URL Map"; - sourceTree = ""; - }; - 6E3C3637118B789C0079637E /* URL Pattern */ = { - isa = PBXGroup; - children = ( - 6E3C362F118B78950079637E /* TTURLPattern.h */, - 6E3C3650118B79740079637E /* TTURLPattern.m */, - 6E3C3638118B78A50079637E /* Private */, - 6E3C3639118B78C50079637E /* Patterns */, - ); - name = "URL Pattern"; - sourceTree = ""; - }; - 6E3C3638118B78A50079637E /* Private */ = { - isa = PBXGroup; - children = ( - 6E3C3630118B78950079637E /* TTURLPatternInternal.h */, - 6E3C3661118B798F0079637E /* TTURLPatternInternal.m */, - 6E3C363F118B78F20079637E /* TTURLArguments.h */, - 6E3C3671118B79B90079637E /* TTURLArguments.m */, - 6E3C364C118B79290079637E /* URL Pattern Text */, - 6E3C364D118B79320079637E /* URL Argument Type */, - ); - name = Private; - sourceTree = ""; - }; - 6E3C3639118B78C50079637E /* Patterns */ = { - isa = PBXGroup; - children = ( - 6E3C362D118B78950079637E /* TTURLGeneratorPattern.h */, - 6E3C364E118B79740079637E /* TTURLGeneratorPattern.m */, - 6E3C362E118B78950079637E /* TTURLNavigatorPattern.h */, - 6E3C364F118B79740079637E /* TTURLNavigatorPattern.m */, - ); - name = Patterns; - sourceTree = ""; - }; - 6E3C364C118B79290079637E /* URL Pattern Text */ = { - isa = PBXGroup; - children = ( - 6E3C3631118B78950079637E /* TTURLPatternText.h */, - 6E3C3646118B79140079637E /* TTURLLiteral.h */, - 6E3C3660118B798F0079637E /* TTURLLiteral.m */, - ); - name = "URL Pattern Text"; - sourceTree = ""; - }; - 6E3C364D118B79320079637E /* URL Argument Type */ = { - isa = PBXGroup; - children = ( - 6E3C3640118B78F20079637E /* TTURLArgumentType.h */, - 6E3C3647118B79140079637E /* TTURLSelector.h */, - 6E3C3662118B798F0079637E /* TTURLSelector.m */, - 6E3C3648118B79140079637E /* TTURLWildcard.h */, - 6E3C3663118B798F0079637E /* TTURLWildcard.m */, - ); - name = "URL Argument Type"; - sourceTree = ""; - }; - 6E3C37B5118C96A60079637E /* Products */ = { - isa = PBXGroup; - children = ( - 6E3C37BA118C96A60079637E /* libThree20UICommon.a */, - 6E3C37BC118C96A60079637E /* UICommonUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E7B106911923A7E001359FE /* View Controllers */ = { - isa = PBXGroup; - children = ( - 6E7B106D11923A92001359FE /* TTNavigatorViewController.h */, - 6E7B106611923A76001359FE /* TTNavigatorViewController.m */, - 6E6081BF11B0C08600C93CD4 /* TTBaseNavigationController.h */, - 6E6081C111B0C08D00C93CD4 /* TTBaseNavigationController.m */, - ); - name = "View Controllers"; - sourceTree = ""; - }; - 6E7B107111923AC5001359FE /* Private */ = { - isa = PBXGroup; - children = ( - 6E7B106F11923AC1001359FE /* UIViewController+TTNavigatorGarbageCollection.h */, - ); - name = Private; - sourceTree = ""; - }; - 6E86A98B118CF54900662DA5 /* Private */ = { - isa = PBXGroup; - children = ( - 6E86A98C118CF55D00662DA5 /* TTBaseNavigatorInternal.h */, - ); - name = Private; - sourceTree = ""; - }; - 6EDAE95B118C98D20008133C /* Additions */ = { - isa = PBXGroup; - children = ( - 6EDAE961118C99200008133C /* UIViewController+TTNavigator.h */, - 6EDAE963118C99280008133C /* UIViewController+TTNavigator.m */, - 6E7B107111923AC5001359FE /* Private */, - ); - name = Additions; - sourceTree = ""; - }; - 6EDAE9D8118CA25D0008133C /* Navigator */ = { - isa = PBXGroup; - children = ( - 6E3C3758118C8E490079637E /* TTNavigatorPersistenceMode.h */, - 666E16DC12944999001C1D97 /* TTNavigatorRootContainer.h */, - 6E3C3753118C8E180079637E /* TTBaseNavigator.h */, - 6E3C3755118C8E210079637E /* TTBaseNavigator.m */, - 6E3C35EA118B75800079637E /* TTNavigatorDelegate.h */, - 6E86A98B118CF54900662DA5 /* Private */, - 6EDAE95B118C98D20008133C /* Additions */, - 6E3C3615118B78010079637E /* URL Action */, - 6E3C3627118B784C0079637E /* URL Map */, - 6E3C3637118B789C0079637E /* URL Pattern */, - ); - name = Navigator; - sourceTree = ""; - }; - 6EE7364611849AF200A35176 /* Resources */ = { - isa = PBXGroup; - children = ( - 6EE7363D11849AD500A35176 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6EE7364D11849B4200A35176 /* Configurations */ = { - isa = PBXGroup; - children = ( - 6EE7364B11849B3D00A35176 /* Library.xcconfig */, - 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */, - 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; - 6EE7366711849C5800A35176 /* Products */ = { - isa = PBXGroup; - children = ( - 6EE7366C11849C5800A35176 /* libThree20Core.a */, - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EE737001184A1D500A35176 /* Source */ = { - isa = PBXGroup; - children = ( - 6EDAE9E9118CA3610008133C /* TTGlobalNavigatorMetrics.h */, - 6EDAE9EB118CA3680008133C /* TTGlobalNavigatorMetrics.m */, - 6E3C36C7118B7E0C0079637E /* TTURLObject.h */, - 6E7B106911923A7E001359FE /* View Controllers */, - 6EDAE9D8118CA25D0008133C /* Navigator */, - ); - name = Source; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E6454741184D2CD00F08CB1 /* Three20UINavigator.h in Headers */, - 6E3C35ED118B75800079637E /* TTNavigatorDelegate.h in Headers */, - 6E3C3614118B77FE0079637E /* TTURLAction.h in Headers */, - 6E3C3626118B78420079637E /* TTURLMap.h in Headers */, - 6E3C3632118B78950079637E /* TTURLGeneratorPattern.h in Headers */, - 6E3C3633118B78950079637E /* TTURLNavigatorPattern.h in Headers */, - 6E3C3634118B78950079637E /* TTURLPattern.h in Headers */, - 6E3C3635118B78950079637E /* TTURLPatternInternal.h in Headers */, - 6E3C3636118B78950079637E /* TTURLPatternText.h in Headers */, - 6E3C3641118B78F20079637E /* TTURLArguments.h in Headers */, - 6E3C3642118B78F20079637E /* TTURLArgumentType.h in Headers */, - 6E3C3649118B79140079637E /* TTURLLiteral.h in Headers */, - 6E3C364A118B79140079637E /* TTURLSelector.h in Headers */, - 6E3C364B118B79140079637E /* TTURLWildcard.h in Headers */, - 6E3C36C8118B7E0C0079637E /* TTURLObject.h in Headers */, - 6E3C3754118C8E180079637E /* TTBaseNavigator.h in Headers */, - 6E3C3759118C8E490079637E /* TTNavigatorPersistenceMode.h in Headers */, - 6EDAE962118C99200008133C /* UIViewController+TTNavigator.h in Headers */, - 6EDAE96C118C99C10008133C /* Three20UINavigator+Additions.h in Headers */, - 6EDAE9EA118CA3610008133C /* TTGlobalNavigatorMetrics.h in Headers */, - 6E86A98D118CF55D00662DA5 /* TTBaseNavigatorInternal.h in Headers */, - 6E7F94C4118E22E400443B46 /* TTNavigationMode.h in Headers */, - 6E7B106E11923A92001359FE /* TTNavigatorViewController.h in Headers */, - 6E7B107011923AC1001359FE /* UIViewController+TTNavigatorGarbageCollection.h in Headers */, - 6E6081C011B0C08600C93CD4 /* TTBaseNavigationController.h in Headers */, - 666E16DD12944999001C1D97 /* TTNavigatorRootContainer.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* Three20UINavigator */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20UINavigator" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E645F461187B01F00F08CB1 /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E661D131ADFEA00ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EE7367111849C6300A35176 /* PBXTargetDependency */, - 6E3C37BF118C96C20079637E /* PBXTargetDependency */, - ); - name = Three20UINavigator; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libThree20UINavigator.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* Three20UINavigatorUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20UINavigatorUnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6EE736C511849F9D00A35176 /* PBXTargetDependency */, - 6E3C37C1118C96CB0079637E /* PBXTargetDependency */, - 6EE736C711849FA000A35176 /* PBXTargetDependency */, - ); - name = Three20UINavigatorUnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* UINavigatorUnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20UINavigator" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EE7366711849C5800A35176 /* Products */; - ProjectRef = 6EE7366611849C5800A35176 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E3C37B5118C96A60079637E /* Products */; - ProjectRef = 6E3C37B4118C96A60079637E /* Three20UICommon.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* Three20UINavigator */, - EB9E6C6110B6A8F800DE563C /* Three20UINavigatorUnitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E3C37BA118C96A60079637E /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3C37B9118C96A60079637E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3C37BC118C96A60079637E /* UICommonUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UICommonUnitTests.octest; - remoteRef = 6E3C37BB118C96A60079637E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366C11849C5800A35176 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6EE7366B11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EE7366E11849C5800A35176 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6EE7366D11849C5800A35176 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E661D131ADFEA00ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E645F461187B01F00F08CB1 /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3C3611118B77F70079637E /* TTURLAction.m in Sources */, - 6E3C3623118B78310079637E /* TTURLMap.m in Sources */, - 6E3C3651118B79740079637E /* TTURLGeneratorPattern.m in Sources */, - 6E3C3652118B79740079637E /* TTURLNavigatorPattern.m in Sources */, - 6E3C3653118B79740079637E /* TTURLPattern.m in Sources */, - 6E3C3664118B798F0079637E /* TTURLLiteral.m in Sources */, - 6E3C3665118B798F0079637E /* TTURLPatternInternal.m in Sources */, - 6E3C3666118B798F0079637E /* TTURLSelector.m in Sources */, - 6E3C3667118B798F0079637E /* TTURLWildcard.m in Sources */, - 6E3C3672118B79B90079637E /* TTURLArguments.m in Sources */, - 6E3C3756118C8E210079637E /* TTBaseNavigator.m in Sources */, - 6EDAE964118C99280008133C /* UIViewController+TTNavigator.m in Sources */, - 6EDAE9EC118CA3680008133C /* TTGlobalNavigatorMetrics.m in Sources */, - 6E7B106811923A76001359FE /* TTNavigatorViewController.m in Sources */, - 6E6081C211B0C08D00C93CD4 /* TTBaseNavigationController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E7F945E118E1B0E00443B46 /* UIViewControllerAdditionTests.m in Sources */, - 6E7F94B4118E210300443B46 /* TTURLActionTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E3C37BF118C96C20079637E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E3C37BE118C96C20079637E /* PBXContainerItemProxy */; - }; - 6E3C37C1118C96CB0079637E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6E3C37C0118C96CB0079637E /* PBXContainerItemProxy */; - }; - 6EE7367111849C6300A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6EE7367011849C6300A35176 /* PBXContainerItemProxy */; - }; - 6EE736C511849F9D00A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6EE736C411849F9D00A35176 /* PBXContainerItemProxy */; - }; - 6EE736C711849FA000A35176 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* Three20UINavigator */; - targetProxy = 6EE736C611849FA000A35176 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364B11849B3D00A35176 /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E64543D1184BE1B00F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EE7364C11849B3D00A35176 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - PREBINDING = NO; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "Three20UINavigator" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Three20UINavigator" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "Three20UINavigatorUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/Three20UINavigator/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/Three20UINavigator/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/Three20UINavigator/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/Three20UINavigator/UnitTests/TTURLActionTests.m b/src/Three20UINavigator/UnitTests/TTURLActionTests.m deleted file mode 100644 index 0f0927c894..0000000000 --- a/src/Three20UINavigator/UnitTests/TTURLActionTests.m +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import - -// UINavigator -#import "Three20UINavigator/TTURLAction.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -@interface TTURLActionTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLActionTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testDefaults { - static NSString* kURLPath = @"tt://url"; - TTURLAction* action = [[TTURLAction alloc] initWithURLPath:kURLPath]; - - STAssertEquals(action.urlPath, kURLPath, @"urlPath should be set."); - STAssertNil(action.parentURLPath, @"parentURLPath should be nil."); - STAssertNil(action.query, @"query should be nil."); - STAssertNil(action.state, @"state should be nil."); - STAssertFalse(action.animated, @"animated should be false."); - STAssertFalse(action.withDelay, @"withDelay should be false."); - STAssertEquals(action.transition, UIViewAnimationTransitionNone, - @"transition should be UIViewAnimationTransitionNone."); - - TT_RELEASE_SAFELY(action); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testChaining { - static NSString* kURLPath = @"tt://url"; - TTURLAction* action = [[[[[TTURLAction alloc] initWithURLPath:kURLPath] - applyAnimated:YES] - applyWithDelay:YES] - applyTransition:UIViewAnimationTransitionCurlUp]; - - STAssertEquals(action.urlPath, kURLPath, @"urlPath should be set."); - STAssertNil(action.parentURLPath, @"parentURLPath should be nil."); - STAssertNil(action.query, @"query should be nil."); - STAssertNil(action.state, @"state should be nil."); - STAssertTrue(action.animated, @"animated should be true."); - STAssertTrue(action.withDelay, @"withDelay should be true."); - STAssertEquals(action.transition, UIViewAnimationTransitionCurlUp, - @"transition should be UIViewAnimationTransitionCurlUp."); - - TT_RELEASE_SAFELY(action); -} - - -@end diff --git a/src/Three20UINavigator/UnitTests/UIViewControllerAdditionTests.m b/src/Three20UINavigator/UnitTests/UIViewControllerAdditionTests.m deleted file mode 100644 index 064baf948b..0000000000 --- a/src/Three20UINavigator/UnitTests/UIViewControllerAdditionTests.m +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. - -#import - -// UINavigator -#import "Three20UINavigator/UIViewController+TTNavigator.h" - -// UICommon -#import "Three20UICommon/UIViewControllerAdditions.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -@interface UIViewControllerAdditionTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation UIViewControllerAdditionTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testsingle_navigatorURL { - static NSString* kURLPath = @"tt://url"; - UIViewController* controller = [[UIViewController alloc] init]; - - STAssertNil([controller originalNavigatorURL], @"No navigator url should be set."); - - controller.originalNavigatorURL = kURLPath; - - STAssertEquals([controller originalNavigatorURL], kURLPath, @"New navigator url should be set."); - - // We need to set originalNavigatorURL to nil in order to properly remove it from the internal - // global mapping. - controller.originalNavigatorURL = nil; - TT_RELEASE_SAFELY(controller); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testmultiple_navigatorURL { - static NSString* kURLPath = @"tt://url"; - static NSString* kURLPath2 = @"tt://url2"; - static NSString* kURLPath3 = @"tt://url3"; - UIViewController* controller = [[UIViewController alloc] init]; - UIViewController* controller2 = [[UIViewController alloc] init]; - UIViewController* controller3 = [[UIViewController alloc] init]; - - STAssertNil([controller originalNavigatorURL], @"No navigator url should be set."); - STAssertNil([controller2 originalNavigatorURL], @"No navigator url should be set."); - STAssertNil([controller3 originalNavigatorURL], @"No navigator url should be set."); - - controller.originalNavigatorURL = kURLPath; - controller2.originalNavigatorURL = kURLPath2; - controller3.originalNavigatorURL = kURLPath3; - - STAssertEquals([controller originalNavigatorURL], kURLPath, - @"New navigator url should be set."); - - // We need to set originalNavigatorURL to nil in order to properly remove it from the internal - // global mapping. - controller.originalNavigatorURL = nil; - TT_RELEASE_SAFELY(controller); - - STAssertEquals([controller2 originalNavigatorURL], kURLPath2, - @"New navigator url should be set."); - - controller2.originalNavigatorURL = nil; - TT_RELEASE_SAFELY(controller2); - - STAssertEquals([controller3 originalNavigatorURL], kURLPath3, - @"New navigator url should be set."); - - controller3.originalNavigatorURL = nil; - TT_RELEASE_SAFELY(controller3); -} - - -@end diff --git a/src/UnitTests/Xcode324iOS41TestSuiteWorkaround.m b/src/UnitTests/Xcode324iOS41TestSuiteWorkaround.m deleted file mode 100644 index 4748665ca6..0000000000 --- a/src/UnitTests/Xcode324iOS41TestSuiteWorkaround.m +++ /dev/null @@ -1,183 +0,0 @@ -// -// Xcode324iOS41TestSuiteWorkaround.m -// -// This source file provides a work-around to enable running unit tests -// against the iPhone Simulator in Xcode 3.2.4 with iOS SDK 4.1. -// -// This work-around is only needed when using Xcode 3.2.4 to target iOS 4.1. -// -// Copyright 2010 Apple Inc. All rights reserved. -// - -/* Instructions: - - To use this workaround, add this source file to the Compile Sources - build phase of your unit test bundle target. It will be applied - automatically before your tests are run. - - This is a workaround for an Xcode internal error that will be reported in - the build log when attempting to run unit tests against the iPhone Simulator - for iOS 4.1. This is due to a mismatch between what Xcode expects the date - format in "Test Suite 'name' started at date" and "Test Suite 'name' - finished at date." messages to look like, and how iOS 4.1 - implements -[NSDate descriptionWithLocale:]. - - The workaround works by exchanging the implementations of the - -[SenTestRun startDate] and -[SenTestRun stopDate] methods for versions - which return an NSDate subclass whose -descriptionWithLocale: method - prints in a format compatible with what Xcode 3.2.4 expects. -*/ - -/* - IMPORTANT: The following Apple material is supplied to you by Apple Inc. - (“Apple”) in consideration of your agreement to the following terms. If you - do not agree with these terms, do not use the Apple material. In consideration - of your agreement to abide by the following terms, and subject to these terms, - Apple grants you a non-exclusive license, under Apple’s copyrights in this - original Apple material, to use, reproduce, install, modify and redistribute - the Apple materials, in their original form as provided by Apple or as modified - by you; provided that if you modify the Apple materials, then you must not - attribute them to Apple. Except as expressly stated in this notice, no other - rights or licenses, express or implied, are granted by Apple herein. - - The Apple Materials are provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, OR ANY WARRANTY THAT THE APPLE MATERIALS WILL BE COMPATIBLE WITH - FUTURE APPLE PRODUCTS, SOFTWARE OR SERVICES. IN NO EVENT SHALL APPLE BE LIABLE - FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES RELATING TO OR - ARISING IN ANY WAY OUT OF THE USE OF THE APPLE MATERIALS BY YOU OR OTHERS, - HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING - NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#import -#import -#import - -#if TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MAX_ALLOWED == __IPHONE_4_1) - - -// An NSDate subclass whose -descriptionWithLocale: is compatible with Xcode 3.2.4's -// unit test message parser. -@interface Xcode324iOS41TestSuiteWorkaroundDate : NSDate { -@private - NSDate *_wrappedDate; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)workaroundDateWrappingDate:(NSDate *)wrappedDate; - -@end - - -@implementation Xcode324iOS41TestSuiteWorkaroundDate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (id)workaroundDateWrappingDate:(NSDate *)wrappedDate { - return [[[self alloc] initWithTimeIntervalSinceReferenceDate: - [wrappedDate timeIntervalSinceReferenceDate]] - autorelease]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithTimeIntervalSinceReferenceDate:(NSTimeInterval)seconds { - // required override (NSDate is a class cluster) - self = [super init]; - if (self) { - _wrappedDate = [[NSDate alloc] initWithTimeIntervalSinceReferenceDate:seconds]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [_wrappedDate release]; - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSTimeInterval)timeIntervalSinceReferenceDate { - // required override (NSDate is a class cluster) - return [_wrappedDate timeIntervalSinceReferenceDate]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString *)descriptionWithLocale:(id)locale { - // append 4 digits to the result of -descriptionWithLocale: for Xcode's unit test message - // parser - NSString *originalDescription = [_wrappedDate descriptionWithLocale:locale]; - return [originalDescription stringByAppendingString:@" 0000"]; -} - -@end - - -// Methods added to SenTestRun that are swizzled in place of the existing methods to -// return instances of Xcode324iOS41TestSuiteWorkaroundDate instead of NSDate, so Xcode's -// unit test message parser gets output in the format it expects. -@interface SenTestRun (Xcode324iOS41TestSuiteWorkaroundMethods) - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDate *)workaround_startDate; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDate *)workaround_stopDate; - -@end - - -@implementation SenTestRun (Xcode324iOS41TestSuiteWorkaroundMethods) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (void)load { - Class senTestRunClass = objc_getClass("SenTestRun"); - - // Exchange the implementations of -[SenTestRun startDate] - // and -[SenTestRun workaround_startDate]. - Method originalStartDate = class_getInstanceMethod(senTestRunClass, @selector(startDate)); - Method workaroundStartDate = class_getInstanceMethod(senTestRunClass, - @selector(workaround_startDate)); - method_exchangeImplementations(originalStartDate, workaroundStartDate); - - // Exchange the implementations of -[SenTestRun stopDate] - // and -[SenTestRun workaround_stopDate]. - Method originalStopDate = class_getInstanceMethod(senTestRunClass, @selector(stopDate)); - Method workaroundStopDate = class_getInstanceMethod(senTestRunClass, - @selector(workaround_stopDate)); - method_exchangeImplementations(originalStopDate, workaroundStopDate); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDate *)workaround_startDate { - // The below invokes the original -startDate due to the use of method_exchangeImplementatons - // in our +load. - return [Xcode324iOS41TestSuiteWorkaroundDate workaroundDateWrappingDate: - [self workaround_startDate]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDate *)workaround_stopDate { - // The below invokes the original -stopDate due to the use of method_exchangeImplementatons - // in our +load. - return [Xcode324iOS41TestSuiteWorkaroundDate workaroundDateWrappingDate: - [self workaround_stopDate]]; -} - -@end - -#else -#warning "This workaround is only needed when using Xcode 3.2.4 to target iOS 4.1." -#endif diff --git a/src/common/Configurations/Libraries.xcconfig b/src/common/Configurations/Libraries.xcconfig deleted file mode 100644 index c767151acc..0000000000 --- a/src/common/Configurations/Libraries.xcconfig +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "Paths.xcconfig" - -OBJC_LIBRARY = -ObjC - -// stdlib / libSystem - -STDLIB_HEADERS = /usr/include -STDLIB_LIBRARY = /usr/lib - -// ObjC Runtime - -OBJC_LIB = -lobjc - -// Common build settings - -ALWAYS_SEARCH_USER_PATHS = NO - -// -// Frameworks -// - -AVFOUNDATION_FX = -framework AVFoundation -ADDRESSBOOK_FX = -framework AddressBook -ADDRESSBOOKUI_FX = -framework AddressBookUI -CFNETWORK_FX = -framework CFNetwork -COREDATA_FX = -framework CoreData -COREFOUNDATION_FX = -framework CoreFoundation -COREGRAPHICS_FX = -framework CoreGraphics -CORELOCATION_FX = -framework CoreLocation -FOUNDATION_FX = -framework Foundation -GAMEKIT_FX = -framework GameKit -MAPKIT_FX = -framework MapKit -MEDIAPLAYER_FX = -framework MediaPlayer -MESSAGEUI_FX = -framework MessageUI -MOBILECORESERVICES_FX = -framework MobileCoreServices -OPENGLES_FX = -framework OpenGLES -QUARTZCORE_FX = -framework QuartzCore -SECURITY_FX = -framework Security -STOREKIT_FX = -framework StoreKit -SYSTEMCONFIGURATION_FX = -framework SystemConfiguration -UIKIT_FX = -framework UIKit - -// Unit Tests - -SENTESTINGKIT_FX = -framework SenTestingKit diff --git a/src/common/Configurations/Library.xcconfig b/src/common/Configurations/Library.xcconfig deleted file mode 100644 index fca6eb4639..0000000000 --- a/src/common/Configurations/Library.xcconfig +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -HEADERS_FOLDER_PATH = /../three20/ -PRIVATE_HEADERS_FOLDER_PATH = $(HEADERS_FOLDER_PATH)$(BASE_PRODUCT_NAME)/private -PUBLIC_HEADERS_FOLDER_PATH = $(HEADERS_FOLDER_PATH)$(BASE_PRODUCT_NAME) - -GCC_PRECOMPILE_PREFIX_HEADER = YES -GCC_PREFIX_HEADER = $(SRCROOT)/Headers/$(BASE_PRODUCT_NAME)_Prefix.pch -RUN_CLANG_STATIC_ANALYZER = NO - -// Don't include the Three20 libraries in the archive. This makes it possible to build IPAs -// in Xcode 4. -SKIP_INSTALL = YES - -// Uncomment this flags to build the modules with LLVM compiler 1.5 -//GCC_VERSION = com.apple.compilers.llvm.clang.1_0 - -// We frequently use self.view; in Three20UI and LLVM compiler 1.5 raises warnings. -// This flag turns them off. -//WARNING_CFLAGS = -Wno-unused-value - -FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)/Developer/Library/Frameworks" -IPHONEOS_DEPLOYMENT_TARGET = 3.0 -SDKROOT = iphoneos -// Required for older iOS devices (iPhone 3G) -ARCHS = $(ARCHS_STANDARD_32_BIT) - -// Linker Flags - -OTHER_LDFLAGS = $(OBJC_LIBRARY) - -// Warning flags - -GCC_WARN_CHECK_SWITCH_STATEMENTS = NO -GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES -GCC_WARN_SHADOW = YES -GCC_WARN_ABOUT_MISSING_NEWLINE = YES -GCC_WARN_UNUSED_FUNCTION = YES -GCC_WARN_UNUSED_LABEL = YES - diff --git a/src/common/Configurations/Paths.xcconfig b/src/common/Configurations/Paths.xcconfig deleted file mode 100644 index 2523f012a5..0000000000 --- a/src/common/Configurations/Paths.xcconfig +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -REPO_ROOT_PATH = $(SRCROOT)/../.. -ROOT_SOURCE_PATH = $(REPO_ROOT_PATH)/src - -OBJROOT = $(REPO_ROOT_PATH)/Build -SYMROOT = $(OBJROOT)/Products - -// Search Paths - -LIBRARY_SEARCH_PATHS = $(STDLIB_LIBRARY) - -// Header search paths: why we have three -// -// CONFIGURATION_BUILD_DIR is for when the headers are copied to Three20's Build folder. -// Applies to: -// - Xcode 3.2.# -// - Xcode 4 with the Build Location preference set to "Place build products in locations -// specified by targets" -// -// BUILT_PRODUCTS_DIR is for Xcode 4 support only. We need two copies of a BUILT_PRODUCTS_DIR path -// because on Archive builds, there is one extra folder placed between the -// product and the public header path. -// Applies to: -// - Xcode 4 only - -HEADER_SEARCH_PATHS = $(STDLIB_HEADERS) "$(BUILT_PRODUCTS_DIR)/../three20" "$(BUILT_PRODUCTS_DIR)/../../three20" "$(CONFIGURATION_BUILD_DIR)/../../three20" diff --git a/src/common/Configurations/Project.xcconfig b/src/common/Configurations/Project.xcconfig deleted file mode 100644 index b1d750d9a6..0000000000 --- a/src/common/Configurations/Project.xcconfig +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "Paths.xcconfig" - -FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)/Developer/Library/Frameworks" -IPHONEOS_DEPLOYMENT_TARGET = 3.0 -SDKROOT = iphoneos -// Required for older iOS devices (iPhone 3G) -ARCHS = $(ARCHS_STANDARD_32_BIT) diff --git a/src/common/Configurations/UnitTests.xcconfig b/src/common/Configurations/UnitTests.xcconfig deleted file mode 100644 index 374818fe23..0000000000 --- a/src/common/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "Paths.xcconfig" - -GCC_PRECOMPILE_PREFIX_HEADER = NO -RUN_CLANG_STATIC_ANALYZER = YES - -INFOPLIST_FILE = $(SRCROOT)/UnitTests/Resources/PropertyLists/UnitTests-Info.plist - -WRAPPER_EXTENSION = octest -FRAMEWORK_SEARCH_PATHS = $(SDKROOT)$(DEVELOPER_FRAMEWORKS_DIR) - -CURRENT_PROJECT_VERSION = $(BUILD_BUNDLE_VERSION) - -FRAMEWORK_SEARCH_PATHS = "$(SDKROOT)/Developer/Library/Frameworks" -IPHONEOS_DEPLOYMENT_TARGET = 3.0 -SDKROOT = iphoneos -// Required for older iOS devices (iPhone 3G) -ARCHS = $(ARCHS_STANDARD_32_BIT) - -// Linker Flags - -COMMON_LDFLAGS = $(OBJC_LIBRARY) $(UIKIT_FX) $(COREGRAPHICS_FX) $(FOUNDATION_FX) $(SENTESTINGKIT_FX) - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) diff --git a/src/extThree20CSSStyle/.gitignore b/src/extThree20CSSStyle/.gitignore deleted file mode 100644 index 516c987043..0000000000 --- a/src/extThree20CSSStyle/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Grammars/CssTokenizer.cpp diff --git a/src/extThree20CSSStyle/Configurations/Library.xcconfig b/src/extThree20CSSStyle/Configurations/Library.xcconfig deleted file mode 100644 index da2819ecb0..0000000000 --- a/src/extThree20CSSStyle/Configurations/Library.xcconfig +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = extThree20CSSStyle -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 - -PRIVATE_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)/private -PUBLIC_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME) diff --git a/src/extThree20CSSStyle/Configurations/Project.xcconfig b/src/extThree20CSSStyle/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/extThree20CSSStyle/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/extThree20CSSStyle/Configurations/UnitTests.xcconfig b/src/extThree20CSSStyle/Configurations/UnitTests.xcconfig deleted file mode 100644 index 3e1c11d5a0..0000000000 --- a/src/extThree20CSSStyle/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = extCSSStyleUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(UIKIT_FX) diff --git a/src/extThree20CSSStyle/Grammars/Build.Command b/src/extThree20CSSStyle/Grammars/Build.Command deleted file mode 100644 index 2f22fc0f6c..0000000000 --- a/src/extThree20CSSStyle/Grammars/Build.Command +++ /dev/null @@ -1,10 +0,0 @@ -flex --prefix=css --nounput css.grammar - -cat CssTokenizerPrefix > CssTokenizer.cpp -cat lex.css.c >> CssTokenizer.cpp - -rm lex.css.c - -mv CssTokenizer.cpp ../Sources/CssTokenizer.m -cp CssTokens.cpp ../Sources/CssTokens.m -cp CssToken*.h ../Headers/ diff --git a/src/extThree20CSSStyle/Grammars/CssTokenizerPrefix b/src/extThree20CSSStyle/Grammars/CssTokenizerPrefix deleted file mode 100644 index b7736721f8..0000000000 --- a/src/extThree20CSSStyle/Grammars/CssTokenizerPrefix +++ /dev/null @@ -1 +0,0 @@ -#include "extThree20CSSStyle/private/CssTokens.h" diff --git a/src/extThree20CSSStyle/Grammars/CssTokens.cpp b/src/extThree20CSSStyle/Grammars/CssTokens.cpp deleted file mode 100644 index 5385122855..0000000000 --- a/src/extThree20CSSStyle/Grammars/CssTokens.cpp +++ /dev/null @@ -1,19 +0,0 @@ - -const char* cssnames[] = { - "STRING", - "IDENT", - "HASH", - "EMS", - "EXS", - "LENGTH", - "ANGLE", - "TIME", - "FREQ", - "DIMEN", - "PERCENTAGE", - "NUMBER", - "URI", - "FUNCTION", - "UNICODERANGE", - "UNKNOWN", -}; diff --git a/src/extThree20CSSStyle/Grammars/CssTokens.h b/src/extThree20CSSStyle/Grammars/CssTokens.h deleted file mode 100644 index cf996e53ab..0000000000 --- a/src/extThree20CSSStyle/Grammars/CssTokens.h +++ /dev/null @@ -1,35 +0,0 @@ - -#include - -typedef enum { - CSSFIRST_TOKEN = 0x100, - CSSSTRING = CSSFIRST_TOKEN, - CSSIDENT, - CSSHASH, - CSSEMS, - CSSEXS, - CSSLENGTH, - CSSANGLE, - CSSTIME, - CSSFREQ, - CSSDIMEN, - CSSPERCENTAGE, - CSSNUMBER, - CSSURI, - CSSFUNCTION, - CSSUNICODERANGE, - CSSUNKNOWN, - -} CssParserCodes; - -extern const char* cssnames[]; - -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -extern FILE *cssin; - -int csslex(void); -int cssConsume(char* text, int token); diff --git a/src/extThree20CSSStyle/Grammars/css.grammar b/src/extThree20CSSStyle/Grammars/css.grammar deleted file mode 100644 index bd809b225e..0000000000 --- a/src/extThree20CSSStyle/Grammars/css.grammar +++ /dev/null @@ -1,78 +0,0 @@ -%option case-insensitive - -h [0-9a-f] -nonascii [\200-\377] -unicode \\{h}{1,6}[ \t\r\n\f]? -escape {unicode}|\\[ -~\200-\377] -nmstart [a-z]|{nonascii}|{escape} -nmchar [a-z0-9-]|{nonascii}|{escape} -string1 \"([\t !#$%&(-~]|\\{nl}|\'|{nonascii}|{escape})*\" -string2 \'([\t !#$%&(-~]|\\{nl}|\"|{nonascii}|{escape})*\' - -ident [-]?{nmstart}{nmchar}* -name {nmchar}+ -num [-]?[0-9]+|[-]?[0-9]*"."[0-9]+ -string {string1}|{string2} -url ([!#$%&*-~]|{nonascii}|{escape})* -w [ \t\r\n\f]* -nl \n|\r\n|\r|\f -range \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|{h}))))) - -%% - -[ \t\r\n\f]+ - -\/\*[^*]*\*+([^/][^*]*\*+)*\/ /* ignore comments */ - -"" -"~=" -"|=" - -{string} {cssConsume(yytext, CSSSTRING);} - -{ident}(:{ident})? {cssConsume(yytext, CSSIDENT);} - -"#"{name} {cssConsume(yytext, CSSHASH);} - -"@import" -"@page" -"@media" -"@font-face" -"@charset" -"@namespace" - -"!{w}important" - -{num}em {cssConsume(yytext, CSSEMS);} -{num}ex {cssConsume(yytext, CSSEXS);} -{num}px {cssConsume(yytext, CSSLENGTH);} -{num}cm {cssConsume(yytext, CSSLENGTH);} -{num}mm {cssConsume(yytext, CSSLENGTH);} -{num}in {cssConsume(yytext, CSSLENGTH);} -{num}pt {cssConsume(yytext, CSSLENGTH);} -{num}pc {cssConsume(yytext, CSSLENGTH);} -{num}deg {cssConsume(yytext, CSSANGLE);} -{num}rad {cssConsume(yytext, CSSANGLE);} -{num}grad {cssConsume(yytext, CSSANGLE);} -{num}ms {cssConsume(yytext, CSSTIME);} -{num}s {cssConsume(yytext, CSSTIME);} -{num}Hz {cssConsume(yytext, CSSFREQ);} -{num}kHz {cssConsume(yytext, CSSFREQ);} -{num}{ident} {cssConsume(yytext, CSSDIMEN);} -{num}% {cssConsume(yytext, CSSPERCENTAGE);} -{num} {cssConsume(yytext, CSSNUMBER);} - -"url("{w}{string}{w}")" {cssConsume(yytext, CSSURI);} -"url("{w}{url}{w}")" {cssConsume(yytext, CSSURI);} -{ident}"(" {cssConsume(yytext, CSSFUNCTION);} - -U\+{range} {cssConsume(yytext, CSSUNICODERANGE);} -U\+{h}{1,6}-{h}{1,6} {cssConsume(yytext, CSSUNICODERANGE);} - -. {cssConsume(yytext, CSSUNKNOWN);} - -%% - -int csswrap(void){return 1;} - diff --git a/src/extThree20CSSStyle/Headers/CssTokens.h b/src/extThree20CSSStyle/Headers/CssTokens.h deleted file mode 100644 index cf996e53ab..0000000000 --- a/src/extThree20CSSStyle/Headers/CssTokens.h +++ /dev/null @@ -1,35 +0,0 @@ - -#include - -typedef enum { - CSSFIRST_TOKEN = 0x100, - CSSSTRING = CSSFIRST_TOKEN, - CSSIDENT, - CSSHASH, - CSSEMS, - CSSEXS, - CSSLENGTH, - CSSANGLE, - CSSTIME, - CSSFREQ, - CSSDIMEN, - CSSPERCENTAGE, - CSSNUMBER, - CSSURI, - CSSFUNCTION, - CSSUNICODERANGE, - CSSUNKNOWN, - -} CssParserCodes; - -extern const char* cssnames[]; - -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -extern FILE *cssin; - -int csslex(void); -int cssConsume(char* text, int token); diff --git a/src/extThree20CSSStyle/Headers/TTCSSParser.h b/src/extThree20CSSStyle/Headers/TTCSSParser.h deleted file mode 100644 index c9da7b70b5..0000000000 --- a/src/extThree20CSSStyle/Headers/TTCSSParser.h +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * CSS Jargon: - * - * Rule Set: A selector and a set of property/value pairs. - * Selector: An identifier for a rule set. Example: "img" - * Property: A name for a set of values. Example: "color" - * Value: A value for a property. - * - * img { \ - * border-color: red; | A single rule set. - * } / - */ -@interface TTCSSParser : NSObject { -@private - NSMutableDictionary* _ruleSets; - NSMutableArray* _activeCssSelectors; - NSMutableDictionary* _activeRuleSet; - NSString* _activePropertyName; - - NSString* _lastTokenText; - int _lastToken; - - union { - struct { - int InsideDefinition : 1; - int InsideProperty : 1; - int InsideFunction : 1; - } Flags; - int _data; - } _state; -} - -- (NSDictionary*)parseFilename:(NSString*)filename; - -@end diff --git a/src/extThree20CSSStyle/Headers/TTCSSStyleSheet.h b/src/extThree20CSSStyle/Headers/TTCSSStyleSheet.h deleted file mode 100644 index 8cadd98437..0000000000 --- a/src/extThree20CSSStyle/Headers/TTCSSStyleSheet.h +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -/** - * A general purpose CSS style sheet object for accessing a CSS style sheet's properties. - * - * This is useful if you want to use style sheets to manually customize certain aspects of - * your UI. - * - * Example apps: three20/samples/Style/TTCSSStyleSheets - */ -@interface TTCSSStyleSheet : NSObject { -@private - NSDictionary* _cssStyles; - - NSMutableDictionary* _cachedCssStyles; - - NSDictionary* _colorLookupTable; -} - -@property (nonatomic, readonly) NSDictionary* cssStyles; - - -/** - * Load the style sheet into memory from disk. - * - * @return NO if the file does not exist. - */ -- (BOOL)loadFromFilename:(NSString*)filename; - -/** - * Add a stylesheet to this one, overriding any properties as expected. - */ -- (void)addStyleSheet:(TTCSSStyleSheet*)styleSheet; - - -/** - * Get (text) color from a specific rule set. - */ -- (UIColor*)colorWithCssSelector:(NSString*)selector forState:(UIControlState)state; - -/** - * Get background-color from a specific rule set. - */ -- (UIColor*)backgroundColorWithCssSelector:(NSString*)selector forState:(UIControlState)state; - -/** - * Get font from a specific rule set. - */ -- (UIFont*)fontWithCssSelector:(NSString*)selector forState:(UIControlState)state; - -/** - * Get text shadow color from a specific rule set. - */ -- (UIColor*)textShadowColorWithCssSelector:(NSString*)selector forState:(UIControlState)state; - -/** - * Get text shadow offset from a specific rule set. - */ -- (CGSize)textShadowOffsetWithCssSelector:(NSString*)selector forState:(UIControlState)state; - - -/** - * Release all cached data. - */ -- (void)freeMemory; - - -@end diff --git a/src/extThree20CSSStyle/Headers/TTExtensionLoader.h b/src/extThree20CSSStyle/Headers/TTExtensionLoader.h deleted file mode 100644 index 8e0f4bbfd7..0000000000 --- a/src/extThree20CSSStyle/Headers/TTExtensionLoader.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTExtensionLoader.h" - -@interface TTExtensionLoader (TTCSSStyleExtension) - -@end diff --git a/src/extThree20CSSStyle/Headers/extThree20CSSStyle.h b/src/extThree20CSSStyle/Headers/extThree20CSSStyle.h deleted file mode 100644 index 2f96fa3373..0000000000 --- a/src/extThree20CSSStyle/Headers/extThree20CSSStyle.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// CSS Parser -#import "extThree20CSSStyle/TTCSSParser.h" - -// CSS Stylesheet -#import "extThree20CSSStyle/TTCSSStyleSheet.h" -#import "extThree20CSSStyle/TTDefaultCSSStyleSheet.h" diff --git a/src/extThree20CSSStyle/Headers/extThree20CSSStyle_Prefix.pch b/src/extThree20CSSStyle/Headers/extThree20CSSStyle_Prefix.pch deleted file mode 100644 index 28f5d8f8f2..0000000000 --- a/src/extThree20CSSStyle/Headers/extThree20CSSStyle_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Three20Core' target in the 'Three20Core' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/src/extThree20CSSStyle/README.mdown b/src/extThree20CSSStyle/README.mdown deleted file mode 100644 index e379c72ea0..0000000000 --- a/src/extThree20CSSStyle/README.mdown +++ /dev/null @@ -1,179 +0,0 @@ - -extCSSStyle -=========== - -This extension provides support for reading style sheets from CSS files. CSS is parsed using a -tokenizer generated using flex, and built upon the -[W3C grammar](http://www.w3.org/TR/css3-syntax/#lexical) for CSS3. By adding this extension to -any project, you can begin to customize your app with CSS by simply adding 3 lines of code. - - -Dependencies ------------- - -* Core -* Network -* Style - - -Using it in your App --------------------- - -Add the `extThree20CSSStyle.xcodeproj` file to your project. Add `extThree20CSSStyle.a` to your -"Link Binary With Libraries" phase, and add `extThree20CSSStyle` as a dependency. - -Import the following into your precompiled header. - - #import - - -### If you want to use the CSS-powered default style sheet - -Drag extThree20CSSStyle.bundle from the `src/extThree20CSSStyle/Resources` directory into your -project and ensure that "Create Folder References" is selected. - -Set the global stylesheet when your app launches. - - [TTStyleSheet setGlobalStyleSheet:[[[TTDefaultCSSStyleSheet alloc] init] autorelease]]; - - -Breakdown ---------- - -The CSSStyle extension includes a CSS grammar, a tokenizer built from this grammar, and a -couple stylesheet objects that provide the interface for grabbing properties from the -stylesheet. - -### The Grammar - -You can find the grammar in `three20/src/extThree20CSSStyle/Grammars/`. The file is named -`css.grammar`. - -To build the grammar, you will need to install flex. - -http://flex.sourceforge.net/ - -The version used to build the grammar included in this lib was 2.5.35 from February 26, 2008. - -Building the grammar generates a tokenizer in the file `CssTokenizer.m`. Please read the -flex documentation for more details on tokenizer generation. - -### The Parser - -TTCSSParser uses the tokenizer generated by flex to process any given CSS file. The result is -a dictionary of rule sets, each containing a set of properties, each with an array of values. -The parser is designed to only read in one file at a time, but within the file all css properties -are cascading as expected. - -However, strict adherence to the W3C has not been met. For example, strict checks for validity -do not exist yet, making it possible for the resulting dictionary to include rule sets and -properties that might otherwise be ignored by industry standard CSS systems. - -### The Style Sheets - -There are two style sheet objects included in this extension. The first, TTCSSStyleSheet is -a new object that reads the results from a TTCSSParser and provides a set of accessors for -interacting with a css stylesheet. This object also provides a method for compositing style -sheets together, where each style sheet overwrites the properties of those before it. - -The second style sheet object is TTDefaultCSSStyleSheet. This guy provides a CSS layer upon -the standard TTDefaultStyleSheet. By using TTDefaultCSSStyleSheet, you can theme your app -with a .css file provided in your app. This extension provides a bundle that contains a -style sheet with all of the default TTDefaultStyleSheet values. You can then composite another -style sheet upon this one using addStyleSheetFromDisk:. For an example of this in action, -see TTFacebook in the `three20/samples` directory. - - -Known Limitations ------------------ - -### Font Sizes - -Font-size is always interpreted in points, regardless of what you specify. This is due to -the tricky nature of varying DPI on the various iPhone OS devices. - -### Text Shadows - -The "blur" property is always interpreted as "0". This is due to the technical limitations -of specifying blur for text shadows for UILabels. - - -Supported CSS Properties and Values ------------------------------------ - -### Definitions used below - - Value Example - ------------| |------------------- - #FFF or #FF00FF or rgb(255, 0, 255) - or rgba(0, 255, 255, 0.5) or - - Any of the standard names found in the W3C for css3. - http://www.w3.org/TR/css3-color/ - Also, iPhone OS standard colors: - lightTextColor - darkTextColor - groupTableViewBackgroundColor - viewFlipsideBackgroundColor - - [0-9.]+ - - -### Colors - - color: - colorWithCssSelector - background-color: - backgroundColorWithCssSelector - -`color` is used for text color. - -### Fonts - - font-size: pt - font-weight: (bold|normal) - fontWithCssSelector - -Fonts are defined with a set of properties that collectively create the final UIFont* object. -`fontWithCssSelector` reads each of these properties when building the font object. - -### Text Shadow - - text-shadow: px px - textShadowColorWithCssSelector - textShadowOffsetWithCssSelector - -The `text-shadow` property is defined in one chunk, but read using two distinct methods. - -The third parameter is ignored. See "Text Shadows" in the `Known Limitations` section for -the technical reasons. - - -Examples --------- - -See `three20/samples/TTFacebook` for a working example. - -### How to use TTDefaultCSSStyleSheet - -Add `extThree20CSSStyle.bundle` to your project. Make sure that "Create Folder References" is -selected. - -Create a file, let's call it "stylesheet.css", and add it to your project. Ensure that it's -being copied in the "Copy Bundle Resources" phase. - -Add the following code in your app delegate's `applicationDidFinishLaunching`. - - // TTDefaultCSSStyleSheet automatically reads default.css from extThree20CSSStyle.bundle - TTDefaultCSSStyleSheet* styleSheet = [[TTDefaultCSSStyleSheet alloc] init]; - - [styleSheet addStyleSheetFromDisk:TTPathForBundleResource(@"stylesheet.css")]; - - [TTStyleSheet setGlobalStyleSheet:styleSheet]; - - TT_RELEASE_SAFELY(styleSheet); - -Now you can freely customize the styles of your app using `stylesheet.css`. You can freely -add new styles to the CSS, but with the current design you will also need to add an accessor -to a custom object that inherits from `TTDefaultCSSStyleSheet`. See the source for -`TTDefaultCSSStyleSheet` for examples of how to interact with the style sheet object. diff --git a/src/extThree20CSSStyle/Resources/extThree20CSSStyle.bundle/stylesheets/default.css b/src/extThree20CSSStyle/Resources/extThree20CSSStyle.bundle/stylesheets/default.css deleted file mode 100644 index 7e2260f540..0000000000 --- a/src/extThree20CSSStyle/Resources/extThree20CSSStyle.bundle/stylesheets/default.css +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright 2009-2010 Facebook - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Common styles - */ -body { - background-color: white; - color: black; - font-size: 14pt; -} - -body:hover { - color: white; -} - -navigationBar { - background-color: #778CA8; -} - -toolbar { - background-color: #6D84A2; -} - -searchbar { - background-color: #C8C8C8; -} - - -/** - * Tables - */ -table { - background-color: none; -} - -groupedTable { - background-color: groupTableViewBackgroundColor; -} - -searchTable { - background-color: #EBEBEB; -} - -searchTableSeparator { - background-color: #D9D9D9; -} - - -/** - * Table Items - */ - -.tableItemLink { - color: #576B95; -} - -.tableItemTimestamp { - color: #2470D8; -} - -/* More button, generally used at the bottom of a table. */ -.moreButton { - color: #2470D8; -} - - -/** - * Table Headers - */ -.tableHeader { - color: #576B95; - text-shadow: 0px 1px 0px transparent; -} - - -/** - * Photo Captions - */ -.photoCaption { - color: white; - text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.9); -} - - -/** - * Drag Refresh Headers - */ -.dragRefreshHeaderLastUpdated { - font-size: 12pt; -} - -.dragRefreshHeaderStatusFont { - font-size: 13pt; - font-weight: bold; -} - -.dragRefreshHeader { - background-color: #E2E7ED; - color: #576C89; - text-shadow: 0px 1px 0px #E6E6E6; -} diff --git a/src/extThree20CSSStyle/Sources/CssTokenizer.cpp b/src/extThree20CSSStyle/Sources/CssTokenizer.cpp deleted file mode 100644 index 55edeb07f0..0000000000 --- a/src/extThree20CSSStyle/Sources/CssTokenizer.cpp +++ /dev/null @@ -1,2928 +0,0 @@ -#include "extThree20CSSStyle/private/CssTokens.h" - -#line 3 "lex.css.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE cssrestart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via cssrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void cssrestart (FILE *input_file ,yyscan_t yyscanner ); -void css_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE css_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void css_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void css_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void csspush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void csspop_buffer_state (yyscan_t yyscanner ); - -static void cssensure_buffer_stack (yyscan_t yyscanner ); -static void css_load_buffer_state (yyscan_t yyscanner ); -static void css_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER css_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE css_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE css_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE css_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); - -void *cssalloc (yy_size_t ,yyscan_t yyscanner ); -void *cssrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void cssfree (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer css_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - cssensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - css_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - cssensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - css_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 41 -#define YY_END_OF_BUFFER 42 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[292] = - { 0, - 0, 0, 42, 40, 1, 1, 40, 40, 40, 40, - 40, 40, 40, 34, 40, 40, 8, 8, 40, 40, - 40, 1, 0, 0, 7, 0, 9, 0, 0, 0, - 0, 8, 0, 34, 0, 33, 0, 0, 34, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 29, 0, 0, 0, 0, 0, 0, 0, 0, 37, - 8, 0, 0, 8, 8, 8, 6, 5, 0, 0, - 0, 7, 0, 0, 9, 9, 0, 0, 7, 0, - 0, 4, 0, 0, 32, 0, 20, 32, 17, 18, - 32, 30, 22, 32, 21, 28, 24, 23, 19, 32, - - 32, 32, 0, 0, 0, 0, 0, 0, 0, 8, - 8, 38, 38, 8, 8, 0, 0, 0, 9, 0, - 0, 0, 0, 2, 32, 32, 25, 32, 31, 26, - 32, 3, 0, 0, 0, 0, 0, 0, 8, 0, - 38, 38, 38, 37, 8, 0, 0, 9, 0, 0, - 0, 0, 0, 2, 32, 27, 32, 0, 0, 0, - 0, 0, 11, 8, 39, 38, 38, 38, 38, 0, - 0, 0, 0, 36, 0, 8, 0, 0, 9, 0, - 0, 32, 32, 0, 0, 0, 12, 0, 8, 39, - 38, 38, 38, 38, 38, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 36, 0, 0, 8, 0, 0, - 9, 0, 32, 32, 0, 0, 10, 0, 8, 39, - 38, 38, 38, 38, 38, 38, 0, 35, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, - 0, 0, 9, 0, 32, 32, 14, 0, 0, 8, - 39, 38, 38, 38, 38, 38, 38, 38, 0, 35, - 0, 0, 0, 35, 0, 0, 0, 0, 32, 0, - 0, 39, 0, 0, 0, 0, 13, 15, 39, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, - 0 - - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 4, 5, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 6, 7, 8, 9, 10, 11, 10, 12, 13, - 14, 15, 16, 10, 17, 18, 19, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 10, 10, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 35, 42, 43, 44, 45, 35, 46, 47, 35, 48, - 10, 49, 10, 10, 10, 10, 50, 27, 51, 52, - - 53, 54, 55, 56, 57, 35, 58, 59, 60, 61, - 62, 63, 35, 64, 65, 66, 67, 35, 68, 69, - 35, 70, 71, 72, 73, 74, 1, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75 - } ; - -static yyconst flex_int32_t yy_meta[76] = - { 0, - 1, 2, 3, 3, 3, 4, 4, 4, 4, 4, - 4, 4, 5, 4, 4, 4, 6, 4, 4, 7, - 4, 4, 4, 8, 4, 9, 9, 9, 9, 9, - 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, - 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 4, 4, 4, 4, 10 - } ; - -static yyconst flex_int16_t yy_base[328] = - { 0, - 0, 0, 691, 3338, 74, 79, 618, 78, 639, 75, - 71, 665, 664, 117, 671, 165, 76, 77, 209, 655, - 654, 92, 45, 84, 3338, 262, 626, 297, 87, 350, - 639, 89, 385, 83, 646, 3338, 611, 639, 0, 608, - 62, 158, 163, 65, 60, 156, 83, 208, 203, 164, - 602, 420, 633, 84, 158, 164, 188, 92, 165, 3338, - 181, 455, 625, 184, 195, 508, 3338, 3338, 575, 245, - 226, 234, 561, 614, 598, 667, 246, 259, 269, 720, - 773, 3338, 631, 91, 589, 808, 587, 247, 586, 583, - 248, 577, 576, 207, 574, 560, 559, 558, 556, 251, - - 555, 861, 583, 259, 245, 258, 249, 269, 255, 196, - 914, 88, 574, 273, 949, 285, 296, 984, 1019, 308, - 1054, 557, 315, 3338, 522, 1107, 493, 307, 476, 468, - 1142, 3338, 296, 295, 301, 301, 313, 314, 1177, 0, - 316, 474, 445, 380, 1212, 308, 1247, 1282, 1317, 445, - 350, 427, 356, 418, 1352, 376, 1387, 330, 390, 332, - 367, 344, 3338, 1422, 0, 373, 340, 313, 308, 416, - 450, 323, 377, 3338, 1475, 1510, 369, 1545, 1580, 1615, - 408, 1650, 1685, 378, 403, 397, 3338, 403, 1720, 0, - 374, 281, 252, 203, 176, 474, 451, 487, 1773, 394, - - 1826, 571, 625, 678, 731, 1879, 1932, 1967, 405, 2002, - 2037, 2072, 2107, 2142, 450, 469, 3338, 470, 2177, 0, - 444, 165, 107, 99, 97, 91, 527, 3338, 494, 495, - 784, 2230, 2283, 537, 475, 803, 2336, 2389, 2424, 2459, - 462, 2494, 2529, 2564, 2599, 2634, 3338, 494, 495, 548, - 0, 87, 3338, 3338, 3338, 3338, 3338, 3338, 872, 507, - 519, 2669, 921, 506, 535, 2704, 2739, 504, 591, 548, - 550, 0, 2774, 2809, 2844, 556, 3338, 3338, 3338, 2879, - 2914, 2949, 560, 2984, 3019, 3054, 558, 650, 703, 3338, - 3338, 3107, 3112, 3121, 3126, 3132, 3139, 3148, 3155, 3164, - - 3174, 3176, 3181, 3188, 3195, 3199, 3208, 3215, 3220, 3229, - 3239, 3243, 3247, 3255, 3259, 3263, 3271, 3280, 3289, 3293, - 3297, 3305, 3314, 3318, 3322, 3325, 3328 - } ; - -static yyconst flex_int16_t yy_def[328] = - { 0, - 291, 1, 291, 291, 291, 291, 291, 292, 293, 294, - 295, 291, 291, 291, 291, 291, 296, 296, 297, 291, - 291, 291, 291, 292, 291, 298, 293, 299, 294, 300, - 291, 296, 297, 14, 301, 291, 302, 291, 14, 303, - 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, - 303, 304, 291, 291, 291, 291, 291, 291, 291, 291, - 296, 305, 306, 296, 296, 296, 291, 291, 291, 292, - 292, 292, 292, 298, 293, 293, 294, 294, 294, 294, - 300, 291, 301, 307, 303, 308, 303, 303, 303, 303, - 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, - - 303, 303, 291, 291, 291, 291, 291, 291, 291, 296, - 66, 309, 291, 296, 66, 291, 292, 73, 76, 294, - 80, 310, 311, 291, 303, 102, 303, 303, 303, 303, - 102, 291, 291, 291, 291, 291, 291, 291, 111, 312, - 313, 291, 291, 314, 66, 291, 73, 76, 80, 310, - 307, 310, 311, 310, 126, 303, 102, 291, 291, 291, - 291, 291, 291, 111, 315, 316, 291, 291, 291, 314, - 314, 317, 318, 291, 319, 66, 291, 73, 76, 80, - 311, 126, 102, 291, 291, 291, 291, 291, 111, 320, - 321, 291, 291, 291, 291, 291, 317, 291, 322, 318, - - 323, 314, 314, 314, 314, 314, 319, 66, 291, 73, - 76, 80, 126, 102, 291, 291, 291, 291, 111, 324, - 325, 291, 291, 291, 291, 291, 291, 291, 317, 317, - 317, 317, 322, 318, 318, 318, 318, 323, 206, 66, - 291, 73, 76, 80, 126, 102, 291, 291, 291, 240, - 326, 291, 291, 291, 291, 291, 291, 291, 317, 317, - 317, 232, 318, 318, 318, 237, 206, 291, 246, 291, - 291, 327, 232, 237, 206, 291, 291, 291, 291, 232, - 237, 206, 291, 232, 237, 206, 291, 317, 318, 291, - 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291 - } ; - -static yyconst flex_int16_t yy_nxt[3414] = - { 0, - 4, 5, 6, 5, 5, 5, 7, 8, 9, 4, - 4, 10, 4, 4, 4, 4, 11, 12, 13, 14, - 15, 4, 4, 4, 16, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 18, 17, 17, 17, 19, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 18, 17, 17, 17, - 4, 20, 4, 21, 17, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 25, 25, 31, 60, 60, - 69, 25, 63, 22, 22, 22, 22, 22, 25, 87, - - 291, 60, 34, 140, 140, 123, 91, 92, 86, 124, - 86, 142, 69, 86, 258, 94, 104, 108, 64, 33, - 257, 87, 256, 30, 62, 62, 26, 36, 91, 92, - 255, 86, 26, 37, 38, 30, 39, 62, 94, 104, - 64, 108, 40, 40, 41, 42, 43, 40, 44, 45, - 46, 40, 47, 40, 48, 40, 40, 49, 50, 51, - 40, 40, 40, 40, 40, 52, 40, 41, 42, 43, - 40, 44, 45, 46, 47, 40, 48, 40, 40, 49, - 50, 51, 40, 40, 40, 40, 40, 88, 254, 100, - 109, 40, 54, 60, 93, 55, 60, 105, 56, 226, - - 89, 106, 57, 58, 86, 59, 86, 60, 60, 90, - 88, 86, 86, 100, 109, 54, 93, 107, 55, 105, - 114, 56, 89, 106, 57, 58, 225, 59, 66, 62, - 97, 90, 62, 25, 66, 66, 66, 66, 66, 66, - 107, 25, 114, 62, 62, 95, 98, 24, 29, 99, - 96, 86, 25, 97, 129, 86, 86, 25, 66, 66, - 66, 66, 66, 24, 24, 24, 70, 95, 98, 72, - 25, 99, 96, 128, 26, 224, 129, 136, 127, 130, - 25, 73, 26, 134, 133, 144, 138, 73, 73, 73, - 73, 73, 73, 26, 30, 86, 86, 128, 135, 86, - - 136, 127, 130, 25, 223, 134, 137, 30, 133, 138, - 74, 73, 73, 73, 73, 73, 76, 30, 146, 25, - 135, 62, 76, 76, 76, 76, 76, 76, 137, 153, - 198, 195, 140, 154, 161, 156, 194, 158, 159, 167, - 160, 146, 162, 163, 26, 177, 76, 76, 76, 76, - 76, 29, 29, 29, 77, 86, 30, 161, 156, 158, - 159, 79, 160, 193, 181, 162, 163, 177, 124, 80, - 153, 199, 184, 186, 154, 80, 80, 80, 80, 80, - 80, 170, 170, 170, 170, 170, 188, 172, 198, 140, - 140, 173, 187, 174, 184, 186, 192, 222, 81, 80, - - 80, 80, 80, 80, 66, 198, 185, 215, 188, 209, - 66, 66, 66, 66, 66, 66, 187, 170, 170, 170, - 170, 170, 181, 172, 86, 201, 154, 173, 175, 174, - 215, 209, 151, 216, 66, 66, 66, 66, 66, 102, - 217, 151, 201, 218, 241, 102, 102, 102, 102, 102, - 102, 196, 196, 196, 196, 196, 216, 291, 198, 151, - 140, 291, 217, 174, 175, 218, 241, 253, 169, 102, - 102, 102, 102, 102, 111, 196, 196, 196, 196, 196, - 111, 111, 111, 111, 111, 111, 198, 174, 227, 227, - 227, 227, 227, 247, 248, 249, 197, 168, 175, 199, - - 228, 198, 198, 268, 111, 111, 111, 111, 111, 65, - 65, 65, 65, 65, 198, 247, 86, 198, 248, 249, - 60, 270, 271, 201, 86, 268, 198, 115, 227, 227, - 227, 227, 227, 115, 115, 115, 115, 115, 115, 200, - 228, 86, 199, 199, 270, 271, 198, 276, 198, 110, - 110, 110, 110, 110, 201, 199, 62, 115, 115, 115, - 115, 115, 71, 117, 117, 117, 71, 199, 25, 276, - 86, 151, 196, 196, 196, 196, 196, 277, 291, 278, - 118, 283, 291, 201, 174, 201, 118, 118, 118, 118, - 118, 118, 125, 125, 125, 125, 125, 143, 287, 132, - - 277, 290, 278, 86, 86, 283, 86, 86, 86, 26, - 118, 118, 118, 118, 118, 24, 24, 24, 70, 175, - 287, 72, 86, 290, 86, 86, 196, 196, 196, 196, - 196, 86, 291, 73, 86, 86, 291, 86, 174, 73, - 73, 73, 73, 73, 73, 84, 28, 116, 113, 103, - 86, 230, 261, 261, 261, 230, 86, 198, 34, 52, - 84, 82, 74, 73, 73, 73, 73, 73, 75, 75, - 75, 75, 75, 175, 28, 68, 67, 53, 35, 196, - 196, 196, 196, 196, 34, 291, 119, 28, 23, 291, - 291, 174, 119, 119, 119, 119, 119, 119, 199, 291, - - 291, 291, 291, 291, 235, 265, 265, 265, 235, 291, - 291, 291, 291, 291, 198, 28, 119, 119, 119, 119, - 119, 78, 120, 120, 120, 78, 175, 291, 291, 291, - 291, 25, 196, 196, 196, 196, 196, 291, 291, 121, - 291, 291, 291, 291, 174, 121, 121, 121, 121, 121, - 121, 201, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 30, 121, - 121, 121, 121, 121, 29, 29, 29, 77, 291, 175, - 291, 291, 291, 291, 79, 259, 227, 227, 227, 259, - 291, 198, 80, 291, 291, 291, 291, 260, 80, 80, - - 80, 80, 80, 80, 263, 227, 227, 227, 263, 291, - 291, 291, 291, 291, 198, 291, 264, 291, 291, 291, - 291, 81, 80, 80, 80, 80, 80, 126, 291, 291, - 291, 291, 199, 126, 126, 126, 126, 126, 126, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 201, 291, 291, 291, 291, 291, 126, 126, 126, - 126, 126, 101, 101, 101, 101, 101, 291, 291, 291, - 291, 291, 291, 259, 227, 227, 227, 259, 291, 198, - 131, 291, 291, 291, 291, 260, 131, 131, 131, 131, - 131, 131, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 291, 291, 291, 291, 291, 291, 291, 291, 86, - 131, 131, 131, 131, 131, 110, 110, 110, 110, 110, - 199, 291, 263, 227, 227, 227, 263, 291, 291, 291, - 291, 291, 198, 139, 264, 291, 291, 291, 291, 139, - 139, 139, 139, 139, 139, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 139, 139, 139, 139, 139, 145, 201, - 291, 291, 291, 291, 145, 145, 145, 145, 145, 145, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 145, 145, - - 145, 145, 145, 147, 291, 291, 291, 291, 291, 147, - 147, 147, 147, 147, 147, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 147, 147, 147, 147, 147, 148, 291, - 291, 291, 291, 291, 148, 148, 148, 148, 148, 148, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 148, 148, - 148, 148, 148, 149, 291, 291, 291, 291, 291, 149, - 149, 149, 149, 149, 149, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 291, 291, 149, 149, 149, 149, 149, 125, 125, - 125, 125, 125, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 155, 291, 291, 291, - 291, 291, 155, 155, 155, 155, 155, 155, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 155, 155, 155, 155, - 155, 157, 291, 291, 291, 291, 291, 157, 157, 157, - 157, 157, 157, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 157, 157, 157, 157, 157, 164, 291, 291, 291, - - 291, 291, 164, 164, 164, 164, 164, 164, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 164, 164, 164, 164, - 164, 176, 291, 291, 291, 291, 291, 176, 176, 176, - 176, 176, 176, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 176, 176, 176, 176, 176, 178, 291, 291, 291, - 291, 291, 178, 178, 178, 178, 178, 178, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 178, 178, 178, 178, - - 178, 179, 291, 291, 291, 291, 291, 179, 179, 179, - 179, 179, 179, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 179, 179, 179, 179, 179, 180, 291, 291, 291, - 291, 291, 180, 180, 180, 180, 180, 180, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 180, 180, 180, 180, - 180, 182, 291, 291, 291, 291, 291, 182, 182, 182, - 182, 182, 182, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 182, 182, 182, 182, 182, 183, 291, 291, 291, - 291, 291, 183, 183, 183, 183, 183, 183, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 183, 183, 183, 183, - 183, 189, 291, 291, 291, 291, 291, 189, 189, 189, - 189, 189, 189, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 189, 189, 189, 189, 189, 196, 196, 196, 196, - 202, 291, 204, 291, 291, 291, 204, 204, 205, 291, - 291, 291, 291, 291, 206, 291, 291, 291, 291, 291, - - 206, 206, 206, 206, 206, 206, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 207, 206, 206, 206, 206, 206, 208, - 291, 291, 291, 291, 291, 208, 208, 208, 208, 208, - 208, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 208, - 208, 208, 208, 208, 210, 291, 291, 291, 291, 291, - 210, 210, 210, 210, 210, 210, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 210, 210, 210, 210, 210, 211, - - 291, 291, 291, 291, 291, 211, 211, 211, 211, 211, - 211, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 211, - 211, 211, 211, 211, 212, 291, 291, 291, 291, 291, - 212, 212, 212, 212, 212, 212, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 212, 212, 212, 212, 212, 213, - 291, 291, 291, 291, 291, 213, 213, 213, 213, 213, - 213, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 213, - - 213, 213, 213, 213, 214, 291, 291, 291, 291, 291, - 214, 214, 214, 214, 214, 214, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 214, 214, 214, 214, 214, 219, - 291, 291, 291, 291, 291, 219, 219, 219, 219, 219, - 219, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 219, - 219, 219, 219, 219, 197, 197, 197, 229, 291, 291, - 231, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 232, 291, 291, 291, 291, 291, 232, 232, - - 232, 232, 232, 232, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 233, 232, 232, 232, 232, 232, 200, 200, 200, - 234, 291, 291, 291, 291, 291, 291, 236, 291, 291, - 291, 291, 291, 291, 291, 237, 291, 291, 291, 291, - 291, 237, 237, 237, 237, 237, 237, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 238, 237, 237, 237, 237, 237, - 202, 202, 202, 202, 202, 291, 291, 291, 291, 291, - 291, 291, 174, 291, 291, 291, 291, 291, 239, 291, - - 291, 291, 291, 291, 239, 239, 239, 239, 239, 239, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 175, 239, 239, - 239, 239, 239, 196, 196, 196, 196, 202, 291, 204, - 291, 291, 291, 204, 204, 205, 291, 291, 291, 291, - 291, 206, 291, 291, 291, 291, 291, 206, 206, 206, - 206, 206, 206, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 207, 206, 206, 206, 206, 206, 240, 291, 291, 291, - 291, 291, 240, 240, 240, 240, 240, 240, 291, 291, - - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 240, 240, 240, 240, - 240, 242, 291, 291, 291, 291, 291, 242, 242, 242, - 242, 242, 242, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 242, 242, 242, 242, 242, 243, 291, 291, 291, - 291, 291, 243, 243, 243, 243, 243, 243, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 243, 243, 243, 243, - 243, 244, 291, 291, 291, 291, 291, 244, 244, 244, - - 244, 244, 244, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 244, 244, 244, 244, 244, 245, 291, 291, 291, - 291, 291, 245, 245, 245, 245, 245, 245, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 245, 245, 245, 245, - 245, 246, 291, 291, 291, 291, 291, 246, 246, 246, - 246, 246, 246, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 246, 246, 246, 246, 246, 250, 291, 291, 291, - - 291, 291, 250, 250, 250, 250, 250, 250, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 250, 250, 250, 250, - 250, 230, 261, 261, 261, 230, 291, 198, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 262, - 291, 291, 291, 291, 291, 262, 262, 262, 262, 262, - 262, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 199, 262, - 262, 262, 262, 262, 197, 197, 197, 229, 291, 291, - 231, 291, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 291, 232, 291, 291, 291, 291, 291, 232, 232, - 232, 232, 232, 232, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 233, 232, 232, 232, 232, 232, 235, 265, 265, - 265, 235, 291, 291, 291, 291, 291, 198, 291, 291, - 291, 291, 291, 291, 291, 266, 291, 291, 291, 291, - 291, 266, 266, 266, 266, 266, 266, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 201, 266, 266, 266, 266, 266, - 200, 200, 200, 234, 291, 291, 291, 291, 291, 291, - - 236, 291, 291, 291, 291, 291, 291, 291, 237, 291, - 291, 291, 291, 291, 237, 237, 237, 237, 237, 237, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 238, 237, 237, - 237, 237, 237, 267, 291, 291, 291, 291, 291, 267, - 267, 267, 267, 267, 267, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 267, 267, 267, 267, 267, 61, 291, - 291, 291, 291, 291, 61, 61, 61, 61, 61, 61, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 291, 291, 291, 291, 291, 291, 291, 61, 61, - 61, 61, 61, 24, 291, 291, 291, 291, 291, 24, - 24, 24, 24, 24, 24, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 24, 24, 24, 24, 24, 27, 291, - 291, 291, 291, 291, 27, 27, 27, 27, 27, 27, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 27, 27, - 27, 27, 27, 29, 291, 291, 291, 291, 291, 29, - 29, 29, 29, 29, 29, 291, 291, 291, 291, 291, - - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 29, 29, 29, 29, 29, 269, 291, - 291, 291, 291, 291, 269, 269, 269, 269, 269, 269, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 269, 269, - 269, 269, 269, 85, 291, 291, 291, 291, 291, 85, - 85, 85, 85, 85, 85, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 85, 85, 85, 85, 85, 273, 291, - 291, 291, 291, 291, 273, 273, 273, 273, 273, 273, - - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 273, 273, - 273, 273, 273, 274, 291, 291, 291, 291, 291, 274, - 274, 274, 274, 274, 274, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 274, 274, 274, 274, 274, 275, 291, - 291, 291, 291, 291, 275, 275, 275, 275, 275, 275, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 275, 275, - 275, 275, 275, 280, 291, 291, 291, 291, 291, 280, - - 280, 280, 280, 280, 280, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 280, 280, 280, 280, 280, 281, 291, - 291, 291, 291, 291, 281, 281, 281, 281, 281, 281, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 281, 281, - 281, 281, 281, 282, 291, 291, 291, 291, 291, 282, - 282, 282, 282, 282, 282, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 282, 282, 282, 282, 282, 284, 291, - - 291, 291, 291, 291, 284, 284, 284, 284, 284, 284, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 284, 284, - 284, 284, 284, 285, 291, 291, 291, 291, 291, 285, - 285, 285, 285, 285, 285, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 285, 285, 285, 285, 285, 286, 291, - 291, 291, 291, 291, 286, 286, 286, 286, 286, 286, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 286, 286, - - 286, 286, 286, 288, 291, 291, 291, 291, 291, 288, - 288, 288, 288, 288, 288, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 288, 288, 288, 288, 288, 289, 291, - 291, 291, 291, 291, 289, 289, 289, 289, 289, 289, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 289, 289, - 289, 289, 289, 171, 291, 291, 291, 291, 291, 171, - 171, 171, 171, 171, 171, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 291, 291, 171, 171, 171, 171, 171, 24, 291, - 24, 24, 24, 24, 24, 24, 24, 27, 27, 291, - 27, 27, 29, 291, 29, 29, 29, 29, 29, 29, - 29, 32, 291, 291, 32, 32, 61, 61, 61, 291, - 61, 61, 65, 65, 65, 65, 65, 65, 65, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 75, 75, - 75, 75, 75, 75, 75, 78, 78, 78, 78, 78, - 78, 78, 78, 78, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 40, 40, 85, 85, 291, 85, - 85, 101, 101, 101, 101, 101, 101, 101, 110, 110, - - 110, 110, 110, 110, 110, 112, 112, 112, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 125, 125, - 125, 125, 125, 125, 125, 141, 141, 141, 141, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 152, - 152, 152, 152, 152, 152, 152, 152, 152, 152, 165, - 291, 165, 166, 166, 166, 166, 171, 171, 171, 291, - 171, 171, 171, 171, 171, 190, 291, 190, 191, 191, - 191, 191, 197, 291, 197, 197, 197, 197, 197, 197, - 197, 200, 291, 200, 200, 200, 200, 200, 200, 200, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 220, - - 291, 220, 221, 221, 221, 221, 230, 230, 230, 230, - 230, 230, 230, 230, 230, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 251, 291, 251, 252, 252, 252, - 252, 272, 291, 272, 279, 291, 279, 3, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291 - } ; - -static yyconst flex_int16_t yy_chk[3414] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, - 6, 6, 6, 6, 6, 8, 10, 11, 17, 18, - 23, 24, 18, 22, 22, 22, 22, 22, 29, 41, - - 34, 32, 34, 252, 112, 84, 44, 45, 45, 84, - 41, 112, 23, 44, 226, 47, 54, 58, 18, 11, - 225, 41, 224, 10, 17, 18, 8, 14, 44, 45, - 223, 47, 24, 14, 14, 29, 14, 32, 47, 54, - 18, 58, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 42, 222, 50, - 59, 14, 16, 61, 46, 16, 64, 55, 16, 195, - - 43, 56, 16, 16, 46, 16, 42, 65, 110, 43, - 42, 43, 50, 50, 59, 16, 46, 57, 16, 55, - 64, 16, 43, 56, 16, 16, 194, 16, 19, 61, - 49, 43, 64, 71, 19, 19, 19, 19, 19, 19, - 57, 72, 64, 65, 110, 48, 49, 70, 77, 49, - 48, 49, 70, 49, 94, 94, 48, 77, 19, 19, - 19, 19, 19, 26, 26, 26, 26, 48, 49, 26, - 78, 49, 48, 91, 71, 193, 94, 107, 88, 100, - 79, 26, 72, 105, 104, 114, 109, 26, 26, 26, - 26, 26, 26, 70, 77, 88, 91, 91, 106, 100, - - 107, 88, 100, 117, 192, 105, 108, 78, 104, 109, - 26, 26, 26, 26, 26, 26, 28, 79, 116, 120, - 106, 114, 28, 28, 28, 28, 28, 28, 108, 123, - 172, 169, 141, 123, 136, 128, 168, 133, 134, 141, - 135, 116, 137, 138, 117, 146, 28, 28, 28, 28, - 28, 30, 30, 30, 30, 128, 120, 136, 128, 133, - 134, 30, 135, 167, 151, 137, 138, 146, 151, 30, - 153, 172, 158, 160, 153, 30, 30, 30, 30, 30, - 30, 144, 144, 144, 144, 144, 162, 144, 173, 166, - 191, 144, 161, 144, 158, 160, 166, 191, 30, 30, - - 30, 30, 30, 30, 33, 200, 159, 184, 162, 177, - 33, 33, 33, 33, 33, 33, 161, 170, 170, 170, - 170, 170, 181, 170, 156, 173, 181, 170, 144, 170, - 184, 177, 154, 185, 33, 33, 33, 33, 33, 52, - 186, 152, 200, 188, 209, 52, 52, 52, 52, 52, - 52, 171, 171, 171, 171, 171, 185, 171, 197, 150, - 221, 171, 186, 171, 170, 188, 209, 221, 143, 52, - 52, 52, 52, 52, 62, 196, 196, 196, 196, 196, - 62, 62, 62, 62, 62, 62, 235, 196, 198, 198, - 198, 198, 198, 215, 216, 218, 229, 142, 171, 197, - - 198, 229, 230, 241, 62, 62, 62, 62, 62, 66, - 66, 66, 66, 66, 260, 215, 130, 264, 216, 218, - 66, 248, 249, 235, 129, 241, 261, 66, 227, 227, - 227, 227, 227, 66, 66, 66, 66, 66, 66, 234, - 227, 127, 229, 230, 248, 249, 265, 268, 234, 250, - 250, 250, 250, 250, 264, 260, 66, 66, 66, 66, - 66, 66, 73, 73, 73, 73, 73, 261, 73, 268, - 125, 122, 202, 202, 202, 202, 202, 270, 202, 271, - 73, 276, 202, 265, 202, 234, 73, 73, 73, 73, - 73, 73, 269, 269, 269, 269, 269, 113, 283, 103, - - 270, 287, 271, 101, 99, 276, 98, 97, 96, 73, - 73, 73, 73, 73, 73, 74, 74, 74, 74, 202, - 283, 74, 95, 287, 93, 92, 203, 203, 203, 203, - 203, 90, 203, 74, 89, 87, 203, 85, 203, 74, - 74, 74, 74, 74, 74, 83, 75, 69, 63, 53, - 51, 288, 288, 288, 288, 288, 40, 288, 38, 37, - 35, 31, 74, 74, 74, 74, 74, 74, 76, 76, - 76, 76, 76, 203, 27, 21, 20, 15, 13, 204, - 204, 204, 204, 204, 12, 204, 76, 9, 7, 204, - 3, 204, 76, 76, 76, 76, 76, 76, 288, 0, - - 0, 0, 0, 0, 289, 289, 289, 289, 289, 0, - 0, 0, 0, 0, 289, 76, 76, 76, 76, 76, - 76, 80, 80, 80, 80, 80, 204, 0, 0, 0, - 0, 80, 205, 205, 205, 205, 205, 0, 205, 80, - 0, 0, 205, 0, 205, 80, 80, 80, 80, 80, - 80, 289, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, - 80, 80, 80, 80, 81, 81, 81, 81, 0, 205, - 0, 0, 0, 0, 81, 231, 231, 231, 231, 231, - 0, 231, 81, 0, 0, 0, 0, 231, 81, 81, - - 81, 81, 81, 81, 236, 236, 236, 236, 236, 0, - 0, 0, 0, 0, 236, 0, 236, 0, 0, 0, - 0, 81, 81, 81, 81, 81, 81, 86, 0, 0, - 0, 0, 231, 86, 86, 86, 86, 86, 86, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 236, 0, 0, 0, 0, 0, 86, 86, 86, - 86, 86, 102, 102, 102, 102, 102, 0, 0, 0, - 0, 0, 0, 259, 259, 259, 259, 259, 0, 259, - 102, 0, 0, 0, 0, 259, 102, 102, 102, 102, - 102, 102, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, - 102, 102, 102, 102, 102, 111, 111, 111, 111, 111, - 259, 0, 263, 263, 263, 263, 263, 0, 0, 0, - 0, 0, 263, 111, 263, 0, 0, 0, 0, 111, - 111, 111, 111, 111, 111, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 111, 111, 111, 111, 111, 115, 263, - 0, 0, 0, 0, 115, 115, 115, 115, 115, 115, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 115, 115, - - 115, 115, 115, 118, 0, 0, 0, 0, 0, 118, - 118, 118, 118, 118, 118, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 118, 118, 118, 118, 118, 119, 0, - 0, 0, 0, 0, 119, 119, 119, 119, 119, 119, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 119, 119, - 119, 119, 119, 121, 0, 0, 0, 0, 0, 121, - 121, 121, 121, 121, 121, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 121, 121, 121, 121, 121, 126, 126, - 126, 126, 126, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 126, 0, 0, 0, - 0, 0, 126, 126, 126, 126, 126, 126, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 126, 126, 126, 126, - 126, 131, 0, 0, 0, 0, 0, 131, 131, 131, - 131, 131, 131, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 131, 131, 131, 131, 131, 139, 0, 0, 0, - - 0, 0, 139, 139, 139, 139, 139, 139, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 139, 139, 139, 139, - 139, 145, 0, 0, 0, 0, 0, 145, 145, 145, - 145, 145, 145, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 145, 145, 145, 145, 145, 147, 0, 0, 0, - 0, 0, 147, 147, 147, 147, 147, 147, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 147, 147, 147, 147, - - 147, 148, 0, 0, 0, 0, 0, 148, 148, 148, - 148, 148, 148, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 148, 148, 148, 148, 148, 149, 0, 0, 0, - 0, 0, 149, 149, 149, 149, 149, 149, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 149, 149, 149, 149, - 149, 155, 0, 0, 0, 0, 0, 155, 155, 155, - 155, 155, 155, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 155, 155, 155, 155, 155, 157, 0, 0, 0, - 0, 0, 157, 157, 157, 157, 157, 157, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 157, 157, 157, 157, - 157, 164, 0, 0, 0, 0, 0, 164, 164, 164, - 164, 164, 164, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 164, 164, 164, 164, 164, 175, 175, 175, 175, - 175, 0, 175, 0, 0, 0, 175, 175, 175, 0, - 0, 0, 0, 0, 175, 0, 0, 0, 0, 0, - - 175, 175, 175, 175, 175, 175, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 175, 175, 175, 175, 175, 175, 176, - 0, 0, 0, 0, 0, 176, 176, 176, 176, 176, - 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 176, - 176, 176, 176, 176, 178, 0, 0, 0, 0, 0, - 178, 178, 178, 178, 178, 178, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 178, 178, 178, 178, 178, 179, - - 0, 0, 0, 0, 0, 179, 179, 179, 179, 179, - 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 179, - 179, 179, 179, 179, 180, 0, 0, 0, 0, 0, - 180, 180, 180, 180, 180, 180, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 180, 180, 180, 180, 180, 182, - 0, 0, 0, 0, 0, 182, 182, 182, 182, 182, - 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 182, - - 182, 182, 182, 182, 183, 0, 0, 0, 0, 0, - 183, 183, 183, 183, 183, 183, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 183, 183, 183, 183, 183, 189, - 0, 0, 0, 0, 0, 189, 189, 189, 189, 189, - 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, - 189, 189, 189, 189, 199, 199, 199, 199, 0, 0, - 199, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 199, 0, 0, 0, 0, 0, 199, 199, - - 199, 199, 199, 199, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 199, 199, 199, 199, 199, 199, 201, 201, 201, - 201, 0, 0, 0, 0, 0, 0, 201, 0, 0, - 0, 0, 0, 0, 0, 201, 0, 0, 0, 0, - 0, 201, 201, 201, 201, 201, 201, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 201, 201, 201, 201, 201, 201, - 206, 206, 206, 206, 206, 0, 206, 0, 0, 0, - 206, 0, 206, 0, 0, 0, 0, 0, 206, 0, - - 0, 0, 0, 0, 206, 206, 206, 206, 206, 206, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 206, 206, 206, - 206, 206, 206, 207, 207, 207, 207, 207, 0, 207, - 0, 0, 0, 207, 207, 207, 0, 0, 0, 0, - 0, 207, 0, 0, 0, 0, 0, 207, 207, 207, - 207, 207, 207, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 207, 207, 207, 207, 207, 207, 208, 0, 0, 0, - 0, 0, 208, 208, 208, 208, 208, 208, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 208, 208, 208, 208, - 208, 210, 0, 0, 0, 0, 0, 210, 210, 210, - 210, 210, 210, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 210, 210, 210, 210, 210, 211, 0, 0, 0, - 0, 0, 211, 211, 211, 211, 211, 211, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 211, 211, 211, 211, - 211, 212, 0, 0, 0, 0, 0, 212, 212, 212, - - 212, 212, 212, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 212, 212, 212, 212, 212, 213, 0, 0, 0, - 0, 0, 213, 213, 213, 213, 213, 213, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 213, 213, 213, 213, - 213, 214, 0, 0, 0, 0, 0, 214, 214, 214, - 214, 214, 214, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 214, 214, 214, 214, 214, 219, 0, 0, 0, - - 0, 0, 219, 219, 219, 219, 219, 219, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 219, 219, 219, 219, - 219, 232, 232, 232, 232, 232, 0, 232, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, - 0, 0, 0, 0, 0, 232, 232, 232, 232, 232, - 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 232, 232, - 232, 232, 232, 232, 233, 233, 233, 233, 0, 0, - 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 233, 0, 0, 0, 0, 0, 233, 233, - 233, 233, 233, 233, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 233, 233, 233, 233, 233, 233, 237, 237, 237, - 237, 237, 0, 0, 0, 0, 0, 237, 0, 0, - 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, - 0, 237, 237, 237, 237, 237, 237, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 237, 237, 237, 237, 237, 237, - 238, 238, 238, 238, 0, 0, 0, 0, 0, 0, - - 238, 0, 0, 0, 0, 0, 0, 0, 238, 0, - 0, 0, 0, 0, 238, 238, 238, 238, 238, 238, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 238, 238, 238, - 238, 238, 238, 239, 0, 0, 0, 0, 0, 239, - 239, 239, 239, 239, 239, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 239, 239, 239, 239, 239, 240, 0, - 0, 0, 0, 0, 240, 240, 240, 240, 240, 240, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, - 240, 240, 240, 242, 0, 0, 0, 0, 0, 242, - 242, 242, 242, 242, 242, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 242, 242, 242, 242, 242, 243, 0, - 0, 0, 0, 0, 243, 243, 243, 243, 243, 243, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 243, 243, - 243, 243, 243, 244, 0, 0, 0, 0, 0, 244, - 244, 244, 244, 244, 244, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 244, 244, 244, 244, 244, 245, 0, - 0, 0, 0, 0, 245, 245, 245, 245, 245, 245, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 245, 245, - 245, 245, 245, 246, 0, 0, 0, 0, 0, 246, - 246, 246, 246, 246, 246, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 246, 246, 246, 246, 246, 262, 0, - 0, 0, 0, 0, 262, 262, 262, 262, 262, 262, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 262, 262, - 262, 262, 262, 266, 0, 0, 0, 0, 0, 266, - 266, 266, 266, 266, 266, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 266, 266, 266, 266, 266, 267, 0, - 0, 0, 0, 0, 267, 267, 267, 267, 267, 267, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 267, 267, - 267, 267, 267, 273, 0, 0, 0, 0, 0, 273, - - 273, 273, 273, 273, 273, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 273, 273, 273, 273, 273, 274, 0, - 0, 0, 0, 0, 274, 274, 274, 274, 274, 274, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 274, 274, - 274, 274, 274, 275, 0, 0, 0, 0, 0, 275, - 275, 275, 275, 275, 275, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 275, 275, 275, 275, 275, 280, 0, - - 0, 0, 0, 0, 280, 280, 280, 280, 280, 280, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 280, 280, - 280, 280, 280, 281, 0, 0, 0, 0, 0, 281, - 281, 281, 281, 281, 281, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 281, 281, 281, 281, 281, 282, 0, - 0, 0, 0, 0, 282, 282, 282, 282, 282, 282, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 282, 282, - - 282, 282, 282, 284, 0, 0, 0, 0, 0, 284, - 284, 284, 284, 284, 284, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 284, 284, 284, 284, 284, 285, 0, - 0, 0, 0, 0, 285, 285, 285, 285, 285, 285, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 285, 285, - 285, 285, 285, 286, 0, 0, 0, 0, 0, 286, - 286, 286, 286, 286, 286, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 286, 286, 286, 286, 286, 292, 0, - 292, 292, 292, 292, 292, 292, 292, 293, 293, 0, - 293, 293, 294, 0, 294, 294, 294, 294, 294, 294, - 294, 295, 0, 0, 295, 295, 296, 296, 296, 0, - 296, 296, 297, 297, 297, 297, 297, 297, 297, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 299, 299, - 299, 299, 299, 299, 299, 300, 300, 300, 300, 300, - 300, 300, 300, 300, 301, 301, 301, 301, 301, 301, - 301, 301, 301, 301, 302, 302, 303, 303, 0, 303, - 303, 304, 304, 304, 304, 304, 304, 304, 305, 305, - - 305, 305, 305, 305, 305, 306, 306, 306, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 308, 308, - 308, 308, 308, 308, 308, 309, 309, 309, 309, 310, - 310, 310, 310, 310, 310, 310, 310, 310, 310, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 312, - 0, 312, 313, 313, 313, 313, 314, 314, 314, 0, - 314, 314, 314, 314, 314, 315, 0, 315, 316, 316, - 316, 316, 317, 0, 317, 317, 317, 317, 317, 317, - 317, 318, 0, 318, 318, 318, 318, 318, 318, 318, - 319, 319, 319, 319, 319, 319, 319, 319, 319, 320, - - 0, 320, 321, 321, 321, 321, 322, 322, 322, 322, - 322, 322, 322, 322, 322, 323, 323, 323, 323, 323, - 323, 323, 323, 323, 324, 0, 324, 325, 325, 325, - 325, 326, 0, 326, 327, 0, 327, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "css.grammar" -#line 1287 "lex.css.c" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - -int csslex_init (yyscan_t* scanner); - -int csslex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int csslex_destroy (yyscan_t yyscanner ); - -int cssget_debug (yyscan_t yyscanner ); - -void cssset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE cssget_extra (yyscan_t yyscanner ); - -void cssset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *cssget_in (yyscan_t yyscanner ); - -void cssset_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *cssget_out (yyscan_t yyscanner ); - -void cssset_out (FILE * out_str ,yyscan_t yyscanner ); - -yy_size_t cssget_leng (yyscan_t yyscanner ); - -char *cssget_text (yyscan_t yyscanner ); - -int cssget_lineno (yyscan_t yyscanner ); - -void cssset_lineno (int line_number ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int csswrap (yyscan_t yyscanner ); -#else -extern int csswrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int csslex (yyscan_t yyscanner); - -#define YY_DECL int csslex (yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -#line 21 "css.grammar" - - -#line 1509 "lex.css.c" - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - cssensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - css_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - css_load_buffer_state(yyscanner ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 292 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 3338 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -/* rule 1 can match eol */ -YY_RULE_SETUP -#line 23 "css.grammar" - - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP -#line 25 "css.grammar" -/* ignore comments */ - YY_BREAK -case 3: -YY_RULE_SETUP -#line 27 "css.grammar" - - YY_BREAK -case 4: -YY_RULE_SETUP -#line 28 "css.grammar" - - YY_BREAK -case 5: -YY_RULE_SETUP -#line 29 "css.grammar" - - YY_BREAK -case 6: -YY_RULE_SETUP -#line 30 "css.grammar" - - YY_BREAK -case 7: -/* rule 7 can match eol */ -YY_RULE_SETUP -#line 32 "css.grammar" -{cssConsume(yytext, STRING);} - YY_BREAK -case 8: -/* rule 8 can match eol */ -YY_RULE_SETUP -#line 34 "css.grammar" -{cssConsume(yytext, IDENT);} - YY_BREAK -case 9: -/* rule 9 can match eol */ -YY_RULE_SETUP -#line 36 "css.grammar" -{cssConsume(yytext, HASH);} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 38 "css.grammar" - - YY_BREAK -case 11: -YY_RULE_SETUP -#line 39 "css.grammar" - - YY_BREAK -case 12: -YY_RULE_SETUP -#line 40 "css.grammar" - - YY_BREAK -case 13: -YY_RULE_SETUP -#line 41 "css.grammar" - - YY_BREAK -case 14: -YY_RULE_SETUP -#line 42 "css.grammar" - - YY_BREAK -case 15: -YY_RULE_SETUP -#line 43 "css.grammar" - - YY_BREAK -case 16: -YY_RULE_SETUP -#line 45 "css.grammar" - - YY_BREAK -case 17: -YY_RULE_SETUP -#line 47 "css.grammar" -{cssConsume(yytext, EMS);} - YY_BREAK -case 18: -YY_RULE_SETUP -#line 48 "css.grammar" -{cssConsume(yytext, EXS);} - YY_BREAK -case 19: -YY_RULE_SETUP -#line 49 "css.grammar" -{cssConsume(yytext, LENGTH);} - YY_BREAK -case 20: -YY_RULE_SETUP -#line 50 "css.grammar" -{cssConsume(yytext, LENGTH);} - YY_BREAK -case 21: -YY_RULE_SETUP -#line 51 "css.grammar" -{cssConsume(yytext, LENGTH);} - YY_BREAK -case 22: -YY_RULE_SETUP -#line 52 "css.grammar" -{cssConsume(yytext, LENGTH);} - YY_BREAK -case 23: -YY_RULE_SETUP -#line 53 "css.grammar" -{cssConsume(yytext, LENGTH);} - YY_BREAK -case 24: -YY_RULE_SETUP -#line 54 "css.grammar" -{cssConsume(yytext, LENGTH);} - YY_BREAK -case 25: -YY_RULE_SETUP -#line 55 "css.grammar" -{cssConsume(yytext, ANGLE);} - YY_BREAK -case 26: -YY_RULE_SETUP -#line 56 "css.grammar" -{cssConsume(yytext, ANGLE);} - YY_BREAK -case 27: -YY_RULE_SETUP -#line 57 "css.grammar" -{cssConsume(yytext, ANGLE);} - YY_BREAK -case 28: -YY_RULE_SETUP -#line 58 "css.grammar" -{cssConsume(yytext, TIME);} - YY_BREAK -case 29: -YY_RULE_SETUP -#line 59 "css.grammar" -{cssConsume(yytext, TIME);} - YY_BREAK -case 30: -YY_RULE_SETUP -#line 60 "css.grammar" -{cssConsume(yytext, FREQ);} - YY_BREAK -case 31: -YY_RULE_SETUP -#line 61 "css.grammar" -{cssConsume(yytext, FREQ);} - YY_BREAK -case 32: -/* rule 32 can match eol */ -YY_RULE_SETUP -#line 62 "css.grammar" -{cssConsume(yytext, DIMEN);} - YY_BREAK -case 33: -YY_RULE_SETUP -#line 63 "css.grammar" -{cssConsume(yytext, PERCENTAGE);} - YY_BREAK -case 34: -YY_RULE_SETUP -#line 64 "css.grammar" -{cssConsume(yytext, NUMBER);} - YY_BREAK -case 35: -/* rule 35 can match eol */ -YY_RULE_SETUP -#line 66 "css.grammar" -{cssConsume(yytext, URI);} - YY_BREAK -case 36: -/* rule 36 can match eol */ -YY_RULE_SETUP -#line 67 "css.grammar" -{cssConsume(yytext, URI);} - YY_BREAK -case 37: -/* rule 37 can match eol */ -YY_RULE_SETUP -#line 68 "css.grammar" -{cssConsume(yytext, FUNCTION);} - YY_BREAK -case 38: -YY_RULE_SETUP -#line 70 "css.grammar" -{cssConsume(yytext, UNICODERANGE);} - YY_BREAK -case 39: -YY_RULE_SETUP -#line 71 "css.grammar" -{cssConsume(yytext, UNICODERANGE);} - YY_BREAK -case 40: -YY_RULE_SETUP -#line 73 "css.grammar" -{cssConsume(yytext, UNKNOWN);} - YY_BREAK -case 41: -YY_RULE_SETUP -#line 75 "css.grammar" -ECHO; - YY_BREAK -#line 1806 "lex.css.c" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * csslex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( csswrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of csslex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - cssrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - cssrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cssrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 292 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 292 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 291); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - cssrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( csswrap(yyscanner ) ) - return 0; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void cssrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - cssensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - css_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - css_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - css_load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void css_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * csspop_buffer_state(); - * csspush_buffer_state(new_buffer); - */ - cssensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - css_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (csswrap()) processing, but the only time this flag - * is looked at is after csswrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void css_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE css_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) cssalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in css_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) cssalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in css_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - css_init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with css_create_buffer() - * @param yyscanner The scanner object. - */ - void css_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - cssfree((void *) b->yy_ch_buf ,yyscanner ); - - cssfree((void *) b ,yyscanner ); -} - -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a cssrestart() or at EOF. - */ - static void css_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - css_flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then css_init_buffer was _probably_ - * called from cssrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void css_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - css_load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void csspush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - cssensure_buffer_stack(yyscanner); - - /* This block is copied from css_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from css_switch_to_buffer. */ - css_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void csspop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - css_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - css_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void cssensure_buffer_stack (yyscan_t yyscanner) -{ - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cssalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cssensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)cssrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in cssensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE css_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) cssalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in css_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - css_switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to csslex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * css_scan_bytes() instead. - */ -YY_BUFFER_STATE css_scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return css_scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to csslex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE css_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n, i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) cssalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in css_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = css_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in css_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE cssget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int cssget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int cssget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *cssget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *cssget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -yy_size_t cssget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *cssget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void cssset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void cssset_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cssset_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void cssset_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "cssset_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see css_switch_to_buffer - */ -void cssset_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void cssset_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int cssget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void cssset_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -/* User-visible API */ - -/* csslex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int csslex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cssalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* csslex_init_extra has the same functionality as csslex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to cssalloc in - * the yyextra field. - */ - -int csslex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - cssset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) cssalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - cssset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from csslex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * csslex_init() - */ - return 0; -} - -/* csslex_destroy is for both reentrant and non-reentrant scanners. */ -int csslex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - css_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - csspop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - cssfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - cssfree(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * csslex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - cssfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *cssalloc (yy_size_t size , yyscan_t yyscanner) -{ - return (void *) malloc( size ); -} - -void *cssrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void cssfree (void * ptr , yyscan_t yyscanner) -{ - free( (char *) ptr ); /* see cssrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 75 "css.grammar" - - - -int csswrap(yyscan_t yyscanner){return 1;} - - diff --git a/src/extThree20CSSStyle/Sources/CssTokenizer.m b/src/extThree20CSSStyle/Sources/CssTokenizer.m deleted file mode 100644 index 2689e482e9..0000000000 --- a/src/extThree20CSSStyle/Sources/CssTokenizer.m +++ /dev/null @@ -1,2943 +0,0 @@ -#include "extThree20CSSStyle/private/CssTokens.h" - -#line 3 "lex.css.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer css_create_buffer -#define yy_delete_buffer css_delete_buffer -#define yy_flex_debug css_flex_debug -#define yy_init_buffer css_init_buffer -#define yy_flush_buffer css_flush_buffer -#define yy_load_buffer_state css_load_buffer_state -#define yy_switch_to_buffer css_switch_to_buffer -#define yyin cssin -#define yyleng cssleng -#define yylex csslex -#define yylineno csslineno -#define yyout cssout -#define yyrestart cssrestart -#define yytext csstext -#define yywrap csswrap -#define yyalloc cssalloc -#define yyrealloc cssrealloc -#define yyfree cssfree - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE cssrestart(cssin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t cssleng; - -extern FILE *cssin, *cssout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up csstext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up csstext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via cssrestart()), so that the user can continue scanning by - * just pointing cssin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when csstext is formed. */ -static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t cssleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow csswrap()'s to do buffer switches - * instead of setting up a fresh cssin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void cssrestart (FILE *input_file ); -void css_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE css_create_buffer (FILE *file,int size ); -void css_delete_buffer (YY_BUFFER_STATE b ); -void css_flush_buffer (YY_BUFFER_STATE b ); -void csspush_buffer_state (YY_BUFFER_STATE new_buffer ); -void csspop_buffer_state (void ); - -static void cssensure_buffer_stack (void ); -static void css_load_buffer_state (void ); -static void css_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER css_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE css_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE css_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE css_scan_bytes (yyconst char *bytes,yy_size_t len ); - -void *cssalloc (yy_size_t ); -void *cssrealloc (void *,yy_size_t ); -void cssfree (void * ); - -#define yy_new_buffer css_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - cssensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - css_create_buffer(cssin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - cssensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - css_create_buffer(cssin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -FILE *cssin = (FILE *) 0, *cssout = (FILE *) 0; - -typedef int yy_state_type; - -extern int csslineno; - -int csslineno = 1; - -extern char *csstext; -#define yytext_ptr csstext - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up csstext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - cssleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 41 -#define YY_END_OF_BUFFER 42 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[312] = - { 0, - 0, 0, 42, 40, 1, 1, 40, 40, 40, 40, - 40, 40, 40, 34, 40, 40, 8, 8, 40, 40, - 40, 1, 0, 0, 7, 0, 9, 0, 0, 0, - 0, 0, 34, 8, 0, 34, 0, 33, 0, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 29, 0, 0, 0, 0, 0, 0, 0, 0, 37, - 8, 0, 0, 0, 8, 8, 8, 6, 5, 0, - 0, 0, 7, 0, 0, 9, 9, 0, 0, 7, - 0, 0, 4, 0, 0, 32, 0, 20, 32, 17, - 18, 32, 30, 22, 32, 21, 28, 24, 23, 19, - - 32, 32, 32, 0, 0, 0, 0, 0, 0, 0, - 0, 8, 0, 8, 8, 38, 38, 8, 8, 0, - 0, 0, 9, 0, 0, 0, 0, 2, 32, 32, - 25, 32, 31, 26, 32, 3, 0, 0, 0, 0, - 0, 0, 8, 0, 8, 8, 8, 0, 38, 38, - 38, 37, 8, 0, 0, 9, 0, 0, 0, 0, - 0, 2, 32, 27, 32, 0, 0, 0, 0, 0, - 11, 8, 8, 8, 8, 39, 38, 38, 38, 38, - 0, 0, 0, 0, 36, 0, 8, 0, 0, 9, - 0, 0, 32, 32, 0, 0, 0, 12, 0, 8, - - 8, 8, 39, 38, 38, 38, 38, 38, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, - 8, 0, 0, 9, 0, 32, 32, 0, 0, 10, - 0, 8, 8, 8, 39, 38, 38, 38, 38, 38, - 38, 0, 35, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 0, 0, 9, 0, 32, - 32, 14, 0, 0, 8, 8, 8, 39, 38, 38, - 38, 38, 38, 38, 38, 0, 35, 0, 0, 0, - 35, 0, 0, 0, 0, 32, 0, 0, 8, 8, - 39, 0, 0, 0, 0, 13, 15, 8, 39, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, - 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 4, 5, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 6, 7, 8, 9, 10, 11, 10, 12, 13, - 14, 15, 16, 10, 17, 18, 19, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 21, 10, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 36, 43, 44, 45, 46, 36, 47, 48, 36, 49, - 10, 50, 10, 10, 10, 10, 51, 28, 52, 53, - - 54, 55, 56, 57, 58, 36, 59, 60, 61, 62, - 63, 64, 36, 65, 66, 67, 68, 36, 69, 70, - 36, 71, 72, 73, 74, 75, 1, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76 - } ; - -static yyconst flex_int32_t yy_meta[77] = - { 0, - 1, 2, 3, 3, 3, 4, 4, 4, 4, 4, - 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, - 9, 4, 4, 4, 10, 4, 11, 11, 11, 11, - 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 4, 4, 4, 4, 12 - } ; - -static yyconst flex_int16_t yy_base[354] = - { 0, - 0, 0, 724, 4071, 75, 80, 650, 79, 670, 76, - 72, 699, 701, 119, 703, 167, 78, 184, 230, 686, - 685, 91, 51, 92, 4071, 284, 657, 320, 90, 374, - 682, 672, 0, 88, 410, 85, 676, 4071, 640, 639, - 71, 73, 153, 68, 63, 154, 74, 171, 223, 185, - 638, 446, 665, 183, 78, 152, 187, 193, 197, 4071, - 93, 176, 482, 656, 217, 94, 536, 4071, 4071, 606, - 248, 203, 246, 590, 644, 629, 698, 230, 196, 251, - 752, 806, 4071, 662, 224, 620, 842, 618, 214, 616, - 615, 249, 612, 606, 253, 605, 604, 603, 601, 589, - - 244, 588, 896, 620, 218, 255, 263, 276, 269, 276, - 293, 585, 932, 305, 986, 100, 603, 307, 1022, 284, - 257, 1058, 1094, 309, 1130, 601, 326, 4071, 565, 1184, - 563, 303, 561, 551, 1220, 4071, 279, 301, 317, 296, - 329, 330, 532, 1256, 531, 1310, 1346, 0, 345, 546, - 545, 385, 1382, 324, 1418, 1454, 1490, 554, 350, 454, - 377, 452, 1526, 384, 1562, 351, 416, 355, 380, 356, - 4071, 368, 1616, 1652, 1688, 0, 391, 357, 341, 339, - 407, 441, 317, 402, 4071, 1742, 1778, 390, 1814, 1850, - 1886, 441, 1922, 1958, 405, 416, 405, 4071, 416, 1994, - - 2030, 2066, 0, 462, 298, 266, 254, 253, 479, 373, - 501, 2120, 439, 2174, 600, 655, 709, 763, 2228, 2282, - 2318, 427, 2354, 2390, 2426, 2462, 2498, 425, 467, 4071, - 468, 2534, 2570, 2606, 0, 471, 247, 241, 173, 120, - 110, 518, 4071, 522, 478, 817, 2660, 2714, 505, 504, - 837, 2768, 2822, 2876, 2912, 483, 2948, 2984, 3020, 3056, - 3092, 4071, 498, 500, 3128, 3164, 541, 0, 99, 4071, - 4071, 4071, 4071, 4071, 4071, 903, 523, 550, 3200, 927, - 547, 549, 3236, 3272, 508, 574, 520, 529, 3308, 3344, - 0, 3380, 3416, 3452, 558, 4071, 4071, 621, 4071, 3488, - - 3524, 3560, 522, 3596, 3632, 3668, 562, 628, 681, 4071, - 4071, 3722, 3729, 3740, 3747, 3755, 3764, 3775, 3784, 3795, - 3807, 3809, 3816, 3825, 3832, 3841, 3846, 3857, 3866, 3873, - 3882, 3889, 3900, 3912, 3921, 3926, 3932, 3942, 3954, 3959, - 3965, 3975, 3986, 3997, 4002, 4008, 4018, 4029, 4034, 4040, - 4050, 4055, 4059 - } ; - -static yyconst flex_int16_t yy_def[354] = - { 0, - 311, 1, 311, 311, 311, 311, 311, 312, 313, 314, - 315, 311, 311, 311, 311, 311, 316, 316, 317, 311, - 311, 311, 311, 312, 311, 318, 313, 319, 314, 320, - 311, 311, 14, 316, 317, 14, 321, 311, 322, 323, - 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, - 323, 324, 311, 311, 311, 311, 311, 311, 311, 311, - 316, 325, 326, 327, 316, 316, 316, 311, 311, 311, - 312, 312, 312, 312, 318, 313, 313, 314, 314, 314, - 314, 320, 311, 321, 328, 323, 329, 323, 323, 323, - 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, - - 323, 323, 323, 311, 311, 311, 311, 311, 311, 311, - 325, 330, 331, 316, 67, 332, 311, 316, 67, 311, - 312, 74, 77, 314, 81, 333, 334, 311, 323, 103, - 323, 323, 323, 323, 103, 311, 311, 311, 311, 311, - 311, 311, 330, 335, 330, 330, 115, 336, 337, 311, - 311, 338, 67, 311, 74, 77, 81, 333, 339, 333, - 334, 333, 130, 323, 103, 311, 311, 311, 311, 311, - 311, 330, 146, 146, 115, 340, 341, 311, 311, 311, - 338, 338, 342, 343, 311, 344, 67, 311, 74, 77, - 81, 334, 130, 103, 311, 311, 311, 311, 311, 173, - - 146, 115, 345, 346, 311, 311, 311, 311, 311, 342, - 311, 347, 343, 348, 338, 338, 338, 338, 338, 344, - 67, 311, 74, 77, 81, 130, 103, 311, 311, 311, - 311, 173, 146, 115, 349, 350, 311, 311, 311, 311, - 311, 311, 311, 342, 342, 342, 342, 347, 343, 343, - 343, 343, 351, 338, 67, 311, 74, 77, 81, 130, - 103, 311, 311, 311, 173, 146, 255, 352, 311, 311, - 311, 311, 311, 311, 311, 342, 342, 342, 247, 343, - 343, 343, 252, 254, 311, 261, 311, 311, 173, 146, - 353, 247, 252, 254, 311, 311, 311, 290, 311, 247, - - 252, 254, 311, 247, 252, 254, 311, 342, 343, 311, - 0, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311 - } ; - -static yyconst flex_int16_t yy_nxt[4148] = - { 0, - 4, 5, 6, 5, 5, 5, 7, 8, 9, 4, - 4, 10, 4, 4, 4, 4, 11, 12, 13, 14, - 4, 15, 4, 4, 4, 16, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 18, 17, 17, 17, 19, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 18, 17, 17, - 17, 4, 20, 4, 21, 17, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 25, 25, 31, 32, - 60, 33, 22, 22, 22, 22, 22, 70, 62, 25, - - 60, 25, 311, 89, 36, 60, 60, 95, 62, 88, - 92, 93, 87, 62, 62, 148, 148, 87, 106, 70, - 87, 35, 87, 87, 150, 30, 89, 63, 26, 38, - 95, 88, 92, 93, 275, 39, 32, 63, 33, 30, - 106, 26, 63, 63, 274, 40, 40, 41, 42, 43, - 40, 44, 45, 46, 40, 47, 40, 48, 40, 40, - 49, 50, 51, 40, 40, 40, 40, 40, 52, 40, - 41, 42, 43, 40, 44, 45, 46, 47, 40, 48, - 40, 40, 49, 50, 51, 40, 40, 40, 40, 40, - 107, 90, 111, 94, 40, 54, 60, 273, 55, 64, - - 91, 56, 87, 87, 62, 57, 58, 25, 59, 96, - 25, 101, 107, 90, 97, 94, 105, 108, 54, 109, - 87, 55, 91, 110, 56, 113, 65, 57, 58, 60, - 59, 96, 29, 63, 87, 101, 97, 62, 127, 105, - 108, 25, 128, 109, 137, 30, 131, 110, 65, 67, - 24, 98, 26, 25, 118, 25, 67, 67, 67, 67, - 67, 67, 25, 87, 25, 272, 63, 99, 137, 131, - 100, 271, 87, 134, 98, 132, 118, 241, 240, 30, - 67, 67, 67, 67, 67, 24, 24, 24, 71, 99, - 239, 73, 100, 87, 138, 26, 134, 26, 87, 132, - - 30, 133, 87, 74, 139, 140, 26, 141, 142, 311, - 74, 74, 74, 74, 74, 74, 138, 60, 154, 152, - 25, 166, 238, 133, 211, 62, 139, 62, 140, 141, - 169, 142, 164, 75, 74, 74, 74, 74, 74, 77, - 161, 154, 113, 166, 162, 167, 77, 77, 77, 77, - 77, 77, 87, 169, 63, 164, 63, 168, 30, 170, - 171, 148, 188, 208, 192, 207, 212, 167, 128, 178, - 77, 77, 77, 77, 77, 29, 29, 29, 78, 168, - 211, 206, 170, 171, 188, 80, 181, 181, 181, 181, - 181, 161, 183, 81, 195, 162, 184, 197, 185, 199, - - 81, 81, 81, 81, 81, 81, 198, 148, 181, 181, - 181, 181, 181, 211, 183, 205, 195, 144, 184, 197, - 185, 199, 212, 82, 81, 81, 81, 81, 81, 67, - 198, 222, 196, 87, 186, 228, 67, 67, 67, 67, - 67, 67, 209, 209, 209, 209, 209, 229, 311, 230, - 211, 214, 311, 222, 185, 192, 186, 231, 228, 162, - 67, 67, 67, 67, 67, 103, 159, 256, 159, 262, - 229, 230, 103, 103, 103, 103, 103, 103, 148, 231, - 209, 209, 209, 209, 209, 211, 237, 148, 214, 256, - 186, 262, 185, 263, 264, 270, 103, 103, 103, 103, - - 103, 115, 242, 242, 242, 242, 242, 213, 115, 115, - 115, 115, 115, 115, 243, 211, 211, 263, 264, 242, - 242, 242, 242, 242, 210, 285, 287, 212, 288, 211, - 211, 243, 115, 115, 115, 115, 115, 66, 66, 66, - 66, 66, 114, 114, 114, 114, 114, 285, 60, 287, - 296, 288, 295, 214, 214, 119, 62, 211, 211, 297, - 211, 307, 119, 119, 119, 119, 119, 119, 159, 180, - 179, 212, 212, 296, 295, 129, 129, 129, 129, 129, - 144, 144, 297, 307, 303, 63, 119, 119, 119, 119, - 119, 72, 121, 121, 121, 72, 214, 25, 214, 212, - - 87, 209, 209, 209, 209, 209, 310, 311, 303, 122, - 87, 311, 87, 185, 87, 159, 122, 122, 122, 122, - 122, 122, 172, 172, 172, 172, 172, 151, 310, 245, - 278, 278, 278, 245, 144, 211, 136, 87, 87, 26, - 122, 122, 122, 122, 122, 24, 24, 24, 71, 186, - 87, 73, 87, 87, 87, 87, 209, 209, 209, 209, - 209, 87, 311, 74, 87, 87, 311, 87, 185, 87, - 74, 74, 74, 74, 74, 74, 85, 212, 28, 120, - 117, 104, 250, 282, 282, 282, 250, 87, 87, 52, - 85, 36, 211, 75, 74, 74, 74, 74, 74, 76, - - 76, 76, 76, 76, 186, 83, 28, 69, 68, 53, - 209, 209, 209, 209, 209, 37, 311, 123, 36, 28, - 311, 23, 185, 311, 123, 123, 123, 123, 123, 123, - 214, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 28, 123, 123, - 123, 123, 123, 79, 124, 124, 124, 79, 186, 311, - 311, 311, 311, 25, 209, 209, 209, 209, 209, 311, - 311, 125, 311, 311, 311, 311, 185, 311, 125, 125, - 125, 125, 125, 125, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 30, 125, 125, 125, 125, 125, 29, 29, 29, - 78, 311, 186, 311, 311, 311, 311, 80, 276, 242, - 242, 242, 276, 311, 211, 81, 311, 311, 311, 311, - 277, 311, 81, 81, 81, 81, 81, 81, 280, 242, - 242, 242, 280, 311, 311, 311, 311, 311, 211, 311, - 281, 311, 311, 311, 311, 82, 81, 81, 81, 81, - 81, 130, 311, 311, 311, 311, 212, 311, 130, 130, - 130, 130, 130, 130, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 214, 311, 311, 311, - 311, 311, 130, 130, 130, 130, 130, 102, 102, 102, - - 102, 102, 311, 311, 276, 242, 242, 242, 276, 311, - 211, 311, 311, 311, 311, 135, 277, 311, 311, 311, - 311, 311, 135, 135, 135, 135, 135, 135, 280, 242, - 242, 242, 280, 311, 311, 311, 311, 311, 211, 311, - 281, 311, 311, 311, 311, 87, 135, 135, 135, 135, - 135, 146, 212, 311, 311, 311, 311, 311, 146, 146, - 146, 146, 146, 146, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 214, 311, 311, 311, - 311, 311, 146, 146, 146, 146, 146, 114, 114, 114, - 114, 114, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 147, 311, 311, 311, 311, - 311, 311, 147, 147, 147, 147, 147, 147, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 147, 147, 147, 147, - 147, 153, 311, 311, 311, 311, 311, 311, 153, 153, - 153, 153, 153, 153, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 153, 153, 153, 153, 153, 155, 311, 311, - 311, 311, 311, 311, 155, 155, 155, 155, 155, 155, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 155, 155, - 155, 155, 155, 156, 311, 311, 311, 311, 311, 311, - 156, 156, 156, 156, 156, 156, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 156, 156, 156, 156, 156, 157, - 311, 311, 311, 311, 311, 311, 157, 157, 157, 157, - 157, 157, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 157, 157, 157, 157, 157, 129, 129, 129, 129, 129, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 163, 311, 311, 311, 311, 311, 311, - 163, 163, 163, 163, 163, 163, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 163, 163, 163, 163, 163, 165, - 311, 311, 311, 311, 311, 311, 165, 165, 165, 165, - 165, 165, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 165, 165, 165, 165, 165, 173, 311, 311, 311, 311, - 311, 311, 173, 173, 173, 173, 173, 173, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 173, 173, 173, 173, - 173, 145, 145, 145, 145, 145, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 174, - 311, 311, 311, 311, 311, 311, 174, 174, 174, 174, - 174, 174, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 144, - 174, 174, 174, 174, 174, 175, 311, 311, 311, 311, - 311, 311, 175, 175, 175, 175, 175, 175, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 175, 175, 175, 175, - - 175, 187, 311, 311, 311, 311, 311, 311, 187, 187, - 187, 187, 187, 187, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 187, 187, 187, 187, 187, 189, 311, 311, - 311, 311, 311, 311, 189, 189, 189, 189, 189, 189, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 189, 189, - 189, 189, 189, 190, 311, 311, 311, 311, 311, 311, - 190, 190, 190, 190, 190, 190, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 190, 190, 190, 190, 190, 191, - 311, 311, 311, 311, 311, 311, 191, 191, 191, 191, - 191, 191, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 191, 191, 191, 191, 191, 193, 311, 311, 311, 311, - 311, 311, 193, 193, 193, 193, 193, 193, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 193, 193, 193, 193, - 193, 194, 311, 311, 311, 311, 311, 311, 194, 194, - 194, 194, 194, 194, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 194, 194, 194, 194, 194, 172, 172, 172, - 172, 172, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 200, 311, 311, 311, 311, - 311, 311, 200, 200, 200, 200, 200, 200, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 200, 200, 200, 200, - 200, 201, 311, 311, 311, 311, 311, 311, 201, 201, - 201, 201, 201, 201, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 201, 201, 201, 201, 201, 202, 311, 311, - 311, 311, 311, 311, 202, 202, 202, 202, 202, 202, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 202, 202, - 202, 202, 202, 209, 209, 209, 209, 215, 311, 217, - 311, 311, 311, 217, 217, 218, 311, 311, 311, 311, - 311, 219, 311, 311, 311, 311, 311, 311, 219, 219, - 219, 219, 219, 219, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 220, 219, 219, 219, 219, 219, 221, 311, 311, - - 311, 311, 311, 311, 221, 221, 221, 221, 221, 221, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 221, 221, - 221, 221, 221, 223, 311, 311, 311, 311, 311, 311, - 223, 223, 223, 223, 223, 223, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 223, 223, 223, 223, 223, 224, - 311, 311, 311, 311, 311, 311, 224, 224, 224, 224, - 224, 224, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 224, 224, 224, 224, 224, 225, 311, 311, 311, 311, - 311, 311, 225, 225, 225, 225, 225, 225, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 225, 225, 225, 225, - 225, 226, 311, 311, 311, 311, 311, 311, 226, 226, - 226, 226, 226, 226, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 226, 226, 226, 226, 226, 227, 311, 311, - 311, 311, 311, 311, 227, 227, 227, 227, 227, 227, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 227, 227, - 227, 227, 227, 232, 311, 311, 311, 311, 311, 311, - 232, 232, 232, 232, 232, 232, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 232, 232, 232, 232, 232, 233, - 311, 311, 311, 311, 311, 311, 233, 233, 233, 233, - 233, 233, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 233, 233, 233, 233, 233, 234, 311, 311, 311, 311, - 311, 311, 234, 234, 234, 234, 234, 234, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 234, 234, 234, 234, - 234, 210, 210, 210, 244, 311, 311, 246, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 247, - 311, 311, 311, 311, 311, 311, 247, 247, 247, 247, - 247, 247, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 248, - 247, 247, 247, 247, 247, 213, 213, 213, 249, 311, - 311, 311, 311, 311, 311, 251, 311, 311, 311, 311, - 311, 311, 311, 252, 311, 311, 311, 311, 311, 311, - - 252, 252, 252, 252, 252, 252, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 253, 252, 252, 252, 252, 252, 215, - 215, 215, 215, 215, 311, 311, 311, 311, 311, 311, - 311, 185, 311, 311, 311, 311, 311, 254, 311, 311, - 311, 311, 311, 311, 254, 254, 254, 254, 254, 254, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 186, 254, 254, - 254, 254, 254, 209, 209, 209, 209, 215, 311, 217, - 311, 311, 311, 217, 217, 218, 311, 311, 311, 311, - - 311, 219, 311, 311, 311, 311, 311, 311, 219, 219, - 219, 219, 219, 219, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 220, 219, 219, 219, 219, 219, 255, 311, 311, - 311, 311, 311, 311, 255, 255, 255, 255, 255, 255, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 255, 255, - 255, 255, 255, 257, 311, 311, 311, 311, 311, 311, - 257, 257, 257, 257, 257, 257, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 257, 257, 257, 257, 257, 258, - 311, 311, 311, 311, 311, 311, 258, 258, 258, 258, - 258, 258, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 258, 258, 258, 258, 258, 259, 311, 311, 311, 311, - 311, 311, 259, 259, 259, 259, 259, 259, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 259, 259, 259, 259, - 259, 260, 311, 311, 311, 311, 311, 311, 260, 260, - 260, 260, 260, 260, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 260, 260, 260, 260, 260, 261, 311, 311, - 311, 311, 311, 311, 261, 261, 261, 261, 261, 261, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 261, 261, - 261, 261, 261, 265, 311, 311, 311, 311, 311, 311, - 265, 265, 265, 265, 265, 265, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 265, 265, 265, 265, 265, 266, - 311, 311, 311, 311, 311, 311, 266, 266, 266, 266, - - 266, 266, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 266, 266, 266, 266, 266, 267, 311, 311, 311, 311, - 311, 311, 267, 267, 267, 267, 267, 267, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 267, 267, 267, 267, - 267, 245, 278, 278, 278, 245, 311, 211, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 279, - 311, 311, 311, 311, 311, 311, 279, 279, 279, 279, - 279, 279, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 212, - 279, 279, 279, 279, 279, 210, 210, 210, 244, 311, - 311, 246, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 247, 311, 311, 311, 311, 311, 311, - 247, 247, 247, 247, 247, 247, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 248, 247, 247, 247, 247, 247, 250, - 282, 282, 282, 250, 311, 311, 311, 311, 311, 211, - 311, 311, 311, 311, 311, 311, 311, 283, 311, 311, - 311, 311, 311, 311, 283, 283, 283, 283, 283, 283, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 214, 283, 283, - 283, 283, 283, 213, 213, 213, 249, 311, 311, 311, - 311, 311, 311, 251, 311, 311, 311, 311, 311, 311, - 311, 252, 311, 311, 311, 311, 311, 311, 252, 252, - 252, 252, 252, 252, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 253, 252, 252, 252, 252, 252, 215, 215, 215, - 215, 215, 311, 311, 311, 311, 311, 311, 311, 185, - 311, 311, 311, 311, 311, 284, 311, 311, 311, 311, - - 311, 311, 284, 284, 284, 284, 284, 284, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 186, 284, 284, 284, 284, - 284, 61, 311, 311, 311, 311, 311, 311, 61, 61, - 61, 61, 61, 61, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 61, 61, 61, 61, 61, 24, 311, 311, - 311, 311, 311, 311, 24, 24, 24, 24, 24, 24, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 24, 24, - - 24, 24, 24, 27, 311, 311, 311, 311, 311, 311, - 27, 27, 27, 27, 27, 27, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 27, 27, 27, 27, 27, 29, - 311, 311, 311, 311, 311, 311, 29, 29, 29, 29, - 29, 29, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 29, 29, 29, 29, 29, 286, 311, 311, 311, 311, - 311, 311, 286, 286, 286, 286, 286, 286, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 286, 286, 286, 286, - 286, 86, 311, 311, 311, 311, 311, 311, 86, 86, - 86, 86, 86, 86, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 86, 86, 86, 86, 86, 289, 311, 311, - 311, 311, 311, 311, 289, 289, 289, 289, 289, 289, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 289, 289, - 289, 289, 289, 290, 311, 311, 311, 311, 311, 311, - 290, 290, 290, 290, 290, 290, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 290, 290, 290, 290, 290, 292, - 311, 311, 311, 311, 311, 311, 292, 292, 292, 292, - 292, 292, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 292, 292, 292, 292, 292, 293, 311, 311, 311, 311, - 311, 311, 293, 293, 293, 293, 293, 293, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 293, 293, 293, 293, - 293, 294, 311, 311, 311, 311, 311, 311, 294, 294, - - 294, 294, 294, 294, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 294, 294, 294, 294, 294, 298, 311, 311, - 311, 311, 311, 311, 298, 298, 298, 298, 298, 298, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 298, 298, - 298, 298, 298, 143, 311, 311, 311, 311, 311, 311, - 143, 143, 143, 143, 143, 143, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 143, 143, 143, 143, 143, 300, - - 311, 311, 311, 311, 311, 311, 300, 300, 300, 300, - 300, 300, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 300, 300, 300, 300, 300, 301, 311, 311, 311, 311, - 311, 311, 301, 301, 301, 301, 301, 301, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 301, 301, 301, 301, - 301, 302, 311, 311, 311, 311, 311, 311, 302, 302, - 302, 302, 302, 302, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 302, 302, 302, 302, 302, 304, 311, 311, - 311, 311, 311, 311, 304, 304, 304, 304, 304, 304, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 304, 304, - 304, 304, 304, 305, 311, 311, 311, 311, 311, 311, - 305, 305, 305, 305, 305, 305, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 305, 305, 305, 305, 305, 306, - 311, 311, 311, 311, 311, 311, 306, 306, 306, 306, - 306, 306, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 306, 306, 306, 306, 306, 308, 311, 311, 311, 311, - 311, 311, 308, 308, 308, 308, 308, 308, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 308, 308, 308, 308, - 308, 309, 311, 311, 311, 311, 311, 311, 309, 309, - 309, 309, 309, 309, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 309, 309, 309, 309, 309, 182, 311, 311, - 311, 311, 311, 311, 182, 182, 182, 182, 182, 182, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 182, 182, - 182, 182, 182, 24, 311, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 27, 311, 27, 311, 311, 27, - 27, 29, 311, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 34, 34, 34, 311, 311, 34, 34, 61, - 61, 311, 61, 61, 311, 61, 61, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 76, 76, 76, - 76, 76, 76, 76, 76, 76, 79, 79, 79, 79, - - 79, 79, 79, 79, 79, 79, 79, 84, 84, 84, - 84, 84, 84, 84, 84, 84, 84, 84, 84, 40, - 40, 86, 311, 86, 311, 311, 86, 86, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 112, 311, 311, - 311, 311, 112, 112, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 116, 311, 116, 116, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 143, 311, - 143, 311, 311, 143, 143, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 149, 311, 149, 311, 149, 149, - - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 176, 311, 311, 176, 177, 311, 177, - 311, 177, 177, 182, 182, 182, 311, 182, 182, 182, - 182, 182, 182, 182, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 203, 311, 311, 203, - 204, 311, 204, 311, 204, 204, 210, 311, 210, 210, - 210, 210, 210, 210, 210, 210, 210, 213, 311, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 216, 216, - - 216, 216, 216, 216, 216, 216, 216, 216, 216, 235, - 311, 311, 235, 236, 311, 236, 311, 236, 236, 245, - 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 268, 311, 311, 268, 269, 311, 269, 311, 269, - 269, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 291, 311, 311, 291, 299, 311, 311, 299, - 3, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311 - } ; - -static yyconst flex_int16_t yy_chk[4148] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, - 5, 6, 6, 6, 6, 6, 8, 10, 11, 11, - 17, 11, 22, 22, 22, 22, 22, 23, 17, 24, - - 34, 29, 36, 42, 36, 61, 66, 47, 34, 41, - 44, 45, 45, 61, 66, 269, 116, 44, 55, 23, - 41, 11, 42, 47, 116, 10, 42, 17, 8, 14, - 47, 41, 44, 45, 241, 14, 14, 34, 14, 29, - 55, 24, 61, 66, 240, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 56, 43, 62, 46, 14, 16, 18, 239, 16, 18, - - 43, 16, 43, 46, 18, 16, 16, 79, 16, 48, - 72, 50, 56, 43, 48, 46, 54, 57, 16, 58, - 48, 16, 43, 59, 16, 62, 18, 16, 16, 65, - 16, 48, 78, 18, 50, 50, 48, 65, 85, 54, - 57, 78, 85, 58, 105, 79, 89, 59, 18, 19, - 71, 49, 72, 73, 65, 71, 19, 19, 19, 19, - 19, 19, 80, 89, 121, 238, 65, 49, 105, 89, - 49, 237, 49, 101, 49, 92, 65, 208, 207, 78, - 19, 19, 19, 19, 19, 26, 26, 26, 26, 49, - 206, 26, 49, 101, 106, 73, 101, 71, 92, 92, - - 80, 95, 95, 26, 107, 108, 121, 109, 110, 111, - 26, 26, 26, 26, 26, 26, 106, 114, 120, 118, - 124, 137, 205, 95, 183, 114, 107, 118, 108, 109, - 140, 110, 132, 26, 26, 26, 26, 26, 26, 28, - 127, 120, 111, 137, 127, 138, 28, 28, 28, 28, - 28, 28, 132, 140, 114, 132, 118, 139, 124, 141, - 142, 149, 154, 180, 159, 179, 183, 138, 159, 149, - 28, 28, 28, 28, 28, 30, 30, 30, 30, 139, - 210, 178, 141, 142, 154, 30, 152, 152, 152, 152, - 152, 161, 152, 30, 166, 161, 152, 168, 152, 170, - - 30, 30, 30, 30, 30, 30, 169, 177, 181, 181, - 181, 181, 181, 184, 181, 177, 166, 172, 181, 168, - 181, 170, 210, 30, 30, 30, 30, 30, 30, 35, - 169, 188, 167, 164, 152, 195, 35, 35, 35, 35, - 35, 35, 182, 182, 182, 182, 182, 196, 182, 197, - 213, 184, 182, 188, 182, 192, 181, 199, 195, 192, - 35, 35, 35, 35, 35, 52, 162, 222, 160, 228, - 196, 197, 52, 52, 52, 52, 52, 52, 204, 199, - 209, 209, 209, 209, 209, 245, 204, 236, 213, 222, - 182, 228, 209, 229, 231, 236, 52, 52, 52, 52, - - 52, 63, 211, 211, 211, 211, 211, 249, 63, 63, - 63, 63, 63, 63, 211, 250, 249, 229, 231, 242, - 242, 242, 242, 242, 244, 256, 263, 245, 264, 244, - 277, 242, 63, 63, 63, 63, 63, 67, 67, 67, - 67, 67, 267, 267, 267, 267, 267, 256, 67, 263, - 287, 264, 285, 250, 249, 67, 67, 278, 281, 288, - 282, 303, 67, 67, 67, 67, 67, 67, 158, 151, - 150, 244, 277, 287, 285, 286, 286, 286, 286, 286, - 145, 143, 288, 303, 295, 67, 67, 67, 67, 67, - 67, 74, 74, 74, 74, 74, 281, 74, 282, 278, - - 134, 215, 215, 215, 215, 215, 307, 215, 295, 74, - 133, 215, 131, 215, 129, 126, 74, 74, 74, 74, - 74, 74, 298, 298, 298, 298, 298, 117, 307, 308, - 308, 308, 308, 308, 112, 308, 104, 102, 100, 74, - 74, 74, 74, 74, 74, 75, 75, 75, 75, 215, - 99, 75, 98, 97, 96, 94, 216, 216, 216, 216, - 216, 93, 216, 75, 91, 90, 216, 88, 216, 86, - 75, 75, 75, 75, 75, 75, 84, 308, 76, 70, - 64, 53, 309, 309, 309, 309, 309, 51, 40, 39, - 37, 32, 309, 75, 75, 75, 75, 75, 75, 77, - - 77, 77, 77, 77, 216, 31, 27, 21, 20, 15, - 217, 217, 217, 217, 217, 13, 217, 77, 12, 9, - 217, 7, 217, 3, 77, 77, 77, 77, 77, 77, - 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 77, 77, 77, - 77, 77, 77, 81, 81, 81, 81, 81, 217, 0, - 0, 0, 0, 81, 218, 218, 218, 218, 218, 0, - 218, 81, 0, 0, 218, 0, 218, 0, 81, 81, - 81, 81, 81, 81, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 81, 81, 81, 81, 81, 81, 82, 82, 82, - 82, 0, 218, 0, 0, 0, 0, 82, 246, 246, - 246, 246, 246, 0, 246, 82, 0, 0, 0, 0, - 246, 0, 82, 82, 82, 82, 82, 82, 251, 251, - 251, 251, 251, 0, 0, 0, 0, 0, 251, 0, - 251, 0, 0, 0, 0, 82, 82, 82, 82, 82, - 82, 87, 0, 0, 0, 0, 246, 0, 87, 87, - 87, 87, 87, 87, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 251, 0, 0, 0, - 0, 0, 87, 87, 87, 87, 87, 103, 103, 103, - - 103, 103, 0, 0, 276, 276, 276, 276, 276, 0, - 276, 0, 0, 0, 0, 103, 276, 0, 0, 0, - 0, 0, 103, 103, 103, 103, 103, 103, 280, 280, - 280, 280, 280, 0, 0, 0, 0, 0, 280, 0, - 280, 0, 0, 0, 0, 103, 103, 103, 103, 103, - 103, 113, 276, 0, 0, 0, 0, 0, 113, 113, - 113, 113, 113, 113, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 280, 0, 0, 0, - 0, 0, 113, 113, 113, 113, 113, 115, 115, 115, - 115, 115, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, - 0, 0, 115, 115, 115, 115, 115, 115, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 115, 115, 115, 115, - 115, 119, 0, 0, 0, 0, 0, 0, 119, 119, - 119, 119, 119, 119, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 119, 119, 119, 119, 119, 122, 0, 0, - 0, 0, 0, 0, 122, 122, 122, 122, 122, 122, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 122, 122, - 122, 122, 122, 123, 0, 0, 0, 0, 0, 0, - 123, 123, 123, 123, 123, 123, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 123, 123, 123, 123, 123, 125, - 0, 0, 0, 0, 0, 0, 125, 125, 125, 125, - 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 125, 125, 125, 125, 125, 130, 130, 130, 130, 130, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 130, 0, 0, 0, 0, 0, 0, - 130, 130, 130, 130, 130, 130, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 130, 130, 130, 130, 130, 135, - 0, 0, 0, 0, 0, 0, 135, 135, 135, 135, - 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 135, 135, 135, 135, 135, 144, 0, 0, 0, 0, - 0, 0, 144, 144, 144, 144, 144, 144, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, - 144, 146, 146, 146, 146, 146, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, - 0, 0, 0, 0, 0, 0, 146, 146, 146, 146, - 146, 146, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 146, - 146, 146, 146, 146, 146, 147, 0, 0, 0, 0, - 0, 0, 147, 147, 147, 147, 147, 147, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 147, 147, 147, 147, - - 147, 153, 0, 0, 0, 0, 0, 0, 153, 153, - 153, 153, 153, 153, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 153, 153, 153, 153, 153, 155, 0, 0, - 0, 0, 0, 0, 155, 155, 155, 155, 155, 155, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 155, 155, - 155, 155, 155, 156, 0, 0, 0, 0, 0, 0, - 156, 156, 156, 156, 156, 156, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 156, 156, 156, 156, 156, 157, - 0, 0, 0, 0, 0, 0, 157, 157, 157, 157, - 157, 157, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 157, 157, 157, 157, 157, 163, 0, 0, 0, 0, - 0, 0, 163, 163, 163, 163, 163, 163, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 163, 163, 163, 163, - 163, 165, 0, 0, 0, 0, 0, 0, 165, 165, - 165, 165, 165, 165, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 165, 165, 165, 165, 165, 173, 173, 173, - 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 173, 0, 0, 0, 0, - 0, 0, 173, 173, 173, 173, 173, 173, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 173, 173, 173, 173, - 173, 174, 0, 0, 0, 0, 0, 0, 174, 174, - 174, 174, 174, 174, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 174, 174, 174, 174, 174, 175, 0, 0, - 0, 0, 0, 0, 175, 175, 175, 175, 175, 175, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 175, 175, - 175, 175, 175, 186, 186, 186, 186, 186, 0, 186, - 0, 0, 0, 186, 186, 186, 0, 0, 0, 0, - 0, 186, 0, 0, 0, 0, 0, 0, 186, 186, - 186, 186, 186, 186, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 186, 186, 186, 186, 186, 186, 187, 0, 0, - - 0, 0, 0, 0, 187, 187, 187, 187, 187, 187, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 187, 187, - 187, 187, 187, 189, 0, 0, 0, 0, 0, 0, - 189, 189, 189, 189, 189, 189, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 189, 189, 189, 189, 189, 190, - 0, 0, 0, 0, 0, 0, 190, 190, 190, 190, - 190, 190, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 190, 190, 190, 190, 190, 191, 0, 0, 0, 0, - 0, 0, 191, 191, 191, 191, 191, 191, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 191, 191, 191, 191, - 191, 193, 0, 0, 0, 0, 0, 0, 193, 193, - 193, 193, 193, 193, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 193, 193, 193, 193, 193, 194, 0, 0, - 0, 0, 0, 0, 194, 194, 194, 194, 194, 194, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 194, 194, - 194, 194, 194, 200, 0, 0, 0, 0, 0, 0, - 200, 200, 200, 200, 200, 200, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 200, 200, 200, 200, 200, 201, - 0, 0, 0, 0, 0, 0, 201, 201, 201, 201, - 201, 201, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 201, 201, 201, 201, 201, 202, 0, 0, 0, 0, - 0, 0, 202, 202, 202, 202, 202, 202, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 202, 202, 202, 202, - 202, 212, 212, 212, 212, 0, 0, 212, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, - 0, 0, 0, 0, 0, 0, 212, 212, 212, 212, - 212, 212, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, - 212, 212, 212, 212, 212, 214, 214, 214, 214, 0, - 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, - 0, 0, 0, 214, 0, 0, 0, 0, 0, 0, - - 214, 214, 214, 214, 214, 214, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 214, 214, 214, 214, 214, 214, 219, - 219, 219, 219, 219, 0, 219, 0, 0, 0, 219, - 0, 219, 0, 0, 0, 0, 0, 219, 0, 0, - 0, 0, 0, 0, 219, 219, 219, 219, 219, 219, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 219, 219, 219, - 219, 219, 219, 220, 220, 220, 220, 220, 0, 220, - 0, 0, 0, 220, 220, 220, 0, 0, 0, 0, - - 0, 220, 0, 0, 0, 0, 0, 0, 220, 220, - 220, 220, 220, 220, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 220, 220, 220, 220, 220, 220, 221, 0, 0, - 0, 0, 0, 0, 221, 221, 221, 221, 221, 221, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 221, 221, - 221, 221, 221, 223, 0, 0, 0, 0, 0, 0, - 223, 223, 223, 223, 223, 223, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 223, 223, 223, 223, 223, 224, - 0, 0, 0, 0, 0, 0, 224, 224, 224, 224, - 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 224, 224, 224, 224, 224, 225, 0, 0, 0, 0, - 0, 0, 225, 225, 225, 225, 225, 225, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 225, 225, 225, 225, - 225, 226, 0, 0, 0, 0, 0, 0, 226, 226, - 226, 226, 226, 226, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 226, 226, 226, 226, 226, 227, 0, 0, - 0, 0, 0, 0, 227, 227, 227, 227, 227, 227, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 227, 227, - 227, 227, 227, 232, 0, 0, 0, 0, 0, 0, - 232, 232, 232, 232, 232, 232, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 232, 232, 232, 232, 232, 233, - 0, 0, 0, 0, 0, 0, 233, 233, 233, 233, - - 233, 233, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 233, 233, 233, 233, 233, 234, 0, 0, 0, 0, - 0, 0, 234, 234, 234, 234, 234, 234, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 234, 234, 234, 234, - 234, 247, 247, 247, 247, 247, 0, 247, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, - 0, 0, 0, 0, 0, 0, 247, 247, 247, 247, - 247, 247, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, - 247, 247, 247, 247, 247, 248, 248, 248, 248, 0, - 0, 248, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 248, 0, 0, 0, 0, 0, 0, - 248, 248, 248, 248, 248, 248, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 248, 248, 248, 248, 248, 248, 252, - 252, 252, 252, 252, 0, 0, 0, 0, 0, 252, - 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, - 0, 0, 0, 0, 252, 252, 252, 252, 252, 252, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 252, 252, 252, - 252, 252, 252, 253, 253, 253, 253, 0, 0, 0, - 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, - 0, 253, 0, 0, 0, 0, 0, 0, 253, 253, - 253, 253, 253, 253, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 253, 253, 253, 253, 253, 253, 254, 254, 254, - 254, 254, 0, 254, 0, 0, 0, 254, 0, 254, - 0, 0, 0, 0, 0, 254, 0, 0, 0, 0, - - 0, 0, 254, 254, 254, 254, 254, 254, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 254, 254, 254, 254, 254, - 254, 255, 0, 0, 0, 0, 0, 0, 255, 255, - 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 255, 255, 255, 255, 257, 0, 0, - 0, 0, 0, 0, 257, 257, 257, 257, 257, 257, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 257, 257, - - 257, 257, 257, 258, 0, 0, 0, 0, 0, 0, - 258, 258, 258, 258, 258, 258, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 258, 258, 258, 258, 258, 259, - 0, 0, 0, 0, 0, 0, 259, 259, 259, 259, - 259, 259, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 259, 259, 259, 259, 259, 260, 0, 0, 0, 0, - 0, 0, 260, 260, 260, 260, 260, 260, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 260, 260, 260, 260, - 260, 261, 0, 0, 0, 0, 0, 0, 261, 261, - 261, 261, 261, 261, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 261, 261, 261, 261, 261, 265, 0, 0, - 0, 0, 0, 0, 265, 265, 265, 265, 265, 265, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 265, 265, - 265, 265, 265, 266, 0, 0, 0, 0, 0, 0, - 266, 266, 266, 266, 266, 266, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 266, 266, 266, 266, 266, 279, - 0, 0, 0, 0, 0, 0, 279, 279, 279, 279, - 279, 279, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 279, 279, 279, 279, 279, 283, 0, 0, 0, 0, - 0, 0, 283, 283, 283, 283, 283, 283, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 283, 283, 283, 283, - 283, 284, 0, 0, 0, 0, 0, 0, 284, 284, - - 284, 284, 284, 284, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 284, 284, 284, 284, 284, 289, 0, 0, - 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 289, 289, - 289, 289, 289, 290, 0, 0, 0, 0, 0, 0, - 290, 290, 290, 290, 290, 290, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 290, 290, 290, 290, 290, 292, - - 0, 0, 0, 0, 0, 0, 292, 292, 292, 292, - 292, 292, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 292, 292, 292, 292, 292, 293, 0, 0, 0, 0, - 0, 0, 293, 293, 293, 293, 293, 293, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 293, 293, 293, 293, - 293, 294, 0, 0, 0, 0, 0, 0, 294, 294, - 294, 294, 294, 294, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 294, 294, 294, 294, 294, 300, 0, 0, - 0, 0, 0, 0, 300, 300, 300, 300, 300, 300, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 300, 300, - 300, 300, 300, 301, 0, 0, 0, 0, 0, 0, - 301, 301, 301, 301, 301, 301, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 301, 301, 301, 301, 301, 302, - 0, 0, 0, 0, 0, 0, 302, 302, 302, 302, - 302, 302, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 302, 302, 302, 302, 302, 304, 0, 0, 0, 0, - 0, 0, 304, 304, 304, 304, 304, 304, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 304, 304, 304, 304, - 304, 305, 0, 0, 0, 0, 0, 0, 305, 305, - 305, 305, 305, 305, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 305, 305, 305, 305, 305, 306, 0, 0, - 0, 0, 0, 0, 306, 306, 306, 306, 306, 306, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 306, 306, - 306, 306, 306, 312, 0, 312, 312, 312, 312, 312, - 312, 312, 312, 312, 313, 0, 313, 0, 0, 313, - 313, 314, 0, 314, 314, 314, 314, 314, 314, 314, - 314, 314, 315, 315, 315, 0, 0, 315, 315, 316, - 316, 0, 316, 316, 0, 316, 316, 317, 317, 317, - 317, 317, 317, 317, 317, 317, 318, 318, 318, 318, - 318, 318, 318, 318, 318, 318, 318, 319, 319, 319, - 319, 319, 319, 319, 319, 319, 320, 320, 320, 320, - - 320, 320, 320, 320, 320, 320, 320, 321, 321, 321, - 321, 321, 321, 321, 321, 321, 321, 321, 321, 322, - 322, 323, 0, 323, 0, 0, 323, 323, 324, 324, - 324, 324, 324, 324, 324, 324, 324, 325, 0, 0, - 0, 0, 325, 325, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 327, 0, 327, 327, 328, 328, 328, - 328, 328, 328, 328, 328, 328, 328, 328, 328, 329, - 329, 329, 329, 329, 329, 329, 329, 329, 330, 0, - 330, 0, 0, 330, 330, 331, 331, 331, 331, 331, - 331, 331, 331, 331, 332, 0, 332, 0, 332, 332, - - 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, - 333, 333, 334, 334, 334, 334, 334, 334, 334, 334, - 334, 334, 334, 334, 335, 335, 335, 335, 335, 335, - 335, 335, 335, 336, 0, 0, 336, 337, 0, 337, - 0, 337, 337, 338, 338, 338, 0, 338, 338, 338, - 338, 338, 338, 338, 339, 339, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 339, 340, 0, 0, 340, - 341, 0, 341, 0, 341, 341, 342, 0, 342, 342, - 342, 342, 342, 342, 342, 342, 342, 343, 0, 343, - 343, 343, 343, 343, 343, 343, 343, 343, 344, 344, - - 344, 344, 344, 344, 344, 344, 344, 344, 344, 345, - 0, 0, 345, 346, 0, 346, 0, 346, 346, 347, - 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, - 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, - 348, 349, 0, 0, 349, 350, 0, 350, 0, 350, - 350, 351, 351, 351, 351, 351, 351, 351, 351, 351, - 351, 351, 352, 0, 0, 352, 353, 0, 0, 353, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, - 311, 311, 311, 311, 311, 311, 311 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int css_flex_debug; -int css_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *csstext; -#line 1 "css.grammar" -#line 1495 "lex.css.c" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int csslex_destroy (void ); - -int cssget_debug (void ); - -void cssset_debug (int debug_flag ); - -YY_EXTRA_TYPE cssget_extra (void ); - -void cssset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *cssget_in (void ); - -void cssset_in (FILE * in_str ); - -FILE *cssget_out (void ); - -void cssset_out (FILE * out_str ); - -yy_size_t cssget_leng (void ); - -char *cssget_text (void ); - -int cssget_lineno (void ); - -void cssset_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int csswrap (void ); -#else -extern int csswrap (void ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO fwrite( csstext, cssleng, 1, cssout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( cssin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( cssin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, cssin))==0 && ferror(cssin)) \ - { \ - if ( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(cssin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int csslex (void); - -#define YY_DECL int csslex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after csstext and cssleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 21 "css.grammar" - - -#line 1678 "lex.css.c" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! cssin ) - cssin = stdin; - - if ( ! cssout ) - cssout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - cssensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - css_create_buffer(cssin,YY_BUF_SIZE ); - } - - css_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of csstext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 312 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 4071 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -/* rule 1 can match eol */ -YY_RULE_SETUP -#line 23 "css.grammar" - - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP -#line 25 "css.grammar" -/* ignore comments */ - YY_BREAK -case 3: -YY_RULE_SETUP -#line 27 "css.grammar" - - YY_BREAK -case 4: -YY_RULE_SETUP -#line 28 "css.grammar" - - YY_BREAK -case 5: -YY_RULE_SETUP -#line 29 "css.grammar" - - YY_BREAK -case 6: -YY_RULE_SETUP -#line 30 "css.grammar" - - YY_BREAK -case 7: -/* rule 7 can match eol */ -YY_RULE_SETUP -#line 32 "css.grammar" -{cssConsume(csstext, CSSSTRING);} - YY_BREAK -case 8: -/* rule 8 can match eol */ -YY_RULE_SETUP -#line 34 "css.grammar" -{cssConsume(csstext, CSSIDENT);} - YY_BREAK -case 9: -/* rule 9 can match eol */ -YY_RULE_SETUP -#line 36 "css.grammar" -{cssConsume(csstext, CSSHASH);} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 38 "css.grammar" - - YY_BREAK -case 11: -YY_RULE_SETUP -#line 39 "css.grammar" - - YY_BREAK -case 12: -YY_RULE_SETUP -#line 40 "css.grammar" - - YY_BREAK -case 13: -YY_RULE_SETUP -#line 41 "css.grammar" - - YY_BREAK -case 14: -YY_RULE_SETUP -#line 42 "css.grammar" - - YY_BREAK -case 15: -YY_RULE_SETUP -#line 43 "css.grammar" - - YY_BREAK -case 16: -YY_RULE_SETUP -#line 45 "css.grammar" - - YY_BREAK -case 17: -YY_RULE_SETUP -#line 47 "css.grammar" -{cssConsume(csstext, CSSEMS);} - YY_BREAK -case 18: -YY_RULE_SETUP -#line 48 "css.grammar" -{cssConsume(csstext, CSSEXS);} - YY_BREAK -case 19: -YY_RULE_SETUP -#line 49 "css.grammar" -{cssConsume(csstext, CSSLENGTH);} - YY_BREAK -case 20: -YY_RULE_SETUP -#line 50 "css.grammar" -{cssConsume(csstext, CSSLENGTH);} - YY_BREAK -case 21: -YY_RULE_SETUP -#line 51 "css.grammar" -{cssConsume(csstext, CSSLENGTH);} - YY_BREAK -case 22: -YY_RULE_SETUP -#line 52 "css.grammar" -{cssConsume(csstext, CSSLENGTH);} - YY_BREAK -case 23: -YY_RULE_SETUP -#line 53 "css.grammar" -{cssConsume(csstext, CSSLENGTH);} - YY_BREAK -case 24: -YY_RULE_SETUP -#line 54 "css.grammar" -{cssConsume(csstext, CSSLENGTH);} - YY_BREAK -case 25: -YY_RULE_SETUP -#line 55 "css.grammar" -{cssConsume(csstext, CSSANGLE);} - YY_BREAK -case 26: -YY_RULE_SETUP -#line 56 "css.grammar" -{cssConsume(csstext, CSSANGLE);} - YY_BREAK -case 27: -YY_RULE_SETUP -#line 57 "css.grammar" -{cssConsume(csstext, CSSANGLE);} - YY_BREAK -case 28: -YY_RULE_SETUP -#line 58 "css.grammar" -{cssConsume(csstext, CSSTIME);} - YY_BREAK -case 29: -YY_RULE_SETUP -#line 59 "css.grammar" -{cssConsume(csstext, CSSTIME);} - YY_BREAK -case 30: -YY_RULE_SETUP -#line 60 "css.grammar" -{cssConsume(csstext, CSSFREQ);} - YY_BREAK -case 31: -YY_RULE_SETUP -#line 61 "css.grammar" -{cssConsume(csstext, CSSFREQ);} - YY_BREAK -case 32: -/* rule 32 can match eol */ -YY_RULE_SETUP -#line 62 "css.grammar" -{cssConsume(csstext, CSSDIMEN);} - YY_BREAK -case 33: -YY_RULE_SETUP -#line 63 "css.grammar" -{cssConsume(csstext, CSSPERCENTAGE);} - YY_BREAK -case 34: -YY_RULE_SETUP -#line 64 "css.grammar" -{cssConsume(csstext, CSSNUMBER);} - YY_BREAK -case 35: -/* rule 35 can match eol */ -YY_RULE_SETUP -#line 66 "css.grammar" -{cssConsume(csstext, CSSURI);} - YY_BREAK -case 36: -/* rule 36 can match eol */ -YY_RULE_SETUP -#line 67 "css.grammar" -{cssConsume(csstext, CSSURI);} - YY_BREAK -case 37: -/* rule 37 can match eol */ -YY_RULE_SETUP -#line 68 "css.grammar" -{cssConsume(csstext, CSSFUNCTION);} - YY_BREAK -case 38: -YY_RULE_SETUP -#line 70 "css.grammar" -{cssConsume(csstext, CSSUNICODERANGE);} - YY_BREAK -case 39: -YY_RULE_SETUP -#line 71 "css.grammar" -{cssConsume(csstext, CSSUNICODERANGE);} - YY_BREAK -case 40: -YY_RULE_SETUP -#line 73 "css.grammar" -{cssConsume(csstext, CSSUNKNOWN);} - YY_BREAK -case 41: -YY_RULE_SETUP -#line 75 "css.grammar" -ECHO; - YY_BREAK -#line 1975 "lex.css.c" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed cssin at a new source and called - * csslex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = cssin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( csswrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * csstext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of csslex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - cssrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - cssrestart(cssin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cssrealloc((void *) - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, - new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 312 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 312 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 311); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - cssrestart(cssin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( csswrap( ) ) - return 0; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve csstext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void cssrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - cssensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - css_create_buffer(cssin,YY_BUF_SIZE ); - } - - css_init_buffer(YY_CURRENT_BUFFER,input_file ); - css_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void css_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * csspop_buffer_state(); - * csspush_buffer_state(new_buffer); - */ - cssensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - css_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (csswrap()) processing, but the only time this flag - * is looked at is after csswrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void css_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - cssin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE css_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) cssalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in css_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) cssalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in css_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - css_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with css_create_buffer() - * - */ - void css_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - cssfree((void *) b->yy_ch_buf ); - - cssfree((void *) b ); -} - -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a cssrestart() or at EOF. - */ - static void css_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - css_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then css_init_buffer was _probably_ - * called from cssrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void css_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - css_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void csspush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - cssensure_buffer_stack(); - - /* This block is copied from css_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from css_switch_to_buffer. */ - css_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void csspop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - css_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - css_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void cssensure_buffer_stack (void) -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)cssalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in cssensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)cssrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in cssensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE css_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) cssalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in css_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - css_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to csslex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * css_scan_bytes() instead. - */ -YY_BUFFER_STATE css_scan_string (yyconst char * yystr ) -{ - - return css_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to csslex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE css_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n, i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) cssalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in css_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = css_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in css_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up csstext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - csstext[cssleng] = (yy_hold_char); \ - (yy_c_buf_p) = csstext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - cssleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int cssget_lineno (void) -{ - - return csslineno; -} - -/** Get the input stream. - * - */ -FILE *cssget_in (void) -{ - return cssin; -} - -/** Get the output stream. - * - */ -FILE *cssget_out (void) -{ - return cssout; -} - -/** Get the length of the current token. - * - */ -yy_size_t cssget_leng (void) -{ - return cssleng; -} - -/** Get the current token. - * - */ - -char *cssget_text (void) -{ - return csstext; -} - -/** Set the current line number. - * @param line_number - * - */ -void cssset_lineno (int line_number ) -{ - - csslineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see css_switch_to_buffer - */ -void cssset_in (FILE * in_str ) -{ - cssin = in_str ; -} - -void cssset_out (FILE * out_str ) -{ - cssout = out_str ; -} - -int cssget_debug (void) -{ - return css_flex_debug; -} - -void cssset_debug (int bdebug ) -{ - css_flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from csslex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - cssin = stdin; - cssout = stdout; -#else - cssin = (FILE *) 0; - cssout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * csslex_init() - */ - return 0; -} - -/* csslex_destroy is for both reentrant and non-reentrant scanners. */ -int csslex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while (YY_CURRENT_BUFFER){ - css_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - csspop_buffer_state(); - } - - /* Destroy the stack itself. */ - cssfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * csslex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *cssalloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *cssrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void cssfree (void * ptr ) -{ - free( (char *) ptr ); /* see cssrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 75 "css.grammar" - - - -int csswrap(void){return 1;} - - diff --git a/src/extThree20CSSStyle/Sources/CssTokens.cpp b/src/extThree20CSSStyle/Sources/CssTokens.cpp deleted file mode 100644 index 9c37ed2bb7..0000000000 --- a/src/extThree20CSSStyle/Sources/CssTokens.cpp +++ /dev/null @@ -1,19 +0,0 @@ - -const char* names[] = { - "STRING", - "IDENT", - "HASH", - "EMS", - "EXS", - "LENGTH", - "ANGLE", - "TIME", - "FREQ", - "DIMEN", - "PERCENTAGE", - "NUMBER", - "URI", - "FUNCTION", - "UNICODERANGE", - "UNKNOWN", -}; diff --git a/src/extThree20CSSStyle/Sources/CssTokens.m b/src/extThree20CSSStyle/Sources/CssTokens.m deleted file mode 100644 index 5385122855..0000000000 --- a/src/extThree20CSSStyle/Sources/CssTokens.m +++ /dev/null @@ -1,19 +0,0 @@ - -const char* cssnames[] = { - "STRING", - "IDENT", - "HASH", - "EMS", - "EXS", - "LENGTH", - "ANGLE", - "TIME", - "FREQ", - "DIMEN", - "PERCENTAGE", - "NUMBER", - "URI", - "FUNCTION", - "UNICODERANGE", - "UNKNOWN", -}; diff --git a/src/extThree20CSSStyle/Sources/TTCSSParser.m b/src/extThree20CSSStyle/Sources/TTCSSParser.m deleted file mode 100644 index 9328ec919b..0000000000 --- a/src/extThree20CSSStyle/Sources/TTCSSParser.m +++ /dev/null @@ -1,257 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20CSSStyle/TTCSSParser.h" - -#import "extThree20CSSStyle/private/CssTokens.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" - - -typedef enum { - None, - -} ParserStates; - - -// Damn you, flex. Due to the nature of the global methods and whatnot, we can only have one -// parser at any given time. -TTCSSParser* gActiveParser = nil; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface TTCSSParser() - -/** - * - */ -- (void)consumeToken:(int)token text:(char*)text; - -@end - - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -int cssConsume(char* text, int token) { - [gActiveParser consumeToken:token text:text]; - - return 0; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTCSSParser - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - _ruleSets = [[NSMutableDictionary alloc] init]; - _activeCssSelectors = [[NSMutableArray alloc] init]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_ruleSets); - TT_RELEASE_SAFELY(_activeCssSelectors); - TT_RELEASE_SAFELY(_activeRuleSet); - TT_RELEASE_SAFELY(_activePropertyName); - TT_RELEASE_SAFELY(_lastTokenText); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)consumeToken:(int)token text:(char*)text { - NSString* string = [[NSString stringWithCString: text - encoding: NSUTF8StringEncoding] lowercaseString]; - switch (token) { - case CSSHASH: - case CSSIDENT: { - if (_state.Flags.InsideDefinition) { - - // If we're inside a definition then we ignore hashes. - if (CSSHASH != token && !_state.Flags.InsideProperty) { - TT_RELEASE_SAFELY(_activePropertyName); - _activePropertyName = [string retain]; - - NSMutableArray* values = [[NSMutableArray alloc] init]; - [_activeRuleSet setObject:values forKey:_activePropertyName]; - TT_RELEASE_SAFELY(values); - - } else { - // This is a value, so add it to the active property. - TTDASSERT(nil != _activePropertyName); - - if (nil != _activePropertyName) { - NSMutableArray* values = [_activeRuleSet objectForKey:_activePropertyName]; - [values addObject:string]; - } - } - - } else { - if (_lastToken == CSSUNKNOWN && [_lastTokenText isEqualToString:@"."]) { - string = [_lastTokenText stringByAppendingString:string]; - } - [_activeCssSelectors addObject:string]; - TT_RELEASE_SAFELY(_activePropertyName); - } - break; - } - - case CSSFUNCTION: { - if (_state.Flags.InsideProperty) { - _state.Flags.InsideFunction = YES; - - if (nil != _activePropertyName) { - NSMutableArray* values = [_activeRuleSet objectForKey:_activePropertyName]; - [values addObject:string]; - } - } - break; - } - - case CSSSTRING: - case CSSEMS: - case CSSEXS: - case CSSLENGTH: - case CSSANGLE: - case CSSTIME: - case CSSFREQ: - case CSSDIMEN: - case CSSPERCENTAGE: - case CSSNUMBER: - case CSSURI: { - TTDASSERT(nil != _activePropertyName); - - if (nil != _activePropertyName) { - NSMutableArray* values = [_activeRuleSet objectForKey:_activePropertyName]; - [values addObject:string]; - } - break; - } - - case CSSUNKNOWN: { - switch (text[0]) { - case '{': { - _state.Flags.InsideDefinition = YES; - _state.Flags.InsideFunction = NO; - TT_RELEASE_SAFELY(_activeRuleSet); - _activeRuleSet = [[NSMutableDictionary alloc] init]; - break; - } - - case '}': { - for (NSString* name in _activeCssSelectors) { - NSMutableDictionary* existingProperties = [_ruleSets objectForKey:name]; - if (nil != existingProperties) { - // Overwrite the properties, instead! - - NSDictionary* iteratorProperties = [_activeRuleSet copy]; - for (NSString* key in iteratorProperties) { - [existingProperties setObject:[_activeRuleSet objectForKey:key] forKey:key]; - } - TT_RELEASE_SAFELY(iteratorProperties); - - } else { - NSMutableDictionary* ruleSet = [_activeRuleSet mutableCopy]; - [_ruleSets setObject:ruleSet forKey:name]; - TT_RELEASE_SAFELY(ruleSet); - } - } - TT_RELEASE_SAFELY(_activeRuleSet); - [_activeCssSelectors removeAllObjects]; - _state.Flags.InsideDefinition = NO; - _state.Flags.InsideProperty = NO; - _state.Flags.InsideFunction = NO; - break; - } - - case ':': { - if (_state.Flags.InsideDefinition) { - _state.Flags.InsideProperty = YES; - } - break; - } - - case ')': { - if (_state.Flags.InsideFunction && nil != _activePropertyName) { - NSMutableArray* values = [_activeRuleSet objectForKey:_activePropertyName]; - [values addObject:string]; - } - _state.Flags.InsideFunction = NO; - break; - } - - case ';': { - if (_state.Flags.InsideDefinition) { - _state.Flags.InsideProperty = NO; - } - break; - } - - } - break; - } - } - - [_lastTokenText release]; - _lastTokenText = [string retain]; - _lastToken = token; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)parseFilename:(NSString*)filename { - gActiveParser = self; - - [_ruleSets removeAllObjects]; - [_activeCssSelectors removeAllObjects]; - TT_RELEASE_SAFELY(_activeRuleSet); - TT_RELEASE_SAFELY(_activePropertyName); - TT_RELEASE_SAFELY(_lastTokenText); - - cssin = fopen([filename UTF8String], "r"); - - csslex(); - - fclose(cssin); - - NSDictionary* result = [[_ruleSets copy] autorelease]; - TT_RELEASE_SAFELY(_ruleSets); - return result; -} - - -@end - diff --git a/src/extThree20CSSStyle/Sources/TTCSSStyleSheet.m b/src/extThree20CSSStyle/Sources/TTCSSStyleSheet.m deleted file mode 100644 index 34ba1bc193..0000000000 --- a/src/extThree20CSSStyle/Sources/TTCSSStyleSheet.m +++ /dev/null @@ -1,509 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20CSSStyle/TTCSSStyleSheet.h" - -#import "extThree20CSSStyle/TTCSSParser.h" - -// Style -#import "Three20Style/TTGlobalStyle.h" -#import "Three20Style/TTStyle.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTDebug.h" - -NSString* kCssPropertyColor = @"color"; -NSString* kCssPropertyBackgroundColor = @"background-color"; -NSString* kCssPropertyFont = @"font"; -NSString* kCssPropertyFontSize = @"font-size"; -NSString* kCssPropertyFontWeight = @"font-weight"; -NSString* kCssPropertyFontFamily = @"font-family"; -NSString* kCssPropertyTextShadow = @"text-shadow"; - -// Text shadow keys -NSString* kKeyTextShadowHOffset = @"hoffset"; -NSString* kKeyTextShadowVOffset = @"voffset"; -NSString* kKeyTextShadowBlur = @"blur"; -NSString* kKeyTextShadowColor = @"color"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTCSSStyleSheet - -@synthesize cssStyles = _cssStyles; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - [[NSNotificationCenter defaultCenter] - addObserver: self - selector: @selector(didReceiveMemoryWarning:) - name: UIApplicationDidReceiveMemoryWarningNotification - object: nil]; - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[NSNotificationCenter defaultCenter] - removeObserver: self - name: UIApplicationDidReceiveMemoryWarningNotification - object: nil]; - - TT_RELEASE_SAFELY(_cssStyles); - TT_RELEASE_SAFELY(_cachedCssStyles); - TT_RELEASE_SAFELY(_colorLookupTable); - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSNotifications - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didReceiveMemoryWarning:(void*)object { - [self freeMemory]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CSS Parsing - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadFromFilename:(NSString*)filename { - TT_RELEASE_SAFELY(_cssStyles); - TT_RELEASE_SAFELY(_cachedCssStyles); - - BOOL didLoadSuccessfully = NO; - - if ([[NSFileManager defaultManager] fileExistsAtPath:filename]) { - TTCSSParser* parser = [[TTCSSParser alloc] init]; - - NSDictionary* results = [parser parseFilename:filename]; - TT_RELEASE_SAFELY(parser); - - _cssStyles = [results retain]; - _cachedCssStyles = [[NSMutableDictionary alloc] initWithCapacity:[_cssStyles count]]; - - didLoadSuccessfully = YES; - } - - return didLoadSuccessfully; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addStyleSheet:(TTCSSStyleSheet*)styleSheet { - TTDASSERT(nil != styleSheet); - if (nil == styleSheet) { - return; - } - - // Clear the cache first. - TT_RELEASE_SAFELY(_cachedCssStyles); - _cachedCssStyles = [[NSMutableDictionary alloc] initWithCapacity:[_cssStyles count]]; - - NSMutableDictionary* newStyles = [_cssStyles mutableCopy]; - - for (NSString* selector in styleSheet.cssStyles) { - NSDictionary* addingRuleSet = [styleSheet.cssStyles objectForKey:selector]; - NSDictionary* existingRuleSet = [_cssStyles objectForKey:selector]; - - if (nil == existingRuleSet) { - // Easiest case where the old style sheet doesn't have the rule set, we just add it. - [newStyles setObject:addingRuleSet forKey:selector]; - continue; - } - - if ([addingRuleSet count] > 0) { - NSMutableDictionary* newRuleSet = [existingRuleSet mutableCopy]; - [newRuleSet addEntriesFromDictionary:addingRuleSet]; - - [newStyles setObject:newRuleSet forKey:selector]; - TT_RELEASE_SAFELY(newRuleSet); - } - } - - TT_RELEASE_SAFELY(_cssStyles); - _cssStyles = newStyles; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Object Cache - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectForCssSelector:(NSString*)selector propertyName:(NSString*)propertyName { - NSDictionary* ruleSet = [_cachedCssStyles objectForKey:selector]; - if (nil != ruleSet) { - return [ruleSet objectForKey:propertyName]; - } - - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setObjectForCssSelector: (NSString*)selector - propertyName: (NSString*)propertyName - object: (id)object { - TTDASSERT(TTIsStringWithAnyText(selector)); - NSMutableDictionary* ruleSet = [_cachedCssStyles objectForKey:selector]; - if (nil == ruleSet) { - ruleSet = [[NSMutableDictionary alloc] init]; - [_cachedCssStyles setObject:ruleSet forKey:selector]; - - // Can release here because it's now being retained by _processedCssStyles - [ruleSet release]; - } - - [ruleSet setObject:object forKey:propertyName]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)selector:(NSString*)selector forState:(UIControlState)state { - selector = [selector lowercaseString]; - switch (state) { - default: - case UIControlStateNormal: - break; - - case UIControlStateHighlighted: { - selector = [selector stringByAppendingString:@":hover"]; - break; - } - } - - return selector; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Colors - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)colorLookupTable { - if (nil == _colorLookupTable) { - // From the W3C HTML4 spec for colors: - // http://www.w3.org/TR/css3-color/ - _colorLookupTable = [[NSDictionary alloc] initWithObjectsAndKeys: - RGBCOLOR(0x00, 0xFF, 0xFF), @"aqua", - [UIColor blackColor], @"black", - RGBCOLOR(0x00, 0x00, 0xFF), @"blue", - RGBCOLOR(0xFF, 0x00, 0xFF), @"fuschia", - RGBCOLOR(0x80, 0x80, 0x80), @"gray", - RGBCOLOR(0x00, 0x80, 0x00), @"green", - RGBCOLOR(0x00, 0xFF, 0x00), @"lime", - RGBCOLOR(0x80, 0x00, 0x00), @"maroon", - RGBCOLOR(0x00, 0x00, 0x80), @"navy", - RGBCOLOR(0x80, 0x80, 0x00), @"olive", - RGBCOLOR(0xFF, 0x00, 0x00), @"red", - RGBCOLOR(0x80, 0x00, 0x80), @"purple", - RGBCOLOR(0xC0, 0xC0, 0xC0), @"silver", - RGBCOLOR(0x00, 0x80, 0x80), @"teal", - RGBACOLOR(0xFF, 0xFF, 0xFF, 0x00), @"transparent", - [UIColor whiteColor], @"white", - RGBCOLOR(0xFF, 0xFF, 0x00), @"yellow", - - // System colors - [UIColor lightTextColor], @"lightTextColor", - [UIColor darkTextColor], @"darkTextColor", - [UIColor groupTableViewBackgroundColor], @"groupTableViewBackgroundColor", - [UIColor viewFlipsideBackgroundColor], @"viewFlipsideBackgroundColor", - nil]; - } - - return _colorLookupTable; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)colorFromCssValues:(NSArray*)cssValues { - UIColor* color = nil; - - // Anything more or less is unsupported, and therefore this property is ignored - // according to the W3C guidelines. - TTDASSERT([cssValues count] == 1 - || [cssValues count] == 5 // rgb( x x x ) - || [cssValues count] == 6); // rgba( x x x x ) - - if ([cssValues count] == 1) { - NSString* cssString = [cssValues objectAtIndex:0]; - - if ([cssString characterAtIndex:0] == '#') { - unsigned long colorValue = 0; - - // #FFF - if ([cssString length] == 4) { - colorValue = strtol([cssString UTF8String] + 1, nil, 16); - colorValue = ((colorValue & 0xF00) << 12) | ((colorValue & 0xF00) << 8) - | ((colorValue & 0xF0) << 8) | ((colorValue & 0xF0) << 4) - | ((colorValue & 0xF) << 4) | (colorValue & 0xF); - - // #FFFFFF - } else if ([cssString length] == 7) { - colorValue = strtol([cssString UTF8String] + 1, nil, 16); - } - - color = RGBCOLOR(((colorValue & 0xFF0000) >> 16), - ((colorValue & 0xFF00) >> 8), - (colorValue & 0xFF)); - - } else if ([cssString isEqualToString:@"none"]) { - color = nil; - - } else { - color = [[self colorLookupTable] objectForKey:cssString]; - } - - } else if ([cssValues count] == 5 && [[cssValues objectAtIndex:0] isEqualToString:@"rgb("]) { - // rgb( x x x ) - color = RGBCOLOR([[cssValues objectAtIndex:1] floatValue], - [[cssValues objectAtIndex:2] floatValue], - [[cssValues objectAtIndex:3] floatValue]); - - } else if ([cssValues count] == 6 && [[cssValues objectAtIndex:0] isEqualToString:@"rgba("]) { - // rgba( x x x x ) - color = RGBACOLOR([[cssValues objectAtIndex:1] floatValue], - [[cssValues objectAtIndex:2] floatValue], - [[cssValues objectAtIndex:3] floatValue], - [[cssValues objectAtIndex:4] floatValue]); - } - - return color; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)colorWithCssSelector: (NSString*)selector - propertyName: (NSString*)propertyName { - UIColor* color = [self objectForCssSelector:selector propertyName:propertyName]; - - // No cached value. - if (nil == color) { - NSDictionary* ruleSet = [_cssStyles objectForKey:selector]; - - // The given selector actually exists in the CSS. - if (nil != ruleSet) { - NSArray* values = [ruleSet objectForKey:propertyName]; - - if (nil != values) { - color = [self colorFromCssValues:values]; - - // And we can actually parse it. - if (nil != color) { - [self setObjectForCssSelector:selector propertyName:propertyName object:color]; - } - } - } - } - - return color; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)colorWithCssSelector:(NSString*)selector forState:(UIControlState)state { - selector = [self selector:selector forState:state]; - - return [self colorWithCssSelector:selector propertyName:kCssPropertyColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)backgroundColorWithCssSelector:(NSString*)selector forState:(UIControlState)state { - selector = [self selector:selector forState:state]; - - return [self colorWithCssSelector: selector - propertyName: kCssPropertyBackgroundColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Fonts - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)fontWithCssSelector:(NSString*)selector forState:(UIControlState)state { - selector = [self selector:selector forState:state]; - - UIFont* font = [self objectForCssSelector:selector propertyName:kCssPropertyFont]; - - // No cached value. - if (nil == font) { - NSDictionary* ruleSet = [_cssStyles objectForKey:selector]; - - // The given selector actually exists in the CSS. - if (nil != ruleSet) { - CGFloat fontSize = [UIFont systemFontSize]; - BOOL isBold = NO; - - NSArray* fontSizeValues = [ruleSet objectForKey:kCssPropertyFontSize]; - - if (nil != fontSizeValues) { - // Anything more or less is unsupported, and therefore this property is ignored - // according to the W3C guidelines. - TTDASSERT([fontSizeValues count] == 1); - if ([fontSizeValues count] == 1) { - fontSize = [[fontSizeValues objectAtIndex:0] floatValue]; - } - - NSArray* fontWeightValues = [ruleSet objectForKey:kCssPropertyFontWeight]; - // Anything more or less is unsupported, and therefore this property is ignored - // according to the W3C guidelines. - if ([fontWeightValues count] == 1) { - if ([[fontWeightValues objectAtIndex:0] isEqualToString:@"bold"]) { - isBold = YES; - } - } - - NSArray* fontFamilyValues = [ruleSet objectForKey:kCssPropertyFontFamily]; - if ([fontFamilyValues count] > 0) { - NSArray* systemFontFamilyNames = [UIFont familyNames]; - NSLog(@"Font families: %@", systemFontFamilyNames); - for (NSString* fontName in fontFamilyValues) { - } - if ([[fontFamilyValues objectAtIndex:0] isEqualToString:@"bold"]) { - isBold = YES; - } - } - - if (isBold) { - font = [UIFont boldSystemFontOfSize:fontSize]; - - } else { - font = [UIFont systemFontOfSize:fontSize]; - } - - if (nil != font) { - [self setObjectForCssSelector:selector propertyName:kCssPropertyFont object:font]; - } - } - } - } - - return font; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Text Shadows - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)textShadowWithCssSelector:(NSString*)selector forState:(UIControlState)state { - NSDictionary* textShadow = [self objectForCssSelector: selector - propertyName: kCssPropertyTextShadow]; - - // No cached value. - if (nil == textShadow) { - NSDictionary* ruleSet = [_cssStyles objectForKey:selector]; - - // The given selector actually exists in the CSS. - if (nil != ruleSet) { - NSArray* values = [ruleSet objectForKey:kCssPropertyTextShadow]; - // Anything more or less is unsupported, and therefore this property is ignored - // according to the W3C guidelines. - TTDASSERT([values count] >= 4); - if ([values count] >= 4) { - NSNumber* horizOffset = [NSNumber numberWithFloat:[[values objectAtIndex:0] floatValue]]; - NSNumber* vertOffset = [NSNumber numberWithFloat:[[values objectAtIndex:1] floatValue]]; - NSNumber* blurAmount = [NSNumber numberWithFloat:[[values objectAtIndex:2] floatValue]]; - UIColor* color = [self colorFromCssValues: - [values subarrayWithRange: - NSMakeRange(3, [values count] - 3)]]; - - textShadow = [[NSDictionary alloc] initWithObjectsAndKeys: - horizOffset, kKeyTextShadowHOffset, - vertOffset, kKeyTextShadowVOffset, - blurAmount, kKeyTextShadowBlur, - color, kKeyTextShadowColor, - nil]; - } - - if (nil != textShadow) { - [self setObjectForCssSelector: selector - propertyName: kCssPropertyTextShadow - object: textShadow]; - } - } - } - - return textShadow; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)textShadowColorWithCssSelector:(NSString*)selector forState:(UIControlState)state { - selector = [self selector:selector forState:state]; - - NSDictionary* textShadow = [self textShadowWithCssSelector: selector - forState: state]; - return [textShadow objectForKey:kKeyTextShadowColor]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)textShadowOffsetWithCssSelector:(NSString*)selector forState:(UIControlState)state { - selector = [self selector:selector forState:state]; - - NSDictionary* textShadow = [self textShadowWithCssSelector: selector - forState: state]; - return CGSizeMake([[textShadow objectForKey:kKeyTextShadowHOffset] floatValue], - [[textShadow objectForKey:kKeyTextShadowVOffset] floatValue]); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Utilities - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)freeMemory { - TT_RELEASE_SAFELY(_cachedCssStyles); - TT_RELEASE_SAFELY(_colorLookupTable); - _cachedCssStyles = [[NSMutableDictionary alloc] initWithCapacity:[_cssStyles count]]; -} - - -@end - diff --git a/src/extThree20CSSStyle/Sources/TTDefaultCSSStyleSheet.h b/src/extThree20CSSStyle/Sources/TTDefaultCSSStyleSheet.h deleted file mode 100644 index a257e879ce..0000000000 --- a/src/extThree20CSSStyle/Sources/TTDefaultCSSStyleSheet.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Style/TTDefaultStyleSheet.h" - -@class TTCSSStyleSheet; - -#define TTCSSBGCOLOR(selector) [[TTDefaultCSSStyleSheet globalCSSStyleSheet] \ - backgroundColorForCSSSelector:selector] - -@interface TTDefaultCSSStyleSheet : TTDefaultStyleSheet { -@private - TTCSSStyleSheet* _styleSheet; -} - -@property (nonatomic, readonly) TTCSSStyleSheet* styleSheet; - -- (BOOL)addStyleSheetFromDisk:(NSString*)filename; - -- (UIColor*)backgroundColorForCSSSelector:(NSString*)cssSelector; - -+ (TTDefaultCSSStyleSheet*)globalCSSStyleSheet; - -@end diff --git a/src/extThree20CSSStyle/Sources/TTDefaultCSSStyleSheet.m b/src/extThree20CSSStyle/Sources/TTDefaultCSSStyleSheet.m deleted file mode 100644 index ea1d10659d..0000000000 --- a/src/extThree20CSSStyle/Sources/TTDefaultCSSStyleSheet.m +++ /dev/null @@ -1,358 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20CSSStyle/TTDefaultCSSStyleSheet.h" - -// extThree20CSSStyle -#import "extThree20CSSStyle/TTCSSStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTGlobalCorePaths.h" - -NSString* kDefaultCSSPath = @"extThree20CSSStyle.bundle/stylesheets/default.css"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTDefaultCSSStyleSheet - -@synthesize styleSheet = _styleSheet; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)init { - if (self = [super init]) { - [[NSNotificationCenter defaultCenter] - addObserver: self - selector: @selector(didReceiveMemoryWarning:) - name: UIApplicationDidReceiveMemoryWarningNotification - object: nil]; - - _styleSheet = [[TTCSSStyleSheet alloc] init]; - - BOOL loadedSuccessfully = [_styleSheet - loadFromFilename:TTPathForBundleResource(kDefaultCSSPath)]; - - // If this fails, it's very likely that you forgot to add the extThree20CSSStyle.bundle file - // to your project. If you didn't, ensure that it's being copied in the "Copy Bundle Resources" - // phase. - TTDASSERT(loadedSuccessfully); - if (!loadedSuccessfully) { - // Bail out. - } - } - - return self; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - [[NSNotificationCenter defaultCenter] - removeObserver: self - name: UIApplicationDidReceiveMemoryWarningNotification - object: nil]; - - TT_RELEASE_SAFELY(_styleSheet); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSNotifications - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didReceiveMemoryWarning:(void*)object { - [self freeMemory]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)freeMemory { - [_styleSheet freeMemory]; - - [super freeMemory]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Public - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)addStyleSheetFromDisk:(NSString*)filename { - TTCSSStyleSheet* styleSheet = [[TTCSSStyleSheet alloc] init]; - - BOOL loadedSuccessfully = [styleSheet loadFromFilename:filename]; - - [_styleSheet addStyleSheet:styleSheet]; - - TT_RELEASE_SAFELY(styleSheet); - - return loadedSuccessfully; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)backgroundColorForCSSSelector:(NSString*)cssSelector { - return [_styleSheet backgroundColorWithCssSelector: cssSelector - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -+ (TTDefaultCSSStyleSheet*)globalCSSStyleSheet { - TTDASSERT([[TTStyleSheet globalStyleSheet] isKindOfClass:[TTDefaultStyleSheet class]]); - return (TTDefaultCSSStyleSheet*)[TTStyleSheet globalStyleSheet]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Common styles - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)textColor { - return [_styleSheet colorWithCssSelector: @"body" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)highlightedTextColor { - return [_styleSheet colorWithCssSelector: @"body" - forState: UIControlStateHighlighted]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)font { - return [_styleSheet fontWithCssSelector: @"body" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)backgroundColor { - return [_styleSheet backgroundColorWithCssSelector: @"body" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)navigationBarTintColor { - return [_styleSheet backgroundColorWithCssSelector: @"navigationBar" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)toolbarTintColor { - return [_styleSheet backgroundColorWithCssSelector: @"toolbar" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)searchBarTintColor { - return [_styleSheet backgroundColorWithCssSelector: @"searchbar" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Tables - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tablePlainBackgroundColor { - return [_styleSheet backgroundColorWithCssSelector: @"table" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableGroupedBackgroundColor { - return [_styleSheet backgroundColorWithCssSelector: @"groupedTable" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)searchTableBackgroundColor { - return [_styleSheet backgroundColorWithCssSelector: @"searchTable" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)searchTableSeparatorColor { - return [_styleSheet backgroundColorWithCssSelector: @"searchTableSeparator" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Table Items - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)linkTextColor { - return [_styleSheet colorWithCssSelector: @".tableItemLink" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)timestampTextColor { - return [_styleSheet colorWithCssSelector: @".tableItemTimestamp" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)moreLinkTextColor { - return [_styleSheet colorWithCssSelector: @".moreButton" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Table Headers - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableHeaderTextColor { - return [_styleSheet colorWithCssSelector: @".tableHeader" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableHeaderShadowColor { - return [_styleSheet textShadowColorWithCssSelector: @".tableHeader" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)tableHeaderShadowOffset { - return [_styleSheet textShadowOffsetWithCssSelector: @".tableHeader" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableHeaderTintColor { - return [_styleSheet backgroundColorWithCssSelector: @".tableHeader" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Photo Captions - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)photoCaptionTextColor { - return [_styleSheet colorWithCssSelector: @".photoCaption" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)photoCaptionTextShadowColor { - return [_styleSheet textShadowColorWithCssSelector: @".photoCaption" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)photoCaptionTextShadowOffset { - return [_styleSheet textShadowOffsetWithCssSelector: @".photoCaption" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark DragRefreshHeader - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableRefreshHeaderLastUpdatedFont { - return [_styleSheet fontWithCssSelector: @".dragRefreshHeaderLastUpdated" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIFont*)tableRefreshHeaderStatusFont { - return [_styleSheet fontWithCssSelector: @".dragRefreshHeaderStatusFont" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableRefreshHeaderBackgroundColor { - return [_styleSheet backgroundColorWithCssSelector: @".dragRefreshHeader" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableRefreshHeaderTextColor { - return [_styleSheet colorWithCssSelector: @".dragRefreshHeader" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (UIColor*)tableRefreshHeaderTextShadowColor { - return [_styleSheet textShadowColorWithCssSelector: @".dragRefreshHeader" - forState: UIControlStateNormal]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (CGSize)tableRefreshHeaderTextShadowOffset { - return [_styleSheet textShadowOffsetWithCssSelector: @".dragRefreshHeader" - forState: UIControlStateNormal]; -} - - -@end - diff --git a/src/extThree20CSSStyle/Sources/TTExtensionLoader.m b/src/extThree20CSSStyle/Sources/TTExtensionLoader.m deleted file mode 100644 index 8cdc99c857..0000000000 --- a/src/extThree20CSSStyle/Sources/TTExtensionLoader.m +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20CSSStyle/TTExtensionLoader.h" - -// Core -#import "Three20Core/TTExtensionAuthor.h" -#import "Three20Core/TTExtensionInfo.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTExtensionLoader (TTCSSStyleExtension) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadExtensionNamedThree20CSSStyle { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTExtensionInfo*)extensionInfoNamedThree20CSSStyle { - TTExtensionInfo* extension = [[TTExtensionInfo alloc] init]; - - extension.name = @"Three20 CSS Styling"; - extension.description = - @"The CSS Styling extension provides support for customizing the style of an app using" - @" standard CSS."; - extension.version = @"1.0"; - extension.copyright = @"Copyright 2009-2010 Facebook"; - extension.license = @"Apache 2.0"; - extension.authors = [NSArray arrayWithObjects: - [TTExtensionAuthor authorWithName:@"Jeff Verkoeyen"], - nil]; - - return [extension autorelease]; -} - - -@end - diff --git a/src/extThree20CSSStyle/UnitTests/CssParserTests.m b/src/extThree20CSSStyle/UnitTests/CssParserTests.m deleted file mode 100644 index 05dc7d65e2..0000000000 --- a/src/extThree20CSSStyle/UnitTests/CssParserTests.m +++ /dev/null @@ -1,102 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. -// See Also: http://bit.ly/hgpqd2 - -#import - -#import "extThree20CSSStyle/TTCSSParser.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -@interface CssParserTests : SenTestCase { -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation CssParserTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testParser { - NSBundle* testBundle = [NSBundle bundleWithIdentifier:@"com.facebook.three20.UnitTests"]; - STAssertTrue(nil != testBundle, @"Unable to find the bundle %@", [NSBundle allBundles]); - - { - NSString* filename = [[testBundle bundlePath] - stringByAppendingPathComponent:@"testcase.css"]; - - TTCSSParser* parser = [[TTCSSParser alloc] init]; - - NSDictionary* results = [parser parseFilename:filename]; - - STAssertTrue([results isKindOfClass:[NSDictionary class]], - @"Should have received a dictionary."); - - NSDictionary* properties = [results objectForKey:@".classname"]; - - STAssertTrue([properties isKindOfClass:[NSDictionary class]], - @".classname should be a dictionary."); - - NSArray* values = [properties objectForKey:@"width"]; - - STAssertTrue([values isKindOfClass:[NSArray class]], - @"Values should be an array."); - - // Test overriding. - STAssertTrue([[values objectAtIndex:0] isEqualToString:@"600px"], - @"Should be equal to 600px"); - - TT_RELEASE_SAFELY(parser); - } - - { - NSString* filename = [[testBundle bundlePath] - stringByAppendingPathComponent:@"testcase.css"]; - - TTCSSParser* parser = [[TTCSSParser alloc] init]; - - NSDictionary* results = [parser parseFilename:filename]; - - STAssertTrue([results isKindOfClass:[NSDictionary class]], - @"Should have received a dictionary."); - - NSDictionary* properties = [results objectForKey:@".classname"]; - - STAssertTrue([properties isKindOfClass:[NSDictionary class]], - @".classname should be a dictionary."); - - NSArray* values = [properties objectForKey:@"width"]; - - STAssertTrue([values isKindOfClass:[NSArray class]], - @"Values should be an array."); - - // Test overriding. - STAssertTrue([[values objectAtIndex:0] isEqualToString:@"600px"], - @"Should be equal to 600px"); - - TT_RELEASE_SAFELY(parser); - } -} - - -@end diff --git a/src/extThree20CSSStyle/UnitTests/CssStyleSheetTests.m b/src/extThree20CSSStyle/UnitTests/CssStyleSheetTests.m deleted file mode 100644 index d1f55c24a8..0000000000 --- a/src/extThree20CSSStyle/UnitTests/CssStyleSheetTests.m +++ /dev/null @@ -1,135 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. -// See Also: http://bit.ly/hgpqd2 - -#import - -#import "extThree20CSSStyle/TTCSSStyleSheet.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -@interface CssStyleSheetTests : SenTestCase { - TTCSSStyleSheet* _styleSheet; -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation CssStyleSheetTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)setUp { - NSBundle* testBundle = [NSBundle bundleWithIdentifier:@"com.facebook.three20.UnitTests"]; - STAssertTrue(nil != testBundle, @"Unable to find the bundle %@", [NSBundle allBundles]); - - NSString* filename = [[testBundle bundlePath] - stringByAppendingPathComponent:@"testcase.css"]; - - _styleSheet = [[TTCSSStyleSheet alloc] init]; - - STAssertTrue([_styleSheet loadFromFilename:filename], - @"Style sheet should have loaded."); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)tearDown { - TT_RELEASE_SAFELY(_styleSheet); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)checkColorsForSelector:(NSString*)selector equalToColor:(UIColor*)correctColor { - UIColor* color = [_styleSheet colorWithCssSelector: selector - forState: UIControlStateNormal]; - UIColor* bgColor = [_styleSheet backgroundColorWithCssSelector: selector - forState: UIControlStateNormal]; - STAssertNotNil(color, @"Color should be set."); - STAssertNotNil(bgColor, @"Background color should be set."); - - STAssertTrue(CGColorEqualToColor([color CGColor], [correctColor CGColor]), - @"Colors should be equal"); - STAssertTrue(CGColorEqualToColor([bgColor CGColor], [correctColor CGColor]), - @"Background colors should be equal"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testStylesheet_ShortColors { - [self checkColorsForSelector:@".short-hex-colors" - equalToColor:[UIColor colorWithRed:1 green:0.466666666 blue:0.2 alpha:1.0]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testStylesheet_LongColors { - [self checkColorsForSelector:@".long-hex-colors" - equalToColor:[UIColor colorWithRed:1 green:0.466666666 blue:0.2 alpha:1.0]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testStylesheet_NamedColors { - // We can't run this test because any calls to the UIColor system colors crashes the test rig. - //[self checkColorsForSelector:@".named-color" - // equalToColor:[UIColor redColor]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testStylesheet_NamedInvalidColors { - // We can't run this test because any calls to the UIColor system colors crashes the test rig. - //UIColor* color = [_styleSheet colorWithCssSelector: @".named-invalid-color" - // forState: UIControlStateNormal]; - //STAssertNil(color, @"Color should not be set."); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testStylesheet_FunctionRgbColors { - [self checkColorsForSelector:@".fn-color-rgb" - equalToColor:[UIColor colorWithRed:1 green:0 blue:1 alpha:1]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testStylesheet_FunctionRgbaColors { - [self checkColorsForSelector:@".fn-color-rgba" - equalToColor:[UIColor colorWithRed:1 green:1 blue:1 alpha:0.5]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testStylesheet_ColorCache { - UIColor* color = [_styleSheet colorWithCssSelector: @".long-hex-colors" - forState: UIControlStateNormal]; - - // Call it again now, this time ideally from the cache. - UIColor* cachedColor = [_styleSheet colorWithCssSelector: @".long-hex-colors" - forState: UIControlStateNormal]; - - STAssertEquals(color, cachedColor, @"Should be the same object."); -} - - -@end diff --git a/src/extThree20CSSStyle/UnitTests/Resources/CSS/testcase.css b/src/extThree20CSSStyle/UnitTests/Resources/CSS/testcase.css deleted file mode 100644 index 17c2764f6d..0000000000 --- a/src/extThree20CSSStyle/UnitTests/Resources/CSS/testcase.css +++ /dev/null @@ -1,50 +0,0 @@ - -.classname, -#identifier { - width: 800px; - height: 2em -} - -.classname { - width: 600px -} - -.classname:hover { - width: 800px; -} - -.short-hex-colors { - color: #F73; - background-color: #F73 -} - -.long-hex-colors { - color: #FF7733; - background-color: #FF7733 -} - -.named-color { - color: red; - background-color: red -} - -.named-invalid-color { - color: polkadot; - background-color: polkadot -} - -.fn-color-rgb { - color: rgb(255, 0, 255); - background-color: rgb(255, 0, 255); -} - -.fn-color-rgba { - color: rgba(255, 255, 255, 0.5); - background-color: rgba(255, 255, 255, 0.5); -} - -.font-props { - font-weight: bold; - font-size: 12pt; - font-style: italic; -} diff --git a/src/extThree20CSSStyle/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/extThree20CSSStyle/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/extThree20CSSStyle/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/extThree20CSSStyle/extThree20CSSStyle.xcodeproj/project.pbxproj b/src/extThree20CSSStyle/extThree20CSSStyle.xcodeproj/project.pbxproj deleted file mode 100755 index 0bf3019949..0000000000 --- a/src/extThree20CSSStyle/extThree20CSSStyle.xcodeproj/project.pbxproj +++ /dev/null @@ -1,833 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXAggregateTarget section */ - 6E083B2C11B6113900B99C32 /* Grammar */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 6E083B3411B6114E00B99C32 /* Build configuration list for PBXAggregateTarget "Grammar" */; - buildPhases = ( - 6E083B2B11B6113900B99C32 /* ShellScript */, - ); - dependencies = ( - ); - name = Grammar; - productName = Grammar; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 663DB00812661D6F00CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m in Sources */ = {isa = PBXBuildFile; fileRef = 663DB00712661D6F00CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m */; }; - 66E722D0129392DD007134B0 /* TTExtensionLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 66E722CC129392DD007134B0 /* TTExtensionLoader.m */; }; - 66E722D3129392EB007134B0 /* TTExtensionLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E722D1129392EB007134B0 /* TTExtensionLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E036A2011B364670025E8EE /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E036A1411B364530025E8EE /* libThree20Network.a */; }; - 6E036A2111B364670025E8EE /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E036A1D11B3645C0025E8EE /* libThree20Style.a */; }; - 6E036A3011B364CC0025E8EE /* TTCSSStyleSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E036A2E11B364CC0025E8EE /* TTCSSStyleSheet.m */; }; - 6E036A3211B364DF0025E8EE /* TTCSSStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E036A3111B364DF0025E8EE /* TTCSSStyleSheet.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E036A7D11B371790025E8EE /* CssStyleSheetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E036A7711B371150025E8EE /* CssStyleSheetTests.m */; }; - 6E036B6911B38DA30025E8EE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E85155511B2E94E0071A4FD /* CoreGraphics.framework */; }; - 6E036D1911B487CF0025E8EE /* TTDefaultCSSStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E036D1711B487CF0025E8EE /* TTDefaultCSSStyleSheet.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E036D1A11B487CF0025E8EE /* TTDefaultCSSStyleSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E036D1811B487CF0025E8EE /* TTDefaultCSSStyleSheet.m */; }; - 6E3C3470118806590079637E /* extThree20CSSStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E646518118805EB00F08CB1 /* extThree20CSSStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645AA111876E2B00F08CB1 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E645A7011876D3F00F08CB1 /* libThree20Core.a */; }; - 6E85145411B1B5390071A4FD /* TTCSSParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E85145311B1B5390071A4FD /* TTCSSParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E8514DA11B2E31E0071A4FD /* CssTokenizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E8514D811B2E31E0071A4FD /* CssTokenizer.m */; }; - 6E8514DB11B2E31E0071A4FD /* CssTokens.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E8514D911B2E31E0071A4FD /* CssTokens.m */; }; - 6E8514ED11B2E3F30071A4FD /* CssTokens.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E8514DC11B2E3290071A4FD /* CssTokens.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E85152611B2E7B80071A4FD /* CssParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E85152511B2E7B80071A4FD /* CssParserTests.m */; }; - 6E85154011B2E8660071A4FD /* TTCSSParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E85145111B1B5200071A4FD /* TTCSSParser.m */; }; - 6EAE4E5611B2F0A7001073B4 /* testcase.css in Resources */ = {isa = PBXBuildFile; fileRef = 6EAE4E5511B2F0A7001073B4 /* testcase.css */; }; - 6EB460DA1183D8CB00685649 /* libextThree20CSSStyle.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libextThree20CSSStyle.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E036A1311B364530025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036A0E11B364530025E8EE /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E036A1511B364530025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036A0E11B364530025E8EE /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E036A1C11B3645C0025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036A1711B3645C0025E8EE /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E036A1E11B3645C0025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036A1711B3645C0025E8EE /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E036A2211B3646F0025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036A1711B3645C0025E8EE /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E036A2411B3646F0025E8EE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E036A0E11B364530025E8EE /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E645A6F11876D3F00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645A7111876D3F00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645A7C11876D5800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645AA511876E3500F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EB460DD1183D8D400685649 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = extThree20CSSStyle; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 66313D671267BFCF00C09C9F /* extThree20CSSStyle_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extThree20CSSStyle_Prefix.pch; path = Headers/extThree20CSSStyle_Prefix.pch; sourceTree = ""; }; - 663DB00712661D6F00CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Xcode324iOS41TestSuiteWorkaround.m; path = ../UnitTests/Xcode324iOS41TestSuiteWorkaround.m; sourceTree = SOURCE_ROOT; }; - 66E722CC129392DD007134B0 /* TTExtensionLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTExtensionLoader.m; path = Sources/TTExtensionLoader.m; sourceTree = ""; }; - 66E722D1129392EB007134B0 /* TTExtensionLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionLoader.h; path = Headers/TTExtensionLoader.h; sourceTree = ""; }; - 6E036A0E11B364530025E8EE /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E036A1711B3645C0025E8EE /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E036A2E11B364CC0025E8EE /* TTCSSStyleSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTCSSStyleSheet.m; path = Sources/TTCSSStyleSheet.m; sourceTree = ""; }; - 6E036A3111B364DF0025E8EE /* TTCSSStyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTCSSStyleSheet.h; path = Headers/TTCSSStyleSheet.h; sourceTree = ""; }; - 6E036A7711B371150025E8EE /* CssStyleSheetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CssStyleSheetTests.m; path = UnitTests/CssStyleSheetTests.m; sourceTree = ""; }; - 6E036B3611B38A420025E8EE /* README.mdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.mdown; sourceTree = ""; }; - 6E036B6111B38D1B0025E8EE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 6E036D1711B487CF0025E8EE /* TTDefaultCSSStyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTDefaultCSSStyleSheet.h; path = Sources/TTDefaultCSSStyleSheet.h; sourceTree = ""; }; - 6E036D1811B487CF0025E8EE /* TTDefaultCSSStyleSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTDefaultCSSStyleSheet.m; path = Sources/TTDefaultCSSStyleSheet.m; sourceTree = ""; }; - 6E0835AB11B4C3A200B99C32 /* extThree20CSSStyle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = extThree20CSSStyle.bundle; path = Resources/extThree20CSSStyle.bundle; sourceTree = ""; }; - 6E083B5311B6122800B99C32 /* Build.Command */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Build.Command; path = Grammars/Build.Command; sourceTree = ""; }; - 6E083B5411B6122F00B99C32 /* css.grammar */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = css.grammar; path = Grammars/css.grammar; sourceTree = ""; }; - 6E55A4B31183CA80002768DE /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6E6454021184BDD500F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E646518118805EB00F08CB1 /* extThree20CSSStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extThree20CSSStyle.h; path = Headers/extThree20CSSStyle.h; sourceTree = ""; }; - 6E85145111B1B5200071A4FD /* TTCSSParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTCSSParser.m; path = Sources/TTCSSParser.m; sourceTree = ""; }; - 6E85145311B1B5390071A4FD /* TTCSSParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTCSSParser.h; path = Headers/TTCSSParser.h; sourceTree = ""; }; - 6E8514D811B2E31E0071A4FD /* CssTokenizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CssTokenizer.m; path = Sources/CssTokenizer.m; sourceTree = ""; }; - 6E8514D911B2E31E0071A4FD /* CssTokens.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CssTokens.m; path = Sources/CssTokens.m; sourceTree = ""; }; - 6E8514DC11B2E3290071A4FD /* CssTokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CssTokens.h; path = Headers/CssTokens.h; sourceTree = ""; }; - 6E85152511B2E7B80071A4FD /* CssParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CssParserTests.m; path = UnitTests/CssParserTests.m; sourceTree = ""; }; - 6E85154F11B2E93E0071A4FD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 6E85155511B2E94E0071A4FD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6EAE4E5511B2F0A7001073B4 /* testcase.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = testcase.css; path = UnitTests/Resources/CSS/testcase.css; sourceTree = ""; }; - 6EB460921183D16000685649 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - BEF31F3A0F352DF5000DE5D2 /* libextThree20CSSStyle.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libextThree20CSSStyle.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* extCSSStyleUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = extCSSStyleUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E645AA111876E2B00F08CB1 /* libThree20Core.a in Frameworks */, - 6EB460DA1183D8CB00685649 /* libextThree20CSSStyle.a in Frameworks */, - 6E036A2011B364670025E8EE /* libThree20Network.a in Frameworks */, - 6E036A2111B364670025E8EE /* libThree20Style.a in Frameworks */, - 6E036B6911B38DA30025E8EE /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libextThree20CSSStyle.a */, - EB9E6C6210B6A8F800DE563C /* extCSSStyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6E036B3611B38A420025E8EE /* README.mdown */, - 6E646518118805EB00F08CB1 /* extThree20CSSStyle.h */, - 66313D671267BFCF00C09C9F /* extThree20CSSStyle_Prefix.pch */, - 66E722D1129392EB007134B0 /* TTExtensionLoader.h */, - 66E722CC129392DD007134B0 /* TTExtensionLoader.m */, - 6EB4609C1183D1E000685649 /* Source */, - 6ED118E41183C38A0096AEBF /* Configurations */, - 6E645A4311876CFE00F08CB1 /* Dependencies */, - 6E036DD511B488A00025E8EE /* Frameworks */, - 6E036D1F11B488690025E8EE /* Resources */, - 6ED117ED1183BE770096AEBF /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 663DB00612661D6F00CF8CEA /* Xcode 3.2.4 Workaround */ = { - isa = PBXGroup; - children = ( - 663DB00712661D6F00CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m */, - ); - name = "Xcode 3.2.4 Workaround"; - sourceTree = ""; - }; - 6E036A0F11B364530025E8EE /* Products */ = { - isa = PBXGroup; - children = ( - 6E036A1411B364530025E8EE /* libThree20Network.a */, - 6E036A1611B364530025E8EE /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E036A1811B3645C0025E8EE /* Products */ = { - isa = PBXGroup; - children = ( - 6E036A1D11B3645C0025E8EE /* libThree20Style.a */, - 6E036A1F11B3645C0025E8EE /* StyleUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E036A2A11B364AF0025E8EE /* CSS Parser */ = { - isa = PBXGroup; - children = ( - 6E8514DD11B2E32E0071A4FD /* Tokenizer */, - 6E85145311B1B5390071A4FD /* TTCSSParser.h */, - 6E85145111B1B5200071A4FD /* TTCSSParser.m */, - ); - name = "CSS Parser"; - sourceTree = ""; - }; - 6E036A2B11B364B60025E8EE /* CSS Stylesheet */ = { - isa = PBXGroup; - children = ( - 6E036A3111B364DF0025E8EE /* TTCSSStyleSheet.h */, - 6E036A2E11B364CC0025E8EE /* TTCSSStyleSheet.m */, - 6E036D1711B487CF0025E8EE /* TTDefaultCSSStyleSheet.h */, - 6E036D1811B487CF0025E8EE /* TTDefaultCSSStyleSheet.m */, - ); - name = "CSS Stylesheet"; - sourceTree = ""; - }; - 6E036D1F11B488690025E8EE /* Resources */ = { - isa = PBXGroup; - children = ( - 6E0835AB11B4C3A200B99C32 /* extThree20CSSStyle.bundle */, - ); - name = Resources; - sourceTree = ""; - }; - 6E036DD511B488A00025E8EE /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6E85154F11B2E93E0071A4FD /* Foundation.framework */, - 6E85155511B2E94E0071A4FD /* CoreGraphics.framework */, - 6E036B6111B38D1B0025E8EE /* UIKit.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E083B5111B6121B00B99C32 /* Grammar */ = { - isa = PBXGroup; - children = ( - 6E083B5311B6122800B99C32 /* Build.Command */, - 6E083B5411B6122F00B99C32 /* css.grammar */, - ); - name = Grammar; - sourceTree = ""; - }; - 6E645A4311876CFE00F08CB1 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E083B5111B6121B00B99C32 /* Grammar */, - 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */, - 6E036A0E11B364530025E8EE /* Three20Network.xcodeproj */, - 6E036A1711B3645C0025E8EE /* Three20Style.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E645A6B11876D3F00F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E645A7011876D3F00F08CB1 /* libThree20Core.a */, - 6E645A7211876D3F00F08CB1 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E8514DD11B2E32E0071A4FD /* Tokenizer */ = { - isa = PBXGroup; - children = ( - 6E8514DC11B2E3290071A4FD /* CssTokens.h */, - 6E8514D811B2E31E0071A4FD /* CssTokenizer.m */, - 6E8514D911B2E31E0071A4FD /* CssTokens.m */, - ); - name = Tokenizer; - sourceTree = ""; - }; - 6EB4609C1183D1E000685649 /* Source */ = { - isa = PBXGroup; - children = ( - 6E036A2A11B364AF0025E8EE /* CSS Parser */, - 6E036A2B11B364B60025E8EE /* CSS Stylesheet */, - ); - name = Source; - sourceTree = ""; - }; - 6ED117E51183BE2A0096AEBF /* Resources */ = { - isa = PBXGroup; - children = ( - 6EB460921183D16000685649 /* UnitTests-Info.plist */, - 6EAE4E5511B2F0A7001073B4 /* testcase.css */, - ); - name = Resources; - sourceTree = ""; - }; - 6ED117ED1183BE770096AEBF /* Tests */ = { - isa = PBXGroup; - children = ( - 6ED117E51183BE2A0096AEBF /* Resources */, - 663DB00612661D6F00CF8CEA /* Xcode 3.2.4 Workaround */, - 6E85152511B2E7B80071A4FD /* CssParserTests.m */, - 6E036A7711B371150025E8EE /* CssStyleSheetTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6ED118E41183C38A0096AEBF /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E55A4B31183CA80002768DE /* Library.xcconfig */, - 6E6454021184BDD500F08CB1 /* Project.xcconfig */, - 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3C3470118806590079637E /* extThree20CSSStyle.h in Headers */, - 6E85145411B1B5390071A4FD /* TTCSSParser.h in Headers */, - 6E8514ED11B2E3F30071A4FD /* CssTokens.h in Headers */, - 6E036A3211B364DF0025E8EE /* TTCSSStyleSheet.h in Headers */, - 6E036D1911B487CF0025E8EE /* TTDefaultCSSStyleSheet.h in Headers */, - 66E722D3129392EB007134B0 /* TTExtensionLoader.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* extThree20CSSStyle */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "extThree20CSSStyle" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E3C34AD118807DC0079637E /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E667E131AE00F00ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E645A7D11876D5800F08CB1 /* PBXTargetDependency */, - 6E036A2311B3646F0025E8EE /* PBXTargetDependency */, - 6E036A2511B3646F0025E8EE /* PBXTargetDependency */, - ); - name = extThree20CSSStyle; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libextThree20CSSStyle.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* extThree20CSSStyleUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "extThree20CSSStyleUnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6E645AA611876E3500F08CB1 /* PBXTargetDependency */, - 6EB460DE1183D8D400685649 /* PBXTargetDependency */, - ); - name = extThree20CSSStyleUnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* extCSSStyleUnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "extThree20CSSStyle" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E645A6B11876D3F00F08CB1 /* Products */; - ProjectRef = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E036A0F11B364530025E8EE /* Products */; - ProjectRef = 6E036A0E11B364530025E8EE /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E036A1811B3645C0025E8EE /* Products */; - ProjectRef = 6E036A1711B3645C0025E8EE /* Three20Style.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* extThree20CSSStyle */, - EB9E6C6110B6A8F800DE563C /* extThree20CSSStyleUnitTests */, - 6E083B2C11B6113900B99C32 /* Grammar */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E036A1411B364530025E8EE /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E036A1311B364530025E8EE /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E036A1611B364530025E8EE /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E036A1511B364530025E8EE /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E036A1D11B3645C0025E8EE /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E036A1C11B3645C0025E8EE /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E036A1F11B3645C0025E8EE /* StyleUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = StyleUnitTests.octest; - remoteRef = 6E036A1E11B3645C0025E8EE /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645A7011876D3F00F08CB1 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E645A6F11876D3F00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645A7211876D3F00F08CB1 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E645A7111876D3F00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EAE4E5611B2F0A7001073B4 /* testcase.css in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E667E131AE00F00ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E083B2B11B6113900B99C32 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cd Grammars\nbash Build.Command"; - }; - 6E3C34AD118807DC0079637E /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E85154011B2E8660071A4FD /* TTCSSParser.m in Sources */, - 6E8514DA11B2E31E0071A4FD /* CssTokenizer.m in Sources */, - 6E8514DB11B2E31E0071A4FD /* CssTokens.m in Sources */, - 6E036A3011B364CC0025E8EE /* TTCSSStyleSheet.m in Sources */, - 6E036D1A11B487CF0025E8EE /* TTDefaultCSSStyleSheet.m in Sources */, - 66E722D0129392DD007134B0 /* TTExtensionLoader.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E036A7D11B371790025E8EE /* CssStyleSheetTests.m in Sources */, - 6E85152611B2E7B80071A4FD /* CssParserTests.m in Sources */, - 663DB00812661D6F00CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E036A2311B3646F0025E8EE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E036A2211B3646F0025E8EE /* PBXContainerItemProxy */; - }; - 6E036A2511B3646F0025E8EE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E036A2411B3646F0025E8EE /* PBXContainerItemProxy */; - }; - 6E645A7D11876D5800F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E645A7C11876D5800F08CB1 /* PBXContainerItemProxy */; - }; - 6E645AA611876E3500F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6E645AA511876E3500F08CB1 /* PBXContainerItemProxy */; - }; - 6EB460DE1183D8D400685649 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* extThree20CSSStyle */; - targetProxy = 6EB460DD1183D8D400685649 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E083B2D11B6113900B99C32 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - PRODUCT_NAME = Grammar; - }; - name = Debug; - }; - 6E083B2E11B6113900B99C32 /* Internal */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = Grammar; - }; - name = Internal; - }; - 6E083B2F11B6113900B99C32 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PRODUCT_NAME = Grammar; - ZERO_LINK = NO; - }; - name = Release; - }; - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( - EXTJSON_SBJSON, - DEBUG, - ); - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - EXTJSON_SBJSON, - DEBUG, - ); - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_PREPROCESSOR_DEFINITIONS = EXTJSON_SBJSON; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6E083B3411B6114E00B99C32 /* Build configuration list for PBXAggregateTarget "Grammar" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6E083B2D11B6113900B99C32 /* Debug */, - 6E083B2E11B6113900B99C32 /* Internal */, - 6E083B2F11B6113900B99C32 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "extThree20CSSStyle" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "extThree20CSSStyle" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "extThree20CSSStyleUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/extThree20JSON/Configurations/Library+SBJSON.xcconfig b/src/extThree20JSON/Configurations/Library+SBJSON.xcconfig deleted file mode 100644 index 946e2fe963..0000000000 --- a/src/extThree20JSON/Configurations/Library+SBJSON.xcconfig +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = extThree20JSON -PRODUCT_NAME = $(BASE_PRODUCT_NAME)+SBJSON -BUILD_LIBRARY_VERSION = 1.0 - -// We override these paths in order to copy the headers to the same directory, -// regardless of target. -PRIVATE_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)/private -PUBLIC_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME) - -GCC_PREFIX_HEADER = $(SRCROOT)/Headers/$(BASE_PRODUCT_NAME)+SBJSON_Prefix.pch diff --git a/src/extThree20JSON/Configurations/Library+YAJL.xcconfig b/src/extThree20JSON/Configurations/Library+YAJL.xcconfig deleted file mode 100644 index 7300451e71..0000000000 --- a/src/extThree20JSON/Configurations/Library+YAJL.xcconfig +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = extThree20JSON -PRODUCT_NAME = $(BASE_PRODUCT_NAME)+YAJL -BUILD_LIBRARY_VERSION = 1.0 - -// We override these paths in order to copy the headers to the same directory, -// regardless of target. -PRIVATE_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)/private -PUBLIC_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME) - -GCC_PREFIX_HEADER = $(SRCROOT)/Headers/$(BASE_PRODUCT_NAME)+YAJL_Prefix.pch diff --git a/src/extThree20JSON/Configurations/Project.xcconfig b/src/extThree20JSON/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/extThree20JSON/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/extThree20JSON/Configurations/UnitTests+SBJSON.xcconfig b/src/extThree20JSON/Configurations/UnitTests+SBJSON.xcconfig deleted file mode 100644 index 16b1b4383d..0000000000 --- a/src/extThree20JSON/Configurations/UnitTests+SBJSON.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = extJSONUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME)+SBJSON -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(UIKIT_FX) diff --git a/src/extThree20JSON/Headers/TTErrorCodes.h b/src/extThree20JSON/Headers/TTErrorCodes.h deleted file mode 100644 index b25f0f97c1..0000000000 --- a/src/extThree20JSON/Headers/TTErrorCodes.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -extern NSString* const kTTExtJSONErrorDomain; -extern NSInteger const kTTExtJSONErrorCodeInvalidJSON; - diff --git a/src/extThree20JSON/Headers/TTExtensionLoader.h b/src/extThree20JSON/Headers/TTExtensionLoader.h deleted file mode 100644 index 350754d3bd..0000000000 --- a/src/extThree20JSON/Headers/TTExtensionLoader.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTExtensionLoader.h" - -@interface TTExtensionLoader (TTJSONExtension) - -@end diff --git a/src/extThree20JSON/Headers/TTURLJSONResponse.h b/src/extThree20JSON/Headers/TTURLJSONResponse.h deleted file mode 100644 index 925c4d8cb5..0000000000 --- a/src/extThree20JSON/Headers/TTURLJSONResponse.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Network -#import "Three20Network/TTURLResponse.h" - -/** - * An implementation of the TTURLResponse protocal for turning JSON responses into NSObjects. - */ -@interface TTURLJSONResponse : NSObject { - id _rootObject; -} - -@property (nonatomic, retain, readonly) id rootObject; - -@end diff --git a/src/extThree20JSON/Headers/extThree20JSON+SBJSON_Prefix.pch b/src/extThree20JSON/Headers/extThree20JSON+SBJSON_Prefix.pch deleted file mode 100644 index f2195d7988..0000000000 --- a/src/extThree20JSON/Headers/extThree20JSON+SBJSON_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'extThree20JSON+SBJSON' target in the 'extThree20JSON' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/src/extThree20JSON/Headers/extThree20JSON+YAJL_Prefix.pch b/src/extThree20JSON/Headers/extThree20JSON+YAJL_Prefix.pch deleted file mode 100644 index d0d3ec1a1a..0000000000 --- a/src/extThree20JSON/Headers/extThree20JSON+YAJL_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'extThree20JSON+YAJL' target in the 'extThree20JSON' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/src/extThree20JSON/Headers/extThree20JSON.h b/src/extThree20JSON/Headers/extThree20JSON.h deleted file mode 100644 index 48058e62b5..0000000000 --- a/src/extThree20JSON/Headers/extThree20JSON.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20JSON/TTErrorCodes.h" -#import "extThree20JSON/TTURLJSONResponse.h" diff --git a/src/extThree20JSON/README.mdown b/src/extThree20JSON/README.mdown deleted file mode 100644 index 107b9be3f4..0000000000 --- a/src/extThree20JSON/README.mdown +++ /dev/null @@ -1,59 +0,0 @@ - -extJSON -======= - -This extension provides JSON support from multiple vendors. The vendors are listed below. - -Dependencies ------------- - -* Core -* Network - -Using it in your App --------------------- - -Add the `extThree20JSON.xcodeproj` file to your project. Add `extThree20JSON+.a` to your -"Link Binary With Libraries" phase, and add `extThree20JSON+` as a dependency. - -Import the following into your precompiled header or wherever you need access to -`TTURLJSONResponse`. - - #import "extThree20JSON/extThree20JSON.h" - -Provided Vendors ----------------- - -* SBJSON 2.2.3 (March 7, 2010) [http://code.google.com/p/json-framework/](http://code.google.com/p/json-framework/) -* YAJL 0.2.16 (April 15, 2010) [http://lloyd.github.com/yajl/](http://lloyd.github.com/yajl/) - -Breakdown ---------- - -This library provides targets for each supported vendor. When you include extJSON in your app, -you can choose which library you want to build against by adding the specific lib to your -linking phase as well as adding the lib's target to your dependencies. - -Once you have selected a vendor, you may use `TTURLJSONResponse` to handle JSON responses. All -vendors expose a `TTURLJSONResponse` object for use so that you can seamlessly switch vendors -without breaking any of your code. - -Troubleshooting ---------------- - -### What if I'm already using one of the vendors in my project? - -Solution 1) Remove the vendor from your project and use the version included -in Three20 (which will generally be up-to-date). You can access your vendor's header files using - - #import "extThree20JSON/" - -For example, with SBJSON: - - #import "extThree20JSON/SBJSON.h" - -Solution 2) Take a look at `TTURLJSONResponse` and copy the implementation into your -own project. It's pretty simple. - -You'd likely want to use this solution if you strictly depend on an older version of one of -the above vendors. diff --git a/src/extThree20JSON/Source/TTErrorCodes.m b/src/extThree20JSON/Source/TTErrorCodes.m deleted file mode 100644 index 1ff2474cd6..0000000000 --- a/src/extThree20JSON/Source/TTErrorCodes.m +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -NSString* const kTTExtJSONErrorDomain = @"three20.ext.json"; -NSInteger const kTTExtJSONErrorCodeInvalidJSON = 100; - diff --git a/src/extThree20JSON/Source/TTExtensionLoader.m b/src/extThree20JSON/Source/TTExtensionLoader.m deleted file mode 100644 index 16cb9966e8..0000000000 --- a/src/extThree20JSON/Source/TTExtensionLoader.m +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20JSON/TTExtensionLoader.h" - -// Core -#import "Three20Core/TTExtensionAuthor.h" -#import "Three20Core/TTExtensionInfo.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTExtensionLoader (TTJSONExtension) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadExtensionNamedThree20JSON { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTExtensionInfo*)extensionInfoNamedThree20JSON { - TTExtensionInfo* extension = [[TTExtensionInfo alloc] init]; - - extension.name = @"Three20 JSON"; - extension.description = @"The JSON extension provides support for parsing json files and receiving JSON responses."; - extension.version = @"1.0"; - extension.copyright = @"Copyright 2009-2010 Facebook."; - extension.license = @"Apache 2.0"; - extension.authors = [NSArray arrayWithObjects: - [TTExtensionAuthor authorWithName:@"Jeff Verkoeyen"], - nil]; - -#ifdef EXTJSON_SBJSON - extension.version = [extension.version stringByAppendingString:@" SBJSON 2.3.1"]; - extension.copyright = [extension.copyright stringByAppendingString:@" 2009-2010 Stig Brautaset."]; -#elif defined(EXTJSON_YAJL) - extension.version = [extension.version stringByAppendingString:@" YAJL 1.0.11"]; - extension.copyright = [extension.copyright stringByAppendingString:@" 2009 Gabriel Handford. 2010 Lloyd Hilaiel."]; -#endif - - return [extension autorelease]; -} - - -@end - diff --git a/src/extThree20JSON/Source/TTURLJSONResponse.m b/src/extThree20JSON/Source/TTURLJSONResponse.m deleted file mode 100644 index e3bc5938b8..0000000000 --- a/src/extThree20JSON/Source/TTURLJSONResponse.m +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20JSON/TTURLJSONResponse.h" - -// extJSON -#import "extThree20JSON/TTErrorCodes.h" -#ifdef EXTJSON_SBJSON -#import "extThree20JSON/JSON.h" -#elif defined(EXTJSON_YAJL) -#import "extThree20JSON/NSObject+YAJL.h" -#endif - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLJSONResponse - -@synthesize rootObject = _rootObject; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_rootObject); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLResponse - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSError*)request:(TTURLRequest*)request processResponse:(NSHTTPURLResponse*)response - data:(id)data { - // This response is designed for NSData objects, so if we get anything else it's probably a - // mistake. - TTDASSERT([data isKindOfClass:[NSData class]]); - TTDASSERT(nil == _rootObject); - NSError* err = nil; - if ([data isKindOfClass:[NSData class]]) { -#ifdef EXTJSON_SBJSON - NSString* json = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - _rootObject = [[json JSONValue] retain]; - TT_RELEASE_SAFELY(json); - if (!_rootObject) { - err = [NSError errorWithDomain:kTTExtJSONErrorDomain - code:kTTExtJSONErrorCodeInvalidJSON - userInfo:nil]; - } -#elif defined(EXTJSON_YAJL) - @try { - _rootObject = [[data yajl_JSON] retain]; - } - @catch (NSException* exception) { - err = [NSError errorWithDomain:kTTExtJSONErrorDomain - code:kTTExtJSONErrorCodeInvalidJSON - userInfo:[exception userInfo]]; - } -#endif - } - - return err; -} - - -@end - diff --git a/src/extThree20JSON/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/extThree20JSON/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/extThree20JSON/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/extThree20JSON/UnitTests/extJSONTests+SBJSON.m b/src/extThree20JSON/UnitTests/extJSONTests+SBJSON.m deleted file mode 100644 index 28750ba291..0000000000 --- a/src/extThree20JSON/UnitTests/extJSONTests+SBJSON.m +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/905-A-Unit-Test_Result_Macro_Reference/unit-test_results.html#//apple_ref/doc/uid/TP40007959-CH21-SW2 -// for unit test macros. - -// See Also: http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html - -#import - -#import "extThree20JSON/JSON.h" - -/** - * Unit tests for the Core JSON parser. These tests are a part of the comprehensive test suite - * for the Core functionality of the library. - */ -@interface extJSONTests : SenTestCase -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation extJSONTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testJSONParser_invalid { - // Empty/failure cases - STAssertNil([@"" JSONValue], @"Empty string should be a nil value"); - STAssertNil([@" " JSONValue], @"Blank string should be a nil value"); - STAssertNil([@"garble" JSONValue], @"Garble string should be a nil value"); - STAssertNil([@"\"hai\"" JSONValue], @"Quoted string should be a nil value"); - STAssertNil([@"0" JSONValue], @"Number should be a nil value"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testJSONParser_empty { - STAssertTrue([[@"[]" JSONValue] isKindOfClass:[NSArray class]], @"Array should be an array"); - STAssertTrue([[@"{}" JSONValue] isKindOfClass:[NSDictionary class]], - @"Dictionary should be a dictionary"); - STAssertEquals([[@"[]" JSONValue] count], (NSUInteger)0, @"Empty array should be empty"); - STAssertEquals([[@"{}" JSONValue] count], (NSUInteger)0, @"Empty dictionary should be empty"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testJSONParser_oneItem { - STAssertTrue([[@"[0]" JSONValue] isKindOfClass:[NSArray class]], @"Array should be an array"); - STAssertTrue([[@"{\"a\":0}" JSONValue] isKindOfClass:[NSDictionary class]], - @"Dictionary should be a dictionary"); - STAssertEquals([[@"[0]" JSONValue] count], (NSUInteger)1, - @"Single-item array should have one item"); - STAssertEquals([[@"{\"a\":0}" JSONValue] count], (NSUInteger)1, - @"Single-item dictionary should have one item"); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testJSONParser_nested { - id json = [@"[{\"a\":0}]" JSONValue]; - STAssertTrue([json isKindOfClass:[NSArray class]], @"Array should be an array"); - STAssertTrue([[json objectAtIndex:0] isKindOfClass:[NSDictionary class]], - @"Nested dictionary should be a dictionary"); - STAssertEquals([[json objectAtIndex:0] count], (NSUInteger)1, - @"Single-item dictionary should have one item"); -} - - -@end diff --git a/src/extThree20JSON/Vendors/JSON/Changes.markdown b/src/extThree20JSON/Vendors/JSON/Changes.markdown deleted file mode 100755 index 922afccf35..0000000000 --- a/src/extThree20JSON/Vendors/JSON/Changes.markdown +++ /dev/null @@ -1,142 +0,0 @@ -# JSON Framework Changes - -## Version 2.3.1 (September 25th, 2010) - -### Changes - -* Renamed .md files to .markdown. -* Removed bench target--use [Sam Soffes's benchmarks][json-benchmark] instead. - -[json-benchmark]: http://github.com/samsoffes/json-benchmark - -### Bug fixes - -* [Issue 2][issue#2]: Linkage not supported by default distribution. -* [Issue 4][issue#4]: Writer reported to occasionally fail infinity check. -* [Issue 8][issue#8]: Installation.markdown refers to missing JSON folder. - -[issue#2]: http://github.com/stig/json-framework/issues/closed/#issue/2 -[issue#4]: http://github.com/stig/json-framework/issues/closed/#issue/4 -[issue#8]: http://github.com/stig/json-framework/issues/closed/#issue/8 - -## Version 2.3 (August 7, 2010) - -* Renamed README.md to Readme.md -* Updated version number - -## Version 2.3beta1 (July 31, 2010) - -### Changes - -* **Parsing performance improvements.** -[Issue 56][issue-56]: Dewvinci & Tobias Hoehmann came up with a patch to improve parsing of short JSON texts with lots of numbers by over 60%. -* **Refactored tests to be more data-driven.** -This should make the source leaner and easier to maintain. -* **Removed problematic SDK** -[Issue 33][issue-33], [58][issue-58], [63][issue-63], and [64][issue-64]: The vast majority of the issues people are having with this framework were related to the somewhat mystical Custom SDK. This has been removed in this version. -* **Removed the deprecated SBJSON facade** -[Issue 71][issue-71]: You should use the SBJsonParser or SBJsonWriter classes, or the category methods, instead. This also let us remove the SBJsonParser and SBJsonWriter categories; these were only there to support the facade, but made the code less transparent. -* **Removed the deprecated fragment support** -[Issue 70][issue-70]: Fragments were a bad idea from the start, but deceptively useful while writing the framework's test suite. This has now been rectified. - -[issue-56]: http://code.google.com/p/json-framework/issues/detail?id=56 -[issue-33]: http://code.google.com/p/json-framework/issues/detail?id=33 -[issue-58]: http://code.google.com/p/json-framework/issues/detail?id=58 -[issue-63]: http://code.google.com/p/json-framework/issues/detail?id=63 -[issue-64]: http://code.google.com/p/json-framework/issues/detail?id=64 -[issue-70]: http://code.google.com/p/json-framework/issues/detail?id=70 -[issue-71]: http://code.google.com/p/json-framework/issues/detail?id=71 - - -### Bug Fixes - -* [Issue 38][issue-38]: Fixed header-inclusion issue. -* [Issue 74][issue-74]: Fix bug in handling of Infinity, -Infinity & NaN. -* [Issue 68][issue-68]: Fixed documentation bug - -[issue-38]: http://code.google.com/p/json-framework/issues/detail?id=39 -[issue-74]: http://code.google.com/p/json-framework/issues/detail?id=74 -[issue-68]: http://code.google.com/p/json-framework/issues/detail?id=68 - - -## Version 2.2.3 (March 7, 2010) - -* **Added -all_load to libjsontests linker flags.** -This allows the tests to run with more recent versions of GCC. -* **Unable to do a JSONRepresentation for a first-level proxy object.** -[Issue 54][issue-54] & [60][issue-60]: Allow the -proxyForJson method to be called for first-level proxy objects, in addition to objects that are embedded in other objects. - -[issue-54]: http://code.google.com/p/json-framework/issues/detail?id=54 -[issue-60]: http://code.google.com/p/json-framework/issues/detail?id=60 - -## Version 2.2.2 (September 12, 2009) - -* **Fixed error-reporting logic in category methods.** -Reported by Mike Monaco. -* **iPhone SDK built against iPhoneOS 3.0.** -This has been updated from 2.2.1. - -## Version 2.2.1 (August 1st, 2009) - -* **Added svn:ignore property to build directory.** -Requested by Rony Kubat. -* **Fixed potential corruption in category methods.** -If category methods were used in multiple threads they could potentially cause a crash. Reported by dprotaso / Relium. - -## Version 2.2 (June 6th, 2009) - -No changes since 2.2beta1. - -## Version 2.2beta1 (May 30th, 2009) - -* **Renamed method for custom object support** -Renamed the -jsonRepresentationProxy method to -proxyForJson. - -## Version 2.2alpha5 (May 25th, 2009) - -* **Added support for custom objects (generation only)** -Added an optional -jsonRepresentationProxy method that you can implement (either directly or as category) to enable JSON.framework to create a JSON representation of any object type. See the Tests/ProxyTest.m file for more information on how this works. -* **Moved maxDepth to SBJsonBase** -Throw errors when the input is nested too deep for writing json as well as parsing. This allows us to exit cleanly rather than break the stack if someone accidentally creates a recursive structure. - -## Version 2.2alpha4 (May 21st, 2009) - -* **Renamed protocols and moved method declarations** -Renamed SBJsonWriterOptions and SBJsonParserOptions protocols to be the same as their primary implementations and moved their one public method there. -* **Implemented proxy methods in SBJSON** -This facade now implements the same methods as the SBJsonWriter and SBJsonParser objects, and simply forwards to them. -* **Extracted private methods to private protocol** -Don't use these please. -* **Improved documentation generation** -Classes now inherit documentation from their superclasses and protocols they implement. - -## Version 2.2alpha3 (May 16th, 2009) - -* **Reintroduced the iPhone Custom SDK** -For the benefit of users who prefer not to copy the JSON source files into their project. Also updated it to be based on iPhoneOS v2.2.1. -* **Deprecated methods for dealing with fragments** -Tweaked the new interface classes to support the old fragment-methods one more version. - -## Version 2.2alpha2 (May 11th, 2009) - -* **Added a Changes file.** -So people can see what the changes are for each version without having to go to the project home page. -* **Updated Credits.** -Some people that have provided patches (or other valuable contributions) had been left out. I've done my best to add those in. (If you feel that you or someone else are still missing, please let me know.) -* **Removed .svn folders from distribution.** -The JSON source folder had a .svn folder in it, which could have caused problems when dragging it into your project. - -## Version 2.2alpha1 (May 10th, 2009) - -* **Improved installation instructions, particularly for the iPhone.** -Getting the SDK to work properly in all configurations has proved to be a headache. Therefore the SDK has been removed in favour of instructions for simply copying the source files into your project. -* **Split the SBJSON class into a writer and parser class.** -SBJSON remains as a facade for backwards compatibility. This refactoring also quashed warnings reported by the Clang static analyser. -* **Improved interface for dealing with errors.** -Rather than having to pass in a pointer to an NSError object, you can now simply call a method to get the error stack back if there was an error. (The NSError-based API remains in the SBJSON facade, but is not present in the new classes.) -* **Documentation updates.** -Minor updates to the documentation. - -Release notes for earlier releases can be found here: -http://code.google.com/p/json-framework/wiki/ReleaseNotes - diff --git a/src/extThree20JSON/Vendors/JSON/Credits.markdown b/src/extThree20JSON/Vendors/JSON/Credits.markdown deleted file mode 100755 index cc16c08402..0000000000 --- a/src/extThree20JSON/Vendors/JSON/Credits.markdown +++ /dev/null @@ -1,47 +0,0 @@ -# Credits - -Without these people JSON Framework wouldn't be what it is today. Please let me know if I've mistakenly omitted anyone. - -## Blake Seely -Inspiration for early versions of this framwork came from Blake's BSJSONAdditions. - -## Marc Lehmann -Marc is the author of the excellent JSON::XS Perl module. The number validation routine in my framework is re-licensed from his module, with his permission. - -## Jens Alfke, jens@mooseyard.com, http://mooseyard.com/Jens/ -Patches that gave a speedup of 11 times for generation and 5 times for parsing of the long (about 12k) JSON string I was using for testing. - -## Greg Bolsinga -* Patch for dropping the dependency on AppKit, making this a Foundation framework. -* Patch for building a static library, and instructions for creating a custom SDK suitable for the iPhone. - -## Ben Rimmington -Patch speeding writing up by about 100% and parsing by 10% for certain inputs. - -##renerattur -Patch to remove memory leak. - -## dmaclach -* Patch to be warning-free with -Wparanthesis. -* Prompted me to fix some Clang static analysis errors. - -## boredzo -Patch to stop memory leak in -JSONValue and friends. - -## Adium, http://adiumx.com -Provided patch to fix crash when parsing facebook chat responses. - -## Joerg Schwieder -Patch to install instructions for use of static library. - -## Mike Monaco -Pointed out embarrasing mistake in logic to report errors in the category methods of 2.2.1. - -## dewvinci & Tobias Höhmann -Performance patch for integer numbers and strings without special characters. - -## George MacKerron -Reported bug in SBJsonWriter's handling of NaN, Infinity and -Infinity. - -## jinksys -Reported bug with header inclusion of framework. diff --git a/src/extThree20JSON/Vendors/JSON/JSON.h b/src/extThree20JSON/Vendors/JSON/JSON.h deleted file mode 100755 index 23f2ea176e..0000000000 --- a/src/extThree20JSON/Vendors/JSON/JSON.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2009-2010 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - A strict JSON parser and generator for Objective-C - - JSON (JavaScript Object Notation) is a lightweight data-interchange - format. This framework provides two apis for parsing and generating - JSON. One standard object-based and a higher level api consisting of - categories added to existing Objective-C classes. - - This framework does its best to be as strict as possible, both in what it accepts and what it generates. For example, it does not support trailing commas in arrays or objects. Nor does it support embedded comments, or anything else not in the JSON specification. This is considered a feature. - - @section Links - - @li Project home page. - @li Online version of the API documentation. - -*/ - - -// This setting of 1 is best if you copy the source into your project. -// The build transforms the 1 to a 0 when building the framework and static lib. - -#if 1 - -#import "extThree20JSON/SBJsonParser.h" -#import "extThree20JSON/SBJsonWriter.h" -#import "extThree20JSON/NSObject+SBJSON.h" -#import "extThree20JSON/NSString+SBJSON.h" - -#else - -#import -#import -#import -#import - -#endif diff --git a/src/extThree20JSON/Vendors/JSON/NSObject+SBJSON.h b/src/extThree20JSON/Vendors/JSON/NSObject+SBJSON.h deleted file mode 100755 index 8e9620e682..0000000000 --- a/src/extThree20JSON/Vendors/JSON/NSObject+SBJSON.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - - -/** - @brief Adds JSON generation to Foundation classes - - This is a category on NSObject that adds methods for returning JSON representations - of standard objects to the objects themselves. This means you can call the - -JSONRepresentation method on an NSArray object and it'll do what you want. - */ -@interface NSObject (NSObject_SBJSON) - -/** - @brief Returns a string containing the receiver encoded in JSON. - - This method is added as a category on NSObject but is only actually - supported for the following objects: - @li NSDictionary - @li NSArray - */ -- (NSString *)JSONRepresentation; - -@end - diff --git a/src/extThree20JSON/Vendors/JSON/NSObject+SBJSON.m b/src/extThree20JSON/Vendors/JSON/NSObject+SBJSON.m deleted file mode 100755 index 7263d14e40..0000000000 --- a/src/extThree20JSON/Vendors/JSON/NSObject+SBJSON.m +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "extThree20JSON/NSObject+SBJSON.h" -#import "extThree20JSON/SBJsonWriter.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -TT_FIX_CATEGORY_BUG(NSObject_SBJSON) - -@implementation NSObject (NSObject_SBJSON) - -- (NSString *)JSONRepresentation { - SBJsonWriter *jsonWriter = [SBJsonWriter new]; - NSString *json = [jsonWriter stringWithObject:self]; - if (!json) - NSLog(@"-JSONRepresentation failed. Error trace is: %@", [jsonWriter errorTrace]); - [jsonWriter release]; - return json; -} - -@end diff --git a/src/extThree20JSON/Vendors/JSON/NSString+SBJSON.h b/src/extThree20JSON/Vendors/JSON/NSString+SBJSON.h deleted file mode 100755 index 029aa309d3..0000000000 --- a/src/extThree20JSON/Vendors/JSON/NSString+SBJSON.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -/** - @brief Adds JSON parsing methods to NSString - -This is a category on NSString that adds methods for parsing the target string. -*/ -@interface NSString (NSString_SBJSON) - -/** - @brief Returns the NSDictionary or NSArray represented by the current string's JSON representation. - - Returns the dictionary or array represented in the receiver, or nil on error. - - Returns the NSDictionary or NSArray represented by the current string's JSON representation. - */ -- (id)JSONValue; - -@end diff --git a/src/extThree20JSON/Vendors/JSON/NSString+SBJSON.m b/src/extThree20JSON/Vendors/JSON/NSString+SBJSON.m deleted file mode 100755 index 32d7c76664..0000000000 --- a/src/extThree20JSON/Vendors/JSON/NSString+SBJSON.m +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "extThree20JSON/NSString+SBJSON.h" -#import "extThree20JSON/SBJsonParser.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -TT_FIX_CATEGORY_BUG(NSString_SBJSON) - -@implementation NSString (NSString_SBJSON) - -- (id)JSONValue -{ - SBJsonParser *jsonParser = [SBJsonParser new]; - id repr = [jsonParser objectWithString:self]; - if (!repr) - NSLog(@"-JSONValue failed. Error trace is: %@", [jsonParser errorTrace]); - [jsonParser release]; - return repr; -} - -@end diff --git a/src/extThree20JSON/Vendors/JSON/Readme.markdown b/src/extThree20JSON/Vendors/JSON/Readme.markdown deleted file mode 100755 index a37e3844bc..0000000000 --- a/src/extThree20JSON/Vendors/JSON/Readme.markdown +++ /dev/null @@ -1,28 +0,0 @@ -JSON Framework -============== - -JSON is a light-weight data interchange format that's easy to read and -write for humans and computers alike. This framework implements a strict -JSON parser and generator in Objective-C. - -Features --------- - -* BSD license. -* Easy-to-use API. -* Strict parsing & generation. -* Stack of error available in case of failure so you can easily figure out what is wrong. -* Optional pretty-printing of JSON output. -* Optionally sorted dictionary keys in JSON output. -* Configurable recursion depth for parsing, for added security. - -Links ------ - -* The GitHub [project page][src]. -* The online [API documentation][api]. -* The new [website][web]. - -[api]: http://stig.github.com/json-framework/api -[web]: http://stig.github.com/json-framework -[src]: http://github.com/stig/json-framework diff --git a/src/extThree20JSON/Vendors/JSON/SBJsonBase.h b/src/extThree20JSON/Vendors/JSON/SBJsonBase.h deleted file mode 100755 index 7b108440f0..0000000000 --- a/src/extThree20JSON/Vendors/JSON/SBJsonBase.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import - -extern NSString * SBJSONErrorDomain; - - -enum { - EUNSUPPORTED = 1, - EPARSENUM, - EPARSE, - EFRAGMENT, - ECTRL, - EUNICODE, - EDEPTH, - EESCAPE, - ETRAILCOMMA, - ETRAILGARBAGE, - EEOF, - EINPUT -}; - -/** - @brief Common base class for parsing & writing. - - This class contains the common error-handling code and option between the parser/writer. - */ -@interface SBJsonBase : NSObject { - NSMutableArray *errorTrace; - -@protected - NSUInteger depth, maxDepth; -} - -/** - @brief The maximum recursing depth. - - Defaults to 512. If the input is nested deeper than this the input will be deemed to be - malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can - turn off this security feature by setting the maxDepth value to 0. - */ -@property NSUInteger maxDepth; - -/** - @brief Return an error trace, or nil if there was no errors. - - Note that this method returns the trace of the last method that failed. - You need to check the return value of the call you're making to figure out - if the call actually failed, before you know call this method. - */ - @property(copy,readonly) NSArray* errorTrace; - -/// @internal for use in subclasses to add errors to the stack trace -- (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str; - -/// @internal for use in subclasess to clear the error before a new parsing attempt -- (void)clearErrorTrace; - -@end diff --git a/src/extThree20JSON/Vendors/JSON/SBJsonBase.m b/src/extThree20JSON/Vendors/JSON/SBJsonBase.m deleted file mode 100755 index 455243a8e2..0000000000 --- a/src/extThree20JSON/Vendors/JSON/SBJsonBase.m +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "extThree20JSON/private/SBJsonBase.h" -NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain"; - - -@implementation SBJsonBase - -@synthesize errorTrace; -@synthesize maxDepth; - -- (id)init { - self = [super init]; - if (self) - self.maxDepth = 512; - return self; -} - -- (void)dealloc { - [errorTrace release]; - [super dealloc]; -} - -- (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str { - NSDictionary *userInfo; - if (!errorTrace) { - errorTrace = [NSMutableArray new]; - userInfo = [NSDictionary dictionaryWithObject:str forKey:NSLocalizedDescriptionKey]; - - } else { - userInfo = [NSDictionary dictionaryWithObjectsAndKeys: - str, NSLocalizedDescriptionKey, - [errorTrace lastObject], NSUnderlyingErrorKey, - nil]; - } - - NSError *error = [NSError errorWithDomain:SBJSONErrorDomain code:code userInfo:userInfo]; - - [self willChangeValueForKey:@"errorTrace"]; - [errorTrace addObject:error]; - [self didChangeValueForKey:@"errorTrace"]; -} - -- (void)clearErrorTrace { - [self willChangeValueForKey:@"errorTrace"]; - [errorTrace release]; - errorTrace = nil; - [self didChangeValueForKey:@"errorTrace"]; -} - -@end diff --git a/src/extThree20JSON/Vendors/JSON/SBJsonParser.h b/src/extThree20JSON/Vendors/JSON/SBJsonParser.h deleted file mode 100755 index ab9831ac1b..0000000000 --- a/src/extThree20JSON/Vendors/JSON/SBJsonParser.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import -#import "extThree20JSON/private/SBJsonBase.h" - -/** - @brief The JSON parser class. - - JSON is mapped to Objective-C types in the following way: - - @li Null -> NSNull - @li String -> NSMutableString - @li Array -> NSMutableArray - @li Object -> NSMutableDictionary - @li Boolean -> NSNumber (initialised with -initWithBool:) - @li Number -> (NSNumber | NSDecimalNumber) - - Since Objective-C doesn't have a dedicated class for boolean values, these turns into NSNumber - instances. These are initialised with the -initWithBool: method, and - round-trip back to JSON properly. (They won't silently suddenly become 0 or 1; they'll be - represented as 'true' and 'false' again.) - - As an optimisation short JSON integers turn into NSNumber instances, while complex ones turn into NSDecimalNumber instances. - We can thus avoid any loss of precision as JSON allows ridiculously large numbers. - - */ -@interface SBJsonParser : SBJsonBase { - -@private - const char *c; -} - -/** - @brief Return the object represented by the given string - - Returns the object represented by the passed-in string or nil on error. The returned object can be - a string, number, boolean, null, array or dictionary. - - @param repr the json string to parse - */ -- (id)objectWithString:(NSString *)repr; - -/** - @brief Return the object represented by the given string - - Returns the object represented by the passed-in string or nil on error. The returned object can be - a string, number, boolean, null, array or dictionary. - - @param jsonText the json string to parse - @param error pointer to an NSError object to populate on error - */ - -- (id)objectWithString:(NSString*)jsonText - error:(NSError**)error; - - -@end - - diff --git a/src/extThree20JSON/Vendors/JSON/SBJsonParser.m b/src/extThree20JSON/Vendors/JSON/SBJsonParser.m deleted file mode 100755 index d498993a8d..0000000000 --- a/src/extThree20JSON/Vendors/JSON/SBJsonParser.m +++ /dev/null @@ -1,516 +0,0 @@ -/* - Copyright (C) 2009,2010 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "extThree20JSON/SBJsonParser.h" - -@interface SBJsonParser () - -- (BOOL)scanValue:(NSObject **)o; - -- (BOOL)scanRestOfArray:(NSMutableArray **)o; -- (BOOL)scanRestOfDictionary:(NSMutableDictionary **)o; -- (BOOL)scanRestOfNull:(NSNull **)o; -- (BOOL)scanRestOfFalse:(NSNumber **)o; -- (BOOL)scanRestOfTrue:(NSNumber **)o; -- (BOOL)scanRestOfString:(NSMutableString **)o; - -// Cannot manage without looking at the first digit -- (BOOL)scanNumber:(NSNumber **)o; - -- (BOOL)scanHexQuad:(unichar *)x; -- (BOOL)scanUnicodeChar:(unichar *)x; - -- (BOOL)scanIsAtEnd; - -@end - -#define skipWhitespace(c) while (isspace(*c)) c++ -#define skipDigits(c) while (isdigit(*c)) c++ - - -@implementation SBJsonParser - -static char ctrl[0x22]; - - -+ (void)initialize { - ctrl[0] = '\"'; - ctrl[1] = '\\'; - for (int i = 1; i < 0x20; i++) - ctrl[i+1] = i; - ctrl[0x21] = 0; -} - -- (id)objectWithString:(NSString *)repr { - [self clearErrorTrace]; - - if (!repr) { - [self addErrorWithCode:EINPUT description:@"Input was 'nil'"]; - return nil; - } - - depth = 0; - c = [repr UTF8String]; - - id o; - if (![self scanValue:&o]) { - return nil; - } - - // We found some valid JSON. But did it also contain something else? - if (![self scanIsAtEnd]) { - [self addErrorWithCode:ETRAILGARBAGE description:@"Garbage after JSON"]; - return nil; - } - - NSAssert1(o, @"Should have a valid object from %@", repr); - - // Check that the object we've found is a valid JSON container. - if (![o isKindOfClass:[NSDictionary class]] && ![o isKindOfClass:[NSArray class]]) { - [self addErrorWithCode:EFRAGMENT description:@"Valid fragment, but not JSON"]; - return nil; - } - - return o; -} - -- (id)objectWithString:(NSString*)repr error:(NSError**)error { - id tmp = [self objectWithString:repr]; - if (tmp) - return tmp; - - if (error) - *error = [self.errorTrace lastObject]; - return nil; -} - - -/* - In contrast to the public methods, it is an error to omit the error parameter here. - */ -- (BOOL)scanValue:(NSObject **)o -{ - skipWhitespace(c); - - switch (*c++) { - case '{': - return [self scanRestOfDictionary:(NSMutableDictionary **)o]; - break; - case '[': - return [self scanRestOfArray:(NSMutableArray **)o]; - break; - case '"': - return [self scanRestOfString:(NSMutableString **)o]; - break; - case 'f': - return [self scanRestOfFalse:(NSNumber **)o]; - break; - case 't': - return [self scanRestOfTrue:(NSNumber **)o]; - break; - case 'n': - return [self scanRestOfNull:(NSNull **)o]; - break; - case '-': - case '0'...'9': - c--; // cannot verify number correctly without the first character - return [self scanNumber:(NSNumber **)o]; - break; - case '+': - [self addErrorWithCode:EPARSENUM description: @"Leading + disallowed in number"]; - return NO; - break; - case 0x0: - [self addErrorWithCode:EEOF description:@"Unexpected end of string"]; - return NO; - break; - default: - [self addErrorWithCode:EPARSE description: @"Unrecognised leading character"]; - return NO; - break; - } - - NSAssert(0, @"Should never get here"); - return NO; -} - -- (BOOL)scanRestOfTrue:(NSNumber **)o -{ - if (!strncmp(c, "rue", 3)) { - c += 3; - *o = [NSNumber numberWithBool:YES]; - return YES; - } - [self addErrorWithCode:EPARSE description:@"Expected 'true'"]; - return NO; -} - -- (BOOL)scanRestOfFalse:(NSNumber **)o -{ - if (!strncmp(c, "alse", 4)) { - c += 4; - *o = [NSNumber numberWithBool:NO]; - return YES; - } - [self addErrorWithCode:EPARSE description: @"Expected 'false'"]; - return NO; -} - -- (BOOL)scanRestOfNull:(NSNull **)o { - if (!strncmp(c, "ull", 3)) { - c += 3; - *o = [NSNull null]; - return YES; - } - [self addErrorWithCode:EPARSE description: @"Expected 'null'"]; - return NO; -} - -- (BOOL)scanRestOfArray:(NSMutableArray **)o { - if (maxDepth && ++depth > maxDepth) { - [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; - return NO; - } - - *o = [NSMutableArray arrayWithCapacity:8]; - - for (; *c ;) { - id v; - - skipWhitespace(c); - if (*c == ']' && c++) { - depth--; - return YES; - } - - if (![self scanValue:&v]) { - [self addErrorWithCode:EPARSE description:@"Expected value while parsing array"]; - return NO; - } - - [*o addObject:v]; - - skipWhitespace(c); - if (*c == ',' && c++) { - skipWhitespace(c); - if (*c == ']') { - [self addErrorWithCode:ETRAILCOMMA description: @"Trailing comma disallowed in array"]; - return NO; - } - } - } - - [self addErrorWithCode:EEOF description: @"End of input while parsing array"]; - return NO; -} - -- (BOOL)scanRestOfDictionary:(NSMutableDictionary **)o -{ - if (maxDepth && ++depth > maxDepth) { - [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; - return NO; - } - - *o = [NSMutableDictionary dictionaryWithCapacity:7]; - - for (; *c ;) { - id k, v; - - skipWhitespace(c); - if (*c == '}' && c++) { - depth--; - return YES; - } - - if (!(*c == '\"' && c++ && [self scanRestOfString:&k])) { - [self addErrorWithCode:EPARSE description: @"Object key string expected"]; - return NO; - } - - skipWhitespace(c); - if (*c != ':') { - [self addErrorWithCode:EPARSE description: @"Expected ':' separating key and value"]; - return NO; - } - - c++; - if (![self scanValue:&v]) { - NSString *string = [NSString stringWithFormat:@"Object value expected for key: %@", k]; - [self addErrorWithCode:EPARSE description: string]; - return NO; - } - - [*o setObject:v forKey:k]; - - skipWhitespace(c); - if (*c == ',' && c++) { - skipWhitespace(c); - if (*c == '}') { - [self addErrorWithCode:ETRAILCOMMA description: @"Trailing comma disallowed in object"]; - return NO; - } - } - } - - [self addErrorWithCode:EEOF description: @"End of input while parsing object"]; - return NO; -} - -- (BOOL)scanRestOfString:(NSMutableString **)o -{ - // if the string has no control characters in it, return it in one go, without any temporary allocations. - size_t len = strcspn(c, ctrl); - if (len && *(c + len) == '\"') - { - *o = [[[NSMutableString alloc] initWithBytes:(char*)c length:len encoding:NSUTF8StringEncoding] autorelease]; - c += len + 1; - return YES; - } - - *o = [NSMutableString stringWithCapacity:16]; - do { - // First see if there's a portion we can grab in one go. - // Doing this caused a massive speedup on the long string. - len = strcspn(c, ctrl); - if (len) { - // check for - id t = [[NSString alloc] initWithBytesNoCopy:(char*)c - length:len - encoding:NSUTF8StringEncoding - freeWhenDone:NO]; - if (t) { - [*o appendString:t]; - [t release]; - c += len; - } - } - - if (*c == '"') { - c++; - return YES; - - } else if (*c == '\\') { - unichar uc = *++c; - switch (uc) { - case '\\': - case '/': - case '"': - break; - - case 'b': uc = '\b'; break; - case 'n': uc = '\n'; break; - case 'r': uc = '\r'; break; - case 't': uc = '\t'; break; - case 'f': uc = '\f'; break; - - case 'u': - c++; - if (![self scanUnicodeChar:&uc]) { - [self addErrorWithCode:EUNICODE description: @"Broken unicode character"]; - return NO; - } - c--; // hack. - break; - default: - [self addErrorWithCode:EESCAPE description: [NSString stringWithFormat:@"Illegal escape sequence '0x%x'", uc]]; - return NO; - break; - } - CFStringAppendCharacters((CFMutableStringRef)*o, &uc, 1); - c++; - - } else if (*c < 0x20) { - [self addErrorWithCode:ECTRL description: [NSString stringWithFormat:@"Unescaped control character '0x%x'", *c]]; - return NO; - - } else { - NSLog(@"should not be able to get here"); - } - } while (*c); - - [self addErrorWithCode:EEOF description:@"Unexpected EOF while parsing string"]; - return NO; -} - -- (BOOL)scanUnicodeChar:(unichar *)x -{ - unichar hi, lo; - - if (![self scanHexQuad:&hi]) { - [self addErrorWithCode:EUNICODE description: @"Missing hex quad"]; - return NO; - } - - if (hi >= 0xd800) { // high surrogate char? - if (hi < 0xdc00) { // yes - expect a low char - - if (!(*c == '\\' && ++c && *c == 'u' && ++c && [self scanHexQuad:&lo])) { - [self addErrorWithCode:EUNICODE description: @"Missing low character in surrogate pair"]; - return NO; - } - - if (lo < 0xdc00 || lo >= 0xdfff) { - [self addErrorWithCode:EUNICODE description:@"Invalid low surrogate char"]; - return NO; - } - - hi = (hi - 0xd800) * 0x400 + (lo - 0xdc00) + 0x10000; - - } else if (hi < 0xe000) { - [self addErrorWithCode:EUNICODE description:@"Invalid high character in surrogate pair"]; - return NO; - } - } - - *x = hi; - return YES; -} - -- (BOOL)scanHexQuad:(unichar *)x -{ - *x = 0; - for (int i = 0; i < 4; i++) { - unichar uc = *c; - c++; - int d = (uc >= '0' && uc <= '9') - ? uc - '0' : (uc >= 'a' && uc <= 'f') - ? (uc - 'a' + 10) : (uc >= 'A' && uc <= 'F') - ? (uc - 'A' + 10) : -1; - if (d == -1) { - [self addErrorWithCode:EUNICODE description:@"Missing hex digit in quad"]; - return NO; - } - *x *= 16; - *x += d; - } - return YES; -} - -- (BOOL)scanNumber:(NSNumber **)o -{ - BOOL simple = YES; - - const char *ns = c; - - // The logic to test for validity of the number formatting is relicensed - // from JSON::XS with permission from its author Marc Lehmann. - // (Available at the CPAN: http://search.cpan.org/dist/JSON-XS/ .) - - if ('-' == *c) - c++; - - if ('0' == *c && c++) { - if (isdigit(*c)) { - [self addErrorWithCode:EPARSENUM description: @"Leading 0 disallowed in number"]; - return NO; - } - - } else if (!isdigit(*c) && c != ns) { - [self addErrorWithCode:EPARSENUM description: @"No digits after initial minus"]; - return NO; - - } else { - skipDigits(c); - } - - // Fractional part - if ('.' == *c && c++) { - simple = NO; - if (!isdigit(*c)) { - [self addErrorWithCode:EPARSENUM description: @"No digits after decimal point"]; - return NO; - } - skipDigits(c); - } - - // Exponential part - if ('e' == *c || 'E' == *c) { - simple = NO; - c++; - - if ('-' == *c || '+' == *c) - c++; - - if (!isdigit(*c)) { - [self addErrorWithCode:EPARSENUM description: @"No digits after exponent"]; - return NO; - } - skipDigits(c); - } - - // If we are only reading integers, don't go through the expense of creating an NSDecimal. - // This ends up being a very large perf win. - if (simple) { - BOOL negate = NO; - long long val = 0; - const char *d = ns; - - if (*d == '-') { - negate = YES; - d++; - } - - while (isdigit(*d)) { - val *= 10; - if (val < 0) - goto longlong_overflow; - val += *d - '0'; - if (val < 0) - goto longlong_overflow; - d++; - } - - *o = [NSNumber numberWithLongLong:negate ? -val : val]; - return YES; - - } else { - // jumped to by simple branch, if an overflow occured - longlong_overflow:; - - id str = [[NSString alloc] initWithBytesNoCopy:(char*)ns - length:c - ns - encoding:NSUTF8StringEncoding - freeWhenDone:NO]; - [str autorelease]; - if (str && (*o = [NSDecimalNumber decimalNumberWithString:str])) - return YES; - - [self addErrorWithCode:EPARSENUM description: @"Failed creating decimal instance"]; - return NO; - } -} - -- (BOOL)scanIsAtEnd -{ - skipWhitespace(c); - return !*c; -} - - -@end diff --git a/src/extThree20JSON/Vendors/JSON/SBJsonWriter.h b/src/extThree20JSON/Vendors/JSON/SBJsonWriter.h deleted file mode 100755 index f79fbcb2ea..0000000000 --- a/src/extThree20JSON/Vendors/JSON/SBJsonWriter.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import -#import "extThree20JSON/private/SBJsonBase.h" - -/** - @brief The JSON writer class. - - Objective-C types are mapped to JSON types in the following way: - - @li NSNull -> Null - @li NSString -> String - @li NSArray -> Array - @li NSDictionary -> Object - @li NSNumber (-initWithBool:) -> Boolean - @li NSNumber -> Number - - In JSON the keys of an object must be strings. NSDictionary keys need - not be, but attempting to convert an NSDictionary with non-string keys - into JSON will throw an exception. - - NSNumber instances created with the +initWithBool: method are - converted into the JSON boolean "true" and "false" values, and vice - versa. Any other NSNumber instances are converted to a JSON number the - way you would expect. - - */ -@interface SBJsonWriter : SBJsonBase { - -@private - BOOL sortKeys, humanReadable; -} - -/** - @brief Whether we are generating human-readable (multiline) JSON. - - Set whether or not to generate human-readable JSON. The default is NO, which produces - JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable - JSON with linebreaks after each array value and dictionary key/value pair, indented two - spaces per nesting level. - */ -@property BOOL humanReadable; - -/** - @brief Whether or not to sort the dictionary keys in the output. - - If this is set to YES, the dictionary keys in the JSON output will be in sorted order. - (This is useful if you need to compare two structures, for example.) The default is NO. - */ -@property BOOL sortKeys; - -/** - @brief Return JSON representation (or fragment) for the given object. - - Returns a string containing JSON representation of the passed in value, or nil on error. - If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. - - @param value any instance that can be represented as a JSON fragment - - */ -- (NSString*)stringWithObject:(id)value; - -/** - @brief Return JSON representation (or fragment) for the given object. - - Returns a string containing JSON representation of the passed in value, or nil on error. - If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. - - @param value any instance that can be represented as a JSON fragment - @param error pointer to object to be populated with NSError on failure - - */- (NSString*)stringWithObject:(id)value - error:(NSError**)error; - - -@end - -/** - @brief Allows generation of JSON for otherwise unsupported classes. - - If you have a custom class that you want to create a JSON representation for you can implement - this method in your class. It should return a representation of your object defined - in terms of objects that can be translated into JSON. For example, a Person - object might implement it like this: - - @code - - (id)proxyForJson { - return [NSDictionary dictionaryWithObjectsAndKeys: - name, @"name", - phone, @"phone", - email, @"email", - nil]; - } - @endcode - - */ -@interface NSObject (SBProxyForJson) -- (id)proxyForJson; -@end - diff --git a/src/extThree20JSON/Vendors/JSON/SBJsonWriter.m b/src/extThree20JSON/Vendors/JSON/SBJsonWriter.m deleted file mode 100755 index 02959a4dd5..0000000000 --- a/src/extThree20JSON/Vendors/JSON/SBJsonWriter.m +++ /dev/null @@ -1,239 +0,0 @@ -/* - Copyright (C) 2009 Stig Brautaset. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of the author nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "extThree20JSON/SBJsonWriter.h" - -@interface SBJsonWriter () - -- (BOOL)appendValue:(id)fragment into:(NSMutableString*)json; -- (BOOL)appendArray:(NSArray*)fragment into:(NSMutableString*)json; -- (BOOL)appendDictionary:(NSDictionary*)fragment into:(NSMutableString*)json; -- (BOOL)appendString:(NSString*)fragment into:(NSMutableString*)json; - -- (NSString*)indent; - -@end - -@implementation SBJsonWriter - -@synthesize sortKeys; -@synthesize humanReadable; - -static NSMutableCharacterSet *kEscapeChars; - -+ (void)initialize { - kEscapeChars = [[NSMutableCharacterSet characterSetWithRange: NSMakeRange(0,32)] retain]; - [kEscapeChars addCharactersInString: @"\"\\"]; -} - -- (NSString*)stringWithObject:(id)value { - [self clearErrorTrace]; - - if ([value isKindOfClass:[NSDictionary class]] || [value isKindOfClass:[NSArray class]]) { - depth = 0; - NSMutableString *json = [NSMutableString stringWithCapacity:128]; - if ([self appendValue:value into:json]) - return json; - } - - if ([value respondsToSelector:@selector(proxyForJson)]) { - NSString *tmp = [self stringWithObject:[value proxyForJson]]; - if (tmp) - return tmp; - } - - [self addErrorWithCode:EFRAGMENT description:@"Not valid type for JSON"]; - return nil; -} - -- (NSString*)stringWithObject:(id)value error:(NSError**)error { - NSString *tmp = [self stringWithObject:value]; - if (tmp) - return tmp; - - if (error) - *error = [self.errorTrace lastObject]; - return nil; -} - -- (NSString*)indent { - return [@"\n" stringByPaddingToLength:1 + 2 * depth withString:@" " startingAtIndex:0]; -} - -- (BOOL)appendValue:(id)fragment into:(NSMutableString*)json { - if ([fragment isKindOfClass:[NSDictionary class]]) { - if (![self appendDictionary:fragment into:json]) - return NO; - - } else if ([fragment isKindOfClass:[NSArray class]]) { - if (![self appendArray:fragment into:json]) - return NO; - - } else if ([fragment isKindOfClass:[NSString class]]) { - if (![self appendString:fragment into:json]) - return NO; - - } else if ([fragment isKindOfClass:[NSNumber class]]) { - if ('c' == *[fragment objCType]) { - [json appendString:[fragment boolValue] ? @"true" : @"false"]; - } else if ([fragment isEqualToNumber:(NSNumber*)kCFNumberNaN]) { - [self addErrorWithCode:EUNSUPPORTED description:@"NaN is not a valid number in JSON"]; - return NO; - - } else if (isinf([fragment doubleValue])) { - [self addErrorWithCode:EUNSUPPORTED description:@"Infinity is not a valid number in JSON"]; - return NO; - - } else { - [json appendString:[fragment stringValue]]; - } - } else if ([fragment isKindOfClass:[NSNull class]]) { - [json appendString:@"null"]; - } else if ([fragment respondsToSelector:@selector(proxyForJson)]) { - [self appendValue:[fragment proxyForJson] into:json]; - - } else { - [self addErrorWithCode:EUNSUPPORTED description:[NSString stringWithFormat:@"JSON serialisation not supported for %@", [fragment class]]]; - return NO; - } - return YES; -} - -- (BOOL)appendArray:(NSArray*)fragment into:(NSMutableString*)json { - if (maxDepth && ++depth > maxDepth) { - [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; - return NO; - } - [json appendString:@"["]; - - BOOL addComma = NO; - for (id value in fragment) { - if (addComma) - [json appendString:@","]; - else - addComma = YES; - - if ([self humanReadable]) - [json appendString:[self indent]]; - - if (![self appendValue:value into:json]) { - return NO; - } - } - - depth--; - if ([self humanReadable] && [fragment count]) - [json appendString:[self indent]]; - [json appendString:@"]"]; - return YES; -} - -- (BOOL)appendDictionary:(NSDictionary*)fragment into:(NSMutableString*)json { - if (maxDepth && ++depth > maxDepth) { - [self addErrorWithCode:EDEPTH description: @"Nested too deep"]; - return NO; - } - [json appendString:@"{"]; - - NSString *colon = [self humanReadable] ? @" : " : @":"; - BOOL addComma = NO; - NSArray *keys = [fragment allKeys]; - if (self.sortKeys) - keys = [keys sortedArrayUsingSelector:@selector(compare:)]; - - for (id value in keys) { - if (addComma) - [json appendString:@","]; - else - addComma = YES; - - if ([self humanReadable]) - [json appendString:[self indent]]; - - if (![value isKindOfClass:[NSString class]]) { - [self addErrorWithCode:EUNSUPPORTED description: @"JSON object key must be string"]; - return NO; - } - - if (![self appendString:value into:json]) - return NO; - - [json appendString:colon]; - if (![self appendValue:[fragment objectForKey:value] into:json]) { - [self addErrorWithCode:EUNSUPPORTED description:[NSString stringWithFormat:@"Unsupported value for key %@ in object", value]]; - return NO; - } - } - - depth--; - if ([self humanReadable] && [fragment count]) - [json appendString:[self indent]]; - [json appendString:@"}"]; - return YES; -} - -- (BOOL)appendString:(NSString*)fragment into:(NSMutableString*)json { - - [json appendString:@"\""]; - - NSRange esc = [fragment rangeOfCharacterFromSet:kEscapeChars]; - if ( !esc.length ) { - // No special chars -- can just add the raw string: - [json appendString:fragment]; - - } else { - NSUInteger length = [fragment length]; - for (NSUInteger i = 0; i < length; i++) { - unichar uc = [fragment characterAtIndex:i]; - switch (uc) { - case '"': [json appendString:@"\\\""]; break; - case '\\': [json appendString:@"\\\\"]; break; - case '\t': [json appendString:@"\\t"]; break; - case '\n': [json appendString:@"\\n"]; break; - case '\r': [json appendString:@"\\r"]; break; - case '\b': [json appendString:@"\\b"]; break; - case '\f': [json appendString:@"\\f"]; break; - default: - if (uc < 0x20) { - [json appendFormat:@"\\u%04x", uc]; - } else { - CFStringAppendCharacters((CFMutableStringRef)json, &uc, 1); - } - break; - - } - } - } - - [json appendString:@"\""]; - return YES; -} - - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/CHANGELOG.md b/src/extThree20JSON/Vendors/YAJL/CHANGELOG.md deleted file mode 100644 index b14d8fb994..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/CHANGELOG.md +++ /dev/null @@ -1,75 +0,0 @@ -== 0.2.17 -- Updated to use yalj 1.0.9 (iPhone) - -== 0.2.16 - -- Hudson (JUnit XML support) -- Fix YAJL.h import -- Updated to use yajl 1.0.9 - -== 0.2.15 - -- YAJLParserOptionsStrictPrecision option -- Parsing as double on long long overflow, unless strict precision option - -== 0.2.14 - -- Fixing build problem - -== 0.2.13 - -- Using long long for non-decimal types (instead of always double). - -== 0.2.12 - -- Fixing MacOSX build/install to use @rpath correctly -- Defined error codes, and error userInfo key for value we errored on - -== 0.2.11 - -- Fixed bug where yajl_JSONWithOptions:error: would ignore options. - -== 0.2.10 - -- Gen options for ignoring unknown types and supporting PList types like NSData and NSDate -- Changed default capacity in YAJLDocument for slightly better perf - -== 0.2.9 - -- Enabling verbose errors in yajl - -== 0.2.8 - -- Memory usage fix from wooster (autorelease to release) -- Fixed memory leak when number parse error -- Added default init methods for YAJLDocument and YAJLParser - -== 0.2.7 - -- Changed yajl_encodeJSON to JSON for YAJLCoding protocol -- Updating comments for YAJLCoding - -== 0.2.6 - -- Supporting gen/parse from NSObject category (supports NSString, NSData and custom) -- Including standard/optimized build for arm6/7 -- Include yajl_*.h api header files (iPhone) -- 32/64 bit universal build (Mac OSX) - -== 0.2.5 - -- Added YAJLGen wrapper for yajl_gen -- Added streaming support to YAJLDocument -- Added NSString category -- Added NSObject category - -== 0.2.4 - -- Using yajl_number callback since its more compliant (correctly handles large double values) -- Changing YAJLParser API to allow for streaming data -- Added test for overflow.json -- Added test for insane sample.json - -== 0.2.3 - -- Fixed memory leak in YAJLParser diff --git a/src/extThree20JSON/Vendors/YAJL/GTM/GTMBase64.h b/src/extThree20JSON/Vendors/YAJL/GTM/GTMBase64.h deleted file mode 100644 index a3561e5390..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/GTM/GTMBase64.h +++ /dev/null @@ -1,195 +0,0 @@ -// -// GTMBase64.h -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import - -// Give ourselves a consistent way to do inlines. Apple's macros even use -// a few different actual definitions, so we're based off of the foundation -// one. -#if !defined(GTM_INLINE) -#if defined (__GNUC__) && (__GNUC__ == 4) -#define GTM_INLINE static __inline__ __attribute__((always_inline)) -#else -#define GTM_INLINE static __inline__ -#endif -#endif - -#define _GTMDevAssert(condition, ...) do { } while (0) - -// GTMBase64 -// -/// Helper for handling Base64 and WebSafeBase64 encodings -// -/// The webSafe methods use different character set and also the results aren't -/// always padded to a multiple of 4 characters. This is done so the resulting -/// data can be used in urls and url query arguments without needing any -/// encoding. You must use the webSafe* methods together, the data does not -/// interop with the RFC methods. -// -@interface YAJL_GTMBase64 : NSObject - -// -// Standard Base64 (RFC) handling -// - -// encodeData: -// -/// Base64 encodes contents of the NSData object. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)encodeData:(NSData *)data; - -// decodeData: -// -/// Base64 decodes contents of the NSData object. -// -/// Returns: -/// A new autoreleased NSData with the decoded payload. nil for any error. -// -+(NSData *)decodeData:(NSData *)data; - -// encodeBytes:length: -// -/// Base64 encodes the data pointed at by |bytes|. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)encodeBytes:(const void *)bytes length:(NSUInteger)length; - -// decodeBytes:length: -// -/// Base64 decodes the data pointed at by |bytes|. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)decodeBytes:(const void *)bytes length:(NSUInteger)length; - -// stringByEncodingData: -// -/// Base64 encodes contents of the NSData object. -// -/// Returns: -/// A new autoreleased NSString with the encoded payload. nil for any error. -// -+(NSString *)stringByEncodingData:(NSData *)data; - -// stringByEncodingBytes:length: -// -/// Base64 encodes the data pointed at by |bytes|. -// -/// Returns: -/// A new autoreleased NSString with the encoded payload. nil for any error. -// -+(NSString *)stringByEncodingBytes:(const void *)bytes length:(NSUInteger)length; - -// decodeString: -// -/// Base64 decodes contents of the NSString. -// -/// Returns: -/// A new autoreleased NSData with the decoded payload. nil for any error. -// -+(NSData *)decodeString:(NSString *)string; - -// -// Modified Base64 encoding so the results can go onto urls. -// -// The changes are in the characters generated and also allows the result to -// not be padded to a multiple of 4. -// Must use the matching call to encode/decode, won't interop with the -// RFC versions. -// - -// webSafeEncodeData:padded: -// -/// WebSafe Base64 encodes contents of the NSData object. If |padded| is YES -/// then padding characters are added so the result length is a multiple of 4. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)webSafeEncodeData:(NSData *)data - padded:(BOOL)padded; - -// webSafeDecodeData: -// -/// WebSafe Base64 decodes contents of the NSData object. -// -/// Returns: -/// A new autoreleased NSData with the decoded payload. nil for any error. -// -+(NSData *)webSafeDecodeData:(NSData *)data; - -// webSafeEncodeBytes:length:padded: -// -/// WebSafe Base64 encodes the data pointed at by |bytes|. If |padded| is YES -/// then padding characters are added so the result length is a multiple of 4. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)webSafeEncodeBytes:(const void *)bytes - length:(NSUInteger)length - padded:(BOOL)padded; - -// webSafeDecodeBytes:length: -// -/// WebSafe Base64 decodes the data pointed at by |bytes|. -// -/// Returns: -/// A new autoreleased NSData with the encoded payload. nil for any error. -// -+(NSData *)webSafeDecodeBytes:(const void *)bytes length:(NSUInteger)length; - -// stringByWebSafeEncodingData:padded: -// -/// WebSafe Base64 encodes contents of the NSData object. If |padded| is YES -/// then padding characters are added so the result length is a multiple of 4. -// -/// Returns: -/// A new autoreleased NSString with the encoded payload. nil for any error. -// -+(NSString *)stringByWebSafeEncodingData:(NSData *)data - padded:(BOOL)padded; - -// stringByWebSafeEncodingBytes:length:padded: -// -/// WebSafe Base64 encodes the data pointed at by |bytes|. If |padded| is YES -/// then padding characters are added so the result length is a multiple of 4. -// -/// Returns: -/// A new autoreleased NSString with the encoded payload. nil for any error. -// -+(NSString *)stringByWebSafeEncodingBytes:(const void *)bytes - length:(NSUInteger)length - padded:(BOOL)padded; - -// webSafeDecodeString: -// -/// WebSafe Base64 decodes contents of the NSString. -// -/// Returns: -/// A new autoreleased NSData with the decoded payload. nil for any error. -// -+(NSData *)webSafeDecodeString:(NSString *)string; - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/GTM/GTMBase64.m b/src/extThree20JSON/Vendors/YAJL/GTM/GTMBase64.m deleted file mode 100644 index 5b6db2187e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/GTM/GTMBase64.m +++ /dev/null @@ -1,693 +0,0 @@ -// -// GTMBase64.m -// -// Copyright 2006-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -#import "extThree20JSON/private/GTMBase64.h" - -static const char *kBase64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static const char *kWebSafeBase64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; -static const char kBase64PaddingChar = '='; -static const char kBase64InvalidChar = 99; - -static const char kBase64DecodeChars[] = { - // This array was generated by the following code: - // #include - // #include - // #include - // main() - // { - // static const char Base64[] = - // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - // char *pos; - // int idx, i, j; - // printf(" "); - // for (i = 0; i < 255; i += 8) { - // for (j = i; j < i + 8; j++) { - // pos = strchr(Base64, j); - // if ((pos == NULL) || (j == 0)) - // idx = 99; - // else - // idx = pos - Base64; - // if (idx == 99) - // printf(" %2d, ", idx); - // else - // printf(" %2d/*%c*/,", idx, j); - // } - // printf("\n "); - // } - // } - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 62/*+*/, 99, 99, 99, 63/*/ */, - 52/*0*/, 53/*1*/, 54/*2*/, 55/*3*/, 56/*4*/, 57/*5*/, 58/*6*/, 59/*7*/, - 60/*8*/, 61/*9*/, 99, 99, 99, 99, 99, 99, - 99, 0/*A*/, 1/*B*/, 2/*C*/, 3/*D*/, 4/*E*/, 5/*F*/, 6/*G*/, - 7/*H*/, 8/*I*/, 9/*J*/, 10/*K*/, 11/*L*/, 12/*M*/, 13/*N*/, 14/*O*/, - 15/*P*/, 16/*Q*/, 17/*R*/, 18/*S*/, 19/*T*/, 20/*U*/, 21/*V*/, 22/*W*/, - 23/*X*/, 24/*Y*/, 25/*Z*/, 99, 99, 99, 99, 99, - 99, 26/*a*/, 27/*b*/, 28/*c*/, 29/*d*/, 30/*e*/, 31/*f*/, 32/*g*/, - 33/*h*/, 34/*i*/, 35/*j*/, 36/*k*/, 37/*l*/, 38/*m*/, 39/*n*/, 40/*o*/, - 41/*p*/, 42/*q*/, 43/*r*/, 44/*s*/, 45/*t*/, 46/*u*/, 47/*v*/, 48/*w*/, - 49/*x*/, 50/*y*/, 51/*z*/, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 -}; - -static const char kWebSafeBase64DecodeChars[] = { - // This array was generated by the following code: - // #include - // #include - // #include - // main() - // { - // static const char Base64[] = - // "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; - // char *pos; - // int idx, i, j; - // printf(" "); - // for (i = 0; i < 255; i += 8) { - // for (j = i; j < i + 8; j++) { - // pos = strchr(Base64, j); - // if ((pos == NULL) || (j == 0)) - // idx = 99; - // else - // idx = pos - Base64; - // if (idx == 99) - // printf(" %2d, ", idx); - // else - // printf(" %2d/*%c*/,", idx, j); - // } - // printf("\n "); - // } - // } - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 62/*-*/, 99, 99, - 52/*0*/, 53/*1*/, 54/*2*/, 55/*3*/, 56/*4*/, 57/*5*/, 58/*6*/, 59/*7*/, - 60/*8*/, 61/*9*/, 99, 99, 99, 99, 99, 99, - 99, 0/*A*/, 1/*B*/, 2/*C*/, 3/*D*/, 4/*E*/, 5/*F*/, 6/*G*/, - 7/*H*/, 8/*I*/, 9/*J*/, 10/*K*/, 11/*L*/, 12/*M*/, 13/*N*/, 14/*O*/, - 15/*P*/, 16/*Q*/, 17/*R*/, 18/*S*/, 19/*T*/, 20/*U*/, 21/*V*/, 22/*W*/, - 23/*X*/, 24/*Y*/, 25/*Z*/, 99, 99, 99, 99, 63/*_*/, - 99, 26/*a*/, 27/*b*/, 28/*c*/, 29/*d*/, 30/*e*/, 31/*f*/, 32/*g*/, - 33/*h*/, 34/*i*/, 35/*j*/, 36/*k*/, 37/*l*/, 38/*m*/, 39/*n*/, 40/*o*/, - 41/*p*/, 42/*q*/, 43/*r*/, 44/*s*/, 45/*t*/, 46/*u*/, 47/*v*/, 48/*w*/, - 49/*x*/, 50/*y*/, 51/*z*/, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99 -}; - - -// Tests a character to see if it's a whitespace character. -// -// Returns: -// YES if the character is a whitespace character. -// NO if the character is not a whitespace character. -// -GTM_INLINE BOOL IsSpace(unsigned char c) { - // we use our own mapping here because we don't want anything w/ locale - // support. - static BOOL kSpaces[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, // 0-9 - 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 10-19 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20-29 - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, // 30-39 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40-49 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 50-59 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60-69 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 70-79 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 80-89 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 90-99 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 100-109 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 110-119 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 120-129 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 130-139 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 140-149 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 150-159 - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 160-169 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 170-179 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 180-189 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 190-199 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 200-209 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 210-219 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 220-229 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 230-239 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 240-249 - 0, 0, 0, 0, 0, 1, // 250-255 - }; - return kSpaces[c]; -} - -// Calculate how long the data will be once it's base64 encoded. -// -// Returns: -// The guessed encoded length for a source length -// -GTM_INLINE NSUInteger CalcEncodedLength(NSUInteger srcLen, BOOL padded) { - NSUInteger intermediate_result = 8 * srcLen + 5; - NSUInteger len = intermediate_result / 6; - if (padded) { - len = ((len + 3) / 4) * 4; - } - return len; -} - -// Tries to calculate how long the data will be once it's base64 decoded. -// Unlike the above, this is always an upperbound, since the source data -// could have spaces and might end with the padding characters on them. -// -// Returns: -// The guessed decoded length for a source length -// -GTM_INLINE NSUInteger GuessDecodedLength(NSUInteger srcLen) { - return (srcLen + 3) / 4 * 3; -} - - -@interface YAJL_GTMBase64 (PrivateMethods) - -+(NSData *)baseEncode:(const void *)bytes - length:(NSUInteger)length - charset:(const char *)charset - padded:(BOOL)padded; - -+(NSData *)baseDecode:(const void *)bytes - length:(NSUInteger)length - charset:(const char*)charset - requirePadding:(BOOL)requirePadding; - -+(NSUInteger)baseEncode:(const char *)srcBytes - srcLen:(NSUInteger)srcLen - destBytes:(char *)destBytes - destLen:(NSUInteger)destLen - charset:(const char *)charset - padded:(BOOL)padded; - -+(NSUInteger)baseDecode:(const char *)srcBytes - srcLen:(NSUInteger)srcLen - destBytes:(char *)destBytes - destLen:(NSUInteger)destLen - charset:(const char *)charset - requirePadding:(BOOL)requirePadding; - -@end - - -@implementation YAJL_GTMBase64 - -// -// Standard Base64 (RFC) handling -// - -+(NSData *)encodeData:(NSData *)data { - return [self baseEncode:[data bytes] - length:[data length] - charset:kBase64EncodeChars - padded:YES]; -} - -+(NSData *)decodeData:(NSData *)data { - return [self baseDecode:[data bytes] - length:[data length] - charset:kBase64DecodeChars - requirePadding:YES]; -} - -+(NSData *)encodeBytes:(const void *)bytes length:(NSUInteger)length { - return [self baseEncode:bytes - length:length - charset:kBase64EncodeChars - padded:YES]; -} - -+(NSData *)decodeBytes:(const void *)bytes length:(NSUInteger)length { - return [self baseDecode:bytes - length:length - charset:kBase64DecodeChars - requirePadding:YES]; -} - -+(NSString *)stringByEncodingData:(NSData *)data { - NSString *result = nil; - NSData *converted = [self baseEncode:[data bytes] - length:[data length] - charset:kBase64EncodeChars - padded:YES]; - if (converted) { - result = [[[NSString alloc] initWithData:converted - encoding:NSASCIIStringEncoding] autorelease]; - } - return result; -} - -+(NSString *)stringByEncodingBytes:(const void *)bytes length:(NSUInteger)length { - NSString *result = nil; - NSData *converted = [self baseEncode:bytes - length:length - charset:kBase64EncodeChars - padded:YES]; - if (converted) { - result = [[[NSString alloc] initWithData:converted - encoding:NSASCIIStringEncoding] autorelease]; - } - return result; -} - -+(NSData *)decodeString:(NSString *)string { - NSData *result = nil; - NSData *data = [string dataUsingEncoding:NSASCIIStringEncoding]; - if (data) { - result = [self baseDecode:[data bytes] - length:[data length] - charset:kBase64DecodeChars - requirePadding:YES]; - } - return result; -} - -// -// Modified Base64 encoding so the results can go onto urls. -// -// The changes are in the characters generated and also the result isn't -// padded to a multiple of 4. -// Must use the matching call to encode/decode, won't interop with the -// RFC versions. -// - -+(NSData *)webSafeEncodeData:(NSData *)data - padded:(BOOL)padded { - return [self baseEncode:[data bytes] - length:[data length] - charset:kWebSafeBase64EncodeChars - padded:padded]; -} - -+(NSData *)webSafeDecodeData:(NSData *)data { - return [self baseDecode:[data bytes] - length:[data length] - charset:kWebSafeBase64DecodeChars - requirePadding:NO]; -} - -+(NSData *)webSafeEncodeBytes:(const void *)bytes - length:(NSUInteger)length - padded:(BOOL)padded { - return [self baseEncode:bytes - length:length - charset:kWebSafeBase64EncodeChars - padded:padded]; -} - -+(NSData *)webSafeDecodeBytes:(const void *)bytes length:(NSUInteger)length { - return [self baseDecode:bytes - length:length - charset:kWebSafeBase64DecodeChars - requirePadding:NO]; -} - -+(NSString *)stringByWebSafeEncodingData:(NSData *)data - padded:(BOOL)padded { - NSString *result = nil; - NSData *converted = [self baseEncode:[data bytes] - length:[data length] - charset:kWebSafeBase64EncodeChars - padded:padded]; - if (converted) { - result = [[[NSString alloc] initWithData:converted - encoding:NSASCIIStringEncoding] autorelease]; - } - return result; -} - -+(NSString *)stringByWebSafeEncodingBytes:(const void *)bytes - length:(NSUInteger)length - padded:(BOOL)padded { - NSString *result = nil; - NSData *converted = [self baseEncode:bytes - length:length - charset:kWebSafeBase64EncodeChars - padded:padded]; - if (converted) { - result = [[[NSString alloc] initWithData:converted - encoding:NSASCIIStringEncoding] autorelease]; - } - return result; -} - -+(NSData *)webSafeDecodeString:(NSString *)string { - NSData *result = nil; - NSData *data = [string dataUsingEncoding:NSASCIIStringEncoding]; - if (data) { - result = [self baseDecode:[data bytes] - length:[data length] - charset:kWebSafeBase64DecodeChars - requirePadding:NO]; - } - return result; -} - -@end - -@implementation YAJL_GTMBase64 (PrivateMethods) - -// -// baseEncode:length:charset:padded: -// -// Does the common lifting of creating the dest NSData. it creates & sizes the -// data for the results. |charset| is the characters to use for the encoding -// of the data. |padding| controls if the encoded data should be padded to a -// multiple of 4. -// -// Returns: -// an autorelease NSData with the encoded data, nil if any error. -// -+(NSData *)baseEncode:(const void *)bytes - length:(NSUInteger)length - charset:(const char *)charset - padded:(BOOL)padded { - // how big could it be? - NSUInteger maxLength = CalcEncodedLength(length, padded); - // make space - NSMutableData *result = [NSMutableData data]; - [result setLength:maxLength]; - // do it - NSUInteger finalLength = [self baseEncode:bytes - srcLen:length - destBytes:[result mutableBytes] - destLen:[result length] - charset:charset - padded:padded]; - if (finalLength) { - _GTMDevAssert(finalLength == maxLength, @"how did we calc the length wrong?"); - } else { - // shouldn't happen, this means we ran out of space - result = nil; - } - return result; -} - -// -// baseDecode:length:charset:requirePadding: -// -// Does the common lifting of creating the dest NSData. it creates & sizes the -// data for the results. |charset| is the characters to use for the decoding -// of the data. -// -// Returns: -// an autorelease NSData with the decoded data, nil if any error. -// -// -+(NSData *)baseDecode:(const void *)bytes - length:(NSUInteger)length - charset:(const char *)charset - requirePadding:(BOOL)requirePadding { - // could try to calculate what it will end up as - NSUInteger maxLength = GuessDecodedLength(length); - // make space - NSMutableData *result = [NSMutableData data]; - [result setLength:maxLength]; - // do it - NSUInteger finalLength = [self baseDecode:bytes - srcLen:length - destBytes:[result mutableBytes] - destLen:[result length] - charset:charset - requirePadding:requirePadding]; - if (finalLength) { - if (finalLength != maxLength) { - // resize down to how big it was - [result setLength:finalLength]; - } - } else { - // either an error in the args, or we ran out of space - result = nil; - } - return result; -} - -// -// baseEncode:srcLen:destBytes:destLen:charset:padded: -// -// Encodes the buffer into the larger. returns the length of the encoded -// data, or zero for an error. -// |charset| is the characters to use for the encoding -// |padded| tells if the result should be padded to a multiple of 4. -// -// Returns: -// the length of the encoded data. zero if any error. -// -+(NSUInteger)baseEncode:(const char *)srcBytes - srcLen:(NSUInteger)srcLen - destBytes:(char *)destBytes - destLen:(NSUInteger)destLen - charset:(const char *)charset - padded:(BOOL)padded { - if (!srcLen || !destLen || !srcBytes || !destBytes) { - return 0; - } - - char *curDest = destBytes; - const unsigned char *curSrc = (const unsigned char *)(srcBytes); - - // Three bytes of data encodes to four characters of cyphertext. - // So we can pump through three-byte chunks atomically. - while (srcLen > 2) { - // space? - _GTMDevAssert(destLen >= 4, @"our calc for encoded length was wrong"); - curDest[0] = charset[curSrc[0] >> 2]; - curDest[1] = charset[((curSrc[0] & 0x03) << 4) + (curSrc[1] >> 4)]; - curDest[2] = charset[((curSrc[1] & 0x0f) << 2) + (curSrc[2] >> 6)]; - curDest[3] = charset[curSrc[2] & 0x3f]; - - curDest += 4; - curSrc += 3; - srcLen -= 3; - destLen -= 4; - } - - // now deal with the tail (<=2 bytes) - switch (srcLen) { - case 0: - // Nothing left; nothing more to do. - break; - case 1: - // One byte left: this encodes to two characters, and (optionally) - // two pad characters to round out the four-character cypherblock. - _GTMDevAssert(destLen >= 2, @"our calc for encoded length was wrong"); - curDest[0] = charset[curSrc[0] >> 2]; - curDest[1] = charset[(curSrc[0] & 0x03) << 4]; - curDest += 2; - destLen -= 2; - if (padded) { - _GTMDevAssert(destLen >= 2, @"our calc for encoded length was wrong"); - curDest[0] = kBase64PaddingChar; - curDest[1] = kBase64PaddingChar; - curDest += 2; - } - break; - case 2: - // Two bytes left: this encodes to three characters, and (optionally) - // one pad character to round out the four-character cypherblock. - _GTMDevAssert(destLen >= 3, @"our calc for encoded length was wrong"); - curDest[0] = charset[curSrc[0] >> 2]; - curDest[1] = charset[((curSrc[0] & 0x03) << 4) + (curSrc[1] >> 4)]; - curDest[2] = charset[(curSrc[1] & 0x0f) << 2]; - curDest += 3; - destLen -= 3; - if (padded) { - _GTMDevAssert(destLen >= 1, @"our calc for encoded length was wrong"); - curDest[0] = kBase64PaddingChar; - curDest += 1; - } - break; - } - // return the length - return (curDest - destBytes); -} - -// -// baseDecode:srcLen:destBytes:destLen:charset:requirePadding: -// -// Decodes the buffer into the larger. returns the length of the decoded -// data, or zero for an error. -// |charset| is the character decoding buffer to use -// -// Returns: -// the length of the encoded data. zero if any error. -// -+(NSUInteger)baseDecode:(const char *)srcBytes - srcLen:(NSUInteger)srcLen - destBytes:(char *)destBytes - destLen:(NSUInteger)destLen - charset:(const char *)charset - requirePadding:(BOOL)requirePadding { - if (!srcLen || !destLen || !srcBytes || !destBytes) { - return 0; - } - - int decode; - NSUInteger destIndex = 0; - int state = 0; - char ch = 0; - while (srcLen-- && (ch = *srcBytes++) != 0) { - if (IsSpace(ch)) // Skip whitespace - continue; - - if (ch == kBase64PaddingChar) - break; - - decode = charset[(unsigned int)ch]; - if (decode == kBase64InvalidChar) - return 0; - - // Four cyphertext characters decode to three bytes. - // Therefore we can be in one of four states. - switch (state) { - case 0: - // We're at the beginning of a four-character cyphertext block. - // This sets the high six bits of the first byte of the - // plaintext block. - _GTMDevAssert(destIndex < destLen, @"our calc for decoded length was wrong"); - destBytes[destIndex] = decode << 2; - state = 1; - break; - case 1: - // We're one character into a four-character cyphertext block. - // This sets the low two bits of the first plaintext byte, - // and the high four bits of the second plaintext byte. - _GTMDevAssert((destIndex+1) < destLen, @"our calc for decoded length was wrong"); - destBytes[destIndex] |= decode >> 4; - destBytes[destIndex+1] = (decode & 0x0f) << 4; - destIndex++; - state = 2; - break; - case 2: - // We're two characters into a four-character cyphertext block. - // This sets the low four bits of the second plaintext - // byte, and the high two bits of the third plaintext byte. - // However, if this is the end of data, and those two - // bits are zero, it could be that those two bits are - // leftovers from the encoding of data that had a length - // of two mod three. - _GTMDevAssert((destIndex+1) < destLen, @"our calc for decoded length was wrong"); - destBytes[destIndex] |= decode >> 2; - destBytes[destIndex+1] = (decode & 0x03) << 6; - destIndex++; - state = 3; - break; - case 3: - // We're at the last character of a four-character cyphertext block. - // This sets the low six bits of the third plaintext byte. - _GTMDevAssert(destIndex < destLen, @"our calc for decoded length was wrong"); - destBytes[destIndex] |= decode; - destIndex++; - state = 0; - break; - } - } - - // We are done decoding Base-64 chars. Let's see if we ended - // on a byte boundary, and/or with erroneous trailing characters. - if (ch == kBase64PaddingChar) { // We got a pad char - if ((state == 0) || (state == 1)) { - return 0; // Invalid '=' in first or second position - } - if (srcLen == 0) { - if (state == 2) { // We run out of input but we still need another '=' - return 0; - } - // Otherwise, we are in state 3 and only need this '=' - } else { - if (state == 2) { // need another '=' - while ((ch = *srcBytes++) && (srcLen-- > 0)) { - if (!IsSpace(ch)) - break; - } - if (ch != kBase64PaddingChar) { - return 0; - } - } - // state = 1 or 2, check if all remain padding is space - while ((ch = *srcBytes++) && (srcLen-- > 0)) { - if (!IsSpace(ch)) { - return 0; - } - } - } - } else { - // We ended by seeing the end of the string. - - if (requirePadding) { - // If we require padding, then anything but state 0 is an error. - if (state != 0) { - return 0; - } - } else { - // Make sure we have no partial bytes lying around. Note that we do not - // require trailing '=', so states 2 and 3 are okay too. - if (state == 1) { - return 0; - } - } - } - - // If then next piece of output was valid and got written to it means we got a - // very carefully crafted input that appeared valid but contains some trailing - // bits past the real length, so just toss the thing. - if ((destIndex < destLen) && - (destBytes[destIndex] != 0)) { - return 0; - } - - return destIndex; -} - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/LICENSE b/src/extThree20JSON/Vendors/YAJL/LICENSE deleted file mode 100644 index c0dbc5f8e7..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -// -// Created by Gabriel Handford on 3/1/09. -// Copyright 2009. All rights reserved. -// -// 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. -// \ No newline at end of file diff --git a/src/extThree20JSON/Vendors/YAJL/NSObject+YAJL.h b/src/extThree20JSON/Vendors/YAJL/NSObject+YAJL.h deleted file mode 100644 index 8e58c8653e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/NSObject+YAJL.h +++ /dev/null @@ -1,154 +0,0 @@ -// -// NSObject+YAJL.h -// YAJL -// -// Created by Gabriel Handford on 7/23/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - -#import "extThree20JSON/YAJLGen.h" -#import "extThree20JSON/YAJLParser.h" - -/*! - Generate JSON string from NSArray, NSDictionary or custom object or parse JSON from NSString or custom object. - - Parse JSON: - @code - NSData *JSONData = [NSData dataWithContentsOfFile:@"example.json"]; - NSArray *arrayFromData = [JSONData yajl_JSON]; - - NSString *JSONString = @"[\"Test\"]"; - NSArray *arrayFromString = [JSONString yajl_JSON]; - - // With options and out error - NSError *error = nil; - NSArray *arrayFromString = [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:&error]; - @endcode - - Generate JSON: - @code - NSDictionary *dict = [NSDictionary dictionaryWithObject:@"value" forKey:@"key"]; - NSString *JSONString = [dict yajl_JSONString]; - - // Beautified with custon indent string - NSArray *array = [NSArray arrayWithObjects:@"value1", @"value2", nil]; - NSString *JSONString = [dict yajl_JSONStringWithOptions:YAJLGenOptionsBeautify indentString:@" "]; - @endcode - */ -@interface NSObject(YAJL) - -#pragma mark Gen - -/*! - Create JSON string from object. - Supported objects include: NSArray, NSDictionary, NSNumber, NSString, NSNull - To override JSON value to encode (or support custom objects), implement (id)JSON; See YAJLCoding in YAJLGen.h - @throws YAJLGenInvalidObjectException If object is invalid - @result JSON String - */ -- (NSString *)yajl_JSONString; - -/*! - Create JSON string from object. - Supported objects include: NSArray, NSDictionary, NSNumber, NSString, NSNull - To override JSON value to encode (or support custom objects), implement (id)JSON; See YAJLCoding in YAJLGen.h - @throws YAJLGenInvalidObjectException If object is invalid - @param options - - YAJLGenOptionsNone: No options - - YAJLGenOptionsBeautify: Beautifiy JSON output - - YAJLGenOptionsIgnoreUnknownTypes: Ignore unknown types (will use null value) - - YAJLGenOptionsIncludeUnsupportedTypes: Handle non-JSON types (including NSDate, NSData, NSURL) - - @param indentString - @result JSON String - */ -- (NSString *)yajl_JSONStringWithOptions:(YAJLGenOptions)options indentString:(NSString *)indentString; - - -#pragma mark Parsing - -/*! - Parse JSON (NSString or NSData or dataUsingEncoding:). - @result JSON object - @throws YAJLParserException If a parse error occured - @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding: - - @code - NSString *JSONString = @"{'foo':['bar', true]}"; - id JSONValue = [JSONString yajl_JSON]; - - NSData *JSONData = ...; - id JSONValue = [JSONData yajl_JSON]; - @endcode - */ -- (id)yajl_JSON; - -/*! - Parse JSON (NSString or NSData or dataUsingEncoding:) with out error. - - If an error occurs, the returned object will be the current state of the object when - the error occurred. - - @param error Error to set if we failed to parse - @result JSON object - @throws YAJLParserException If a parse error occured - @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding: - - @code - NSString *JSONString = @"{'foo':['bar', true]}"; - NSError *error = nil; - [JSONString yajl_JSON:error]; - if (error) ...; - @endcode - */ -- (id)yajl_JSON:(NSError **)error; - -/*! - Parse JSON (NSString or NSData or dataUsingEncoding:) with options and out error. - - If an error occurs, the returned object will be the current state of the object when - the error occurred. - - @param options Parse options - - YAJLParserOptionsNone: No options - - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //) - - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error - - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error - - @param error Error to set if we failed to parse - @result JSON object - @throws YAJLParserException If a parse error occured - @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding: - - @code - NSString *JSONString = @"{'foo':['bar', true]} // comment"; - NSError *error = nil; - [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:error]; - if (error) ...; - @endcode - */ -- (id)yajl_JSONWithOptions:(YAJLParserOptions)options error:(NSError **)error; - -@end - diff --git a/src/extThree20JSON/Vendors/YAJL/NSObject+YAJL.m b/src/extThree20JSON/Vendors/YAJL/NSObject+YAJL.m deleted file mode 100644 index 6aa9406b24..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/NSObject+YAJL.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// NSObject+YAJL.m -// YAJL -// -// Created by Gabriel Handford on 7/23/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - -#import "extThree20JSON/NSObject+YAJL.h" -#import "extThree20JSON/YAJLGen.h" -#import "extThree20JSON/YAJLDocument.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - - -TT_FIX_CATEGORY_BUG(NSObject_YAJL) - -@implementation NSObject(YAJL) - -#pragma mark Gen - -- (NSString *)yajl_JSONString { - return [self yajl_JSONStringWithOptions:YAJLGenOptionsNone indentString:@" "]; -} - -- (NSString *)yajl_JSONStringWithOptions:(YAJLGenOptions)options indentString:(NSString *)indentString { - YAJLGen *gen = [[YAJLGen alloc] initWithGenOptions:options indentString:indentString]; - [gen object:self]; - NSString *buffer = [[gen buffer] retain]; - [gen release]; - return [buffer autorelease]; -} - -#pragma mark Parsing - -- (id)yajl_JSON { - NSError *error = nil; - id JSON = [self yajl_JSON:&error]; - if (error) [NSException raise:YAJLParserException format:[error localizedDescription], nil]; - return JSON; -} - -- (id)yajl_JSON:(NSError **)error { - return [self yajl_JSONWithOptions:YAJLParserOptionsNone error:error]; -} - -- (id)yajl_JSONWithOptions:(YAJLParserOptions)options error:(NSError **)error { - NSData *data = nil; - if ([self isKindOfClass:[NSData class]]) { - data = (NSData *)self; - } else if ([self respondsToSelector:@selector(dataUsingEncoding:)]) { - data = [(id)self dataUsingEncoding:NSUTF8StringEncoding]; - } else { - [NSException raise:YAJLParsingUnsupportedException format:@"Object of type (%@) must implement dataUsingEncoding: to be parsed", [self class]]; - } - - YAJLDocument *document = [[YAJLDocument alloc] initWithData:data parserOptions:options error:error]; - id root = [document.root retain]; - [document release]; - return [root autorelease]; -} - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/README.md b/src/extThree20JSON/Vendors/YAJL/README.md deleted file mode 100644 index 75490041e6..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/README.md +++ /dev/null @@ -1,169 +0,0 @@ -# YAJL (Objective-C Wrapper) - -YAJL.framework is an Objective-C wrapper around the [YAJL](http://lloyd.github.com/yajl/) SAX-style JSON parser. - -## Download - -### Mac OS X - -[YAJL-0.2.16.zip](http://rel.me.s3.amazonaws.com/yajl/YAJL-0.2.16.zip) *YAJL.framework* (2010/03/01) - -### iPhone - -[libYAJLIPhone-0.2.17.zip](http://rel.me.s3.amazonaws.com/yajl/libYAJLIPhone-0.2.17.zip) *Static Library for iPhone OS 3.0 Simulator & Device* (2010/04/15) - -## Install (Mac OS X) - -There are two options. You can install it globally in /Library/Frameworks or with a little extra effort embed it with your project. - -### Installing in /Library/Frameworks - -- Copy `YAJL.framework` to `/Library/Frameworks/` -- In the target Info window, General tab: - - Add a linked library, under `Mac OS X 10.5 SDK` section, select `YAJL.framework` - -### Installing in your project - -- Copy `YAJL.framework` to your project directory (maybe in MyProject/Frameworks/.) -- Add the `YAJL.framekwork` files (from MyProject/Frameworks/) to your target. It should be visible as a `Linked Framework` in the target. -- Under Build Settings, add `@loader_path/../Frameworks` to `Runpath Search Paths` -- Add `New Build Phase` | `New Copy Files Build Phase`. - - Change the Destination to `Frameworks`. - - Drag `YAJL.framework` into the the build phase - - Make sure the copy phase appears before any `Run Script` phases - -## Install (iPhone) - -- Add files (from static library build) to project. -- Under 'Other Linker Flags' in the Test target, add `-ObjC` and `-all_load` (So NSObject+YAJL category is loaded). - -## Usage - -To parse JSON from an NSData (or NSString): - - #import "NSObject+YAJL.h" - - NSData *JSONData = [NSData dataWithContentsOfFile:@"example.json"]; - NSArray *arrayFromData = [JSONData yajl_JSON]; - - NSString *JSONString = @"[\"Test\"]"; - NSArray *arrayFromString = [JSONString yajl_JSON]; - - // With options and out error - NSError *error = nil; - NSArray *arrayFromString = [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:&error]; - -To generate JSON from an object: - - #import "NSObject+YAJL.h" - - NSDictionary *dict = [NSDictionary dictionaryWithObject:@"value" forKey:@"key"]; - NSString *JSONString = [dict yajl_JSONString]; - - // Beautified with custon indent string - NSArray *array = [NSArray arrayWithObjects:@"value1", @"value2", nil]; - NSString *JSONString = [dict yajl_JSONStringWithOptions:YAJLGenOptionsBeautify indentString:@" "]; - -To use the streaming (or SAX style) parser, use `YAJLParser`. For higher level (document) streaming, see below. - - NSData *data = [NSData dataWithContentsOfFile:@"example.json"]; - - YAJLParser *parser = [[YAJLParser alloc] initWithParserOptions:YAJLParserOptionsAllowComments]; - parser.delegate = self; - [parser parse:data]; - if (parser.parserError) { - NSLog(@"Error:\n%@", parser.parserError); - } - - parser.delegate = nil; - [parser release]; - - // Include delegate methods from YAJLParserDelegate - /* - - (void)parserDidStartDictionary:(YAJLParser *)parser; - - (void)parserDidEndDictionary:(YAJLParser *)parser; - - - (void)parserDidStartArray:(YAJLParser *)parser; - - (void)parserDidEndArray:(YAJLParser *)parser; - - - (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key; - - (void)parser:(YAJLParser *)parser didAdd:(id)value; - */ - -### Parser Options - -There are options when parsing that can be specified with `YAJLParser#initWithParserOptions:`. - -- `YAJLParserOptionsAllowComments`: Allows comments in JSON -- `YAJLParserOptionsCheckUTF8`: Will verify UTF-8 -- `YAJLParserOptionsStrictPrecision`: Will force strict precision and return integer overflow error, if number is greater than long long. - -### Streaming Example (Parser) - - YAJLParser *parser = [[[YAJLParser alloc] init] autorelease]; - parser.delegate = self; - - // A chunk of data comes... - YAJLParserStatus status = [parser parse:chunk1]; - // 'status' should be YAJLParserStatusInsufficientData, if its not finished - if (parser.parserError) ...; - - // Another chunk of data comes... - YAJLParserStatus status = [parser parse:chunk2]; - // 'status' should be YAJLParserStatusOK if its finished - if (parser.parserError) ...; - -## Usage (Document-style) - -To use the document style, use `YAJLDocument`. Usage should be very similar to `NSXMLDocument`. - - NSData *data = [NSData dataWithContentsOfFile:@"example.json"]; - NSError *error = nil; - YAJLDocument *document = [[YAJLDocument alloc] initWithData:data parserOptions:0 error:&error]; - // Access root element at document.root - NSLog(@"Root: %@", document.root); - [document release]; - -### Streaming Example (Document) - - YAJLDocument *document = [[YAJLDocument alloc] init]; - document.delegate = self; - - NSError *error = nil; - [document parse:chunk1 error:error]; - [document parse:chunk2 error:error]; - - // You can access root element at document.root - NSLog(@"Root: %@", document.root); - [document release]; - - // Or via the YAJLDocumentDelegate delegate methods - - - (void)document:(YAJLDocument *)document didAddDictionary:(NSDictionary *)dict { } - - (void)document:(YAJLDocument *)document didAddArray:(NSArray *)array { } - - (void)document:(YAJLDocument *)document didAddObject:(id)object toArray:(NSArray *)array { } - - (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict { } - -## Customized Encoding - -To implement JSON encodable value for custom objects or override for existing objects, implement `- (id)JSON;` - -For example: - - @interface CustomObject : NSObject - @end - - @implementation CustomObject - - - (id)JSON { - return [NSArray arrayWithObject:[NSNumber numberWithInteger:1]]; - } - - @end - -Then: - - CustomObject *customObject = [[CustomObject alloc] init]; - NSString *JSONString = [customObject yajl_JSON]; - // JSONString == "[1]"; - diff --git a/src/extThree20JSON/Vendors/YAJL/YAJL.h b/src/extThree20JSON/Vendors/YAJL/YAJL.h deleted file mode 100644 index 1545c6856e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/YAJL.h +++ /dev/null @@ -1,209 +0,0 @@ -// -// YAJL.h -// YAJL -// -// Created by Gabriel Handford on 7/23/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - -#import "extThree20JSON/YAJLParser.h" -#import "extThree20JSON/YAJLDocument.h" -#import "extThree20JSON/YAJLGen.h" -#import "extThree20JSON/NSObject+YAJL.h" -#import "extThree20JSON/NSBundle+YAJL.h" - -/*! - YAJL - - The YAJL framework is an Objective-C wrapper around the http://lloyd.github.com/yajl/ SAX-style JSON parser. - - @section Links - - Source: http://github.com/gabriel/yajl-objc - - View docs online: http://gabriel.github.com/yajl-objc/ - - YAJL C docs: http://lloyd.github.com/yajl/ - - @section Usage Usage - - To use the framework (for Mac OS X or iOS): - - @code - #import - @endcode - - @section Examples Examples - - @subsection Example1 To parse JSON from NSData - - @code - NSData *JSONData = [NSData dataWithContentsOfFile:@"example.json"]; - NSArray *arrayFromData = [JSONData yajl_JSON]; - @endcode - - @subsection Example2 To parse JSON from NSString - - @code - NSString *JSONString = @"[1, 2, 3]"; - NSArray *arrayFromString = [JSONString yajl_JSON]; - @endcode - - @subsection Example2 To parse JSON from NSString with error and comments - - @code - // With options and out error - NSString *JSONString = @"[1, 2, 3] // Allow comments"; - NSError *error = nil; - NSArray *arrayFromString = [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:&error]; - @endcode - - @subsection Example3 To generate JSON from an object, NSArray, NSDictionary, etc. - - @code - NSDictionary *dict = [NSDictionary dictionaryWithObject:@"value" forKey:@"key"]; - NSString *JSONString = [dict yajl_JSONString]; - @endcode - - @subsection Example4 To generate JSON from an object, beautified with custom indent - - @code - // Beautified with custon indent string - NSArray *array = [NSArray arrayWithObjects:@"value1", @"value2", nil]; - NSString *JSONString = [dict yajl_JSONStringWithOptions:YAJLGenOptionsBeautify indentString:@" "]; - @endcode - - @subsection Example5 To use the streaming (or SAX style) parser, use YAJLParser - - @code - NSData *data = [NSData dataWithContentsOfFile:@"example.json"]; - - YAJLParser *parser = [[YAJLParser alloc] initWithParserOptions:YAJLParserOptionsAllowComments]; - parser.delegate = self; - [parser parse:data]; - if (parser.parserError) - NSLog(@"Error:\n%@", parser.parserError); - - parser.delegate = nil; - [parser release]; - - // Include delegate methods from YAJLParserDelegate - - (void)parserDidStartDictionary:(YAJLParser *)parser { } - - (void)parserDidEndDictionary:(YAJLParser *)parser { } - - - (void)parserDidStartArray:(YAJLParser *)parser { } - - (void)parserDidEndArray:(YAJLParser *)parser { } - - - (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key { } - - (void)parser:(YAJLParser *)parser didAdd:(id)value { } - @endcode - - @subsection ParserOptions Parser Options - - There are options when parsing that can be specified with YAJLParser#initWithParserOptions:. - - - YAJLParserOptionsAllowComments: Allows comments in JSON - - YAJLParserOptionsCheckUTF8: Will verify UTF-8 - - YAJLParserOptionsStrictPrecision: Will force strict precision and return integer overflow error, if number is greater than long long. - - @subsection Example6 Parsing as data becomes available - - @code - YAJLParser *parser = [[[YAJLParser alloc] init] autorelease]; - parser.delegate = self; - - // A chunk of data comes... - YAJLParserStatus status = [parser parse:chunk1]; - // 'status' should be YAJLParserStatusInsufficientData, if its not finished - if (parser.parserError) - NSLog(@"Error:\n%@", parser.parserError); - - // Another chunk of data comes... - YAJLParserStatus status = [parser parse:chunk2]; - // 'status' should be YAJLParserStatusOK if its finished - if (parser.parserError) - NSLog(@"Error:\n%@", parser.parserError); - @endcode - - @subsection Example7 Document style parsing - - To use the document style, use YAJLDocument. Usage should be very similar to NSXMLDocument. - - @code - NSData *data = [NSData dataWithContentsOfFile:@"example.json"]; - NSError *error = nil; - YAJLDocument *document = [[YAJLDocument alloc] initWithData:data parserOptions:YAJLParserOptionsNone error:&error]; - // Access root element at document.root - NSLog(@"Root: %@", document.root); - [document release]; - @endcode - - @subsection Example8 Document style parsing as data becomes available - - @code - YAJLDocument *document = [[YAJLDocument alloc] init]; - document.delegate = self; - - NSError *error = nil; - [document parse:chunk1 error:error]; - [document parse:chunk2 error:error]; - - // You can access root element at document.root - NSLog(@"Root: %@", document.root); - [document release]; - - // Or via the YAJLDocumentDelegate delegate methods - - - (void)document:(YAJLDocument *)document didAddDictionary:(NSDictionary *)dict { } - - (void)document:(YAJLDocument *)document didAddArray:(NSArray *)array { } - - (void)document:(YAJLDocument *)document didAddObject:(id)object toArray:(NSArray *)array { } - - (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict { } - @endcode - - @subsection Example9 Load JSON from Bundle - - @code - id JSONValue = [[NSBundle mainBundle] yajl_JSONFromResource:@"kegs.json"]; - @endcode - - @section CustomizedEncoding Customized Encoding - - To implement JSON encodable value for custom objects or override for existing objects, implement - (id)JSON; - - For example: - - @code - @interface CustomObject : NSObject - @end - - @implementation CustomObject - - - (id)JSON { - return [NSArray arrayWithObject:[NSNumber numberWithInteger:1]]; - } - - @end - @endcode - - */ diff --git a/src/extThree20JSON/Vendors/YAJL/YAJLDocument.h b/src/extThree20JSON/Vendors/YAJL/YAJLDocument.h deleted file mode 100644 index f8c2b2b96b..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/YAJLDocument.h +++ /dev/null @@ -1,172 +0,0 @@ -// -// YAJLDecoder.h -// YAJL -// -// Created by Gabriel Handford on 3/1/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - - -#include "extThree20JSON/YAJLParser.h" - -typedef enum { - YAJLDecoderCurrentTypeNone, - YAJLDecoderCurrentTypeArray, - YAJLDecoderCurrentTypeDict -} YAJLDecoderCurrentType; - -extern NSInteger YAJLDocumentStackCapacity; - -@class YAJLDocument; - -/*! - YAJLDocument delegate notified when objects are added. - */ -@protocol YAJLDocumentDelegate -@optional -/*! - Did add dictionary. - @param document Sender - @param dict Dictionary that was added - */ -- (void)document:(YAJLDocument *)document didAddDictionary:(NSDictionary *)dict; - -/*! - Did add array. - @param document Sender - @param array Array that was added - */ -- (void)document:(YAJLDocument *)document didAddArray:(NSArray *)array; - -/*! - Did add object to array. - @param document Sender - @param object Object added - @param array Array objct was added to - */ -- (void)document:(YAJLDocument *)document didAddObject:(id)object toArray:(NSArray *)array; - -/*! - Did set object for key on dictionary. - @param document Sender - @param object Object that was set - @param key Key - @param dict Dictionary object was set for key on - */ -- (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict; -@end - -/*! - JSON document interface. - - @code - NSData *data = [NSData dataWithContentsOfFile:@"example.json"]; - NSError *error = nil; - YAJLDocument *document = [[YAJLDocument alloc] initWithData:data parserOptions:YAJLParserOptionsNone error:&error]; - // Access root element at document.root - NSLog(@"Root: %@", document.root); - [document release]; - @endcode - - Example for streaming: - @code - YAJLDocument *document = [[YAJLDocument alloc] init]; - document.delegate = self; - - NSError *error = nil; - [document parse:chunk1 error:error]; - [document parse:chunk2 error:error]; - - // You can access root element at document.root - NSLog(@"Root: %@", document.root); - [document release]; - - // Or via the YAJLDocumentDelegate delegate methods - - - (void)document:(YAJLDocument *)document didAddDictionary:(NSDictionary *)dict { } - - (void)document:(YAJLDocument *)document didAddArray:(NSArray *)array { } - - (void)document:(YAJLDocument *)document didAddObject:(id)object toArray:(NSArray *)array { } - - (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict { } - @endcode - */ -@interface YAJLDocument : NSObject { - - id root_; // NSArray or NSDictionary - YAJLParser *parser_; - - // TODO(gabe): This should be __weak - id delegate_; - - __weak NSMutableDictionary *dict_; // weak; if map in progress, points to the current map - __weak NSMutableArray *array_; // weak; If array in progress, points the current array - __weak NSString *key_; // weak; If map in progress, points to current key - - NSMutableArray *stack_; - NSMutableArray *keyStack_; - - YAJLDecoderCurrentType currentType_; - - YAJLParserStatus parserStatus_; - -} - -@property (readonly, nonatomic) id root; //! The root element of the document, either NSArray or NSDictionary -@property (readonly, nonatomic) YAJLParserStatus parserStatus; //! The current status of parsing -@property (assign, nonatomic) id delegate; //! Delegate - -/*! - Create document from data. - @param data Data to parse - @param parserOptions Parse options - - YAJLParserOptionsNone: No options - - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //) - - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error - - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error - @param error Error to set on failure - */ -- (id)initWithData:(NSData *)data parserOptions:(YAJLParserOptions)parserOptions error:(NSError **)error; - -/*! - Create empty document with parser options. - @param parserOptions Parse options - - YAJLParserOptionsNone: No options - - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //) - - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error - - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error - */ -- (id)initWithParserOptions:(YAJLParserOptions)parserOptions; - -/*! - Parse data. - @param data Data to parse - @param error Out error to set on failure - @result Parser status - - YAJLParserStatusNone: No status - - YAJLParserStatusOK: Parsed OK - - YAJLParserStatusInsufficientData: There was insufficient data - - YAJLParserStatusError: Parser errored - */ -- (YAJLParserStatus)parse:(NSData *)data error:(NSError **)error; - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/YAJLDocument.m b/src/extThree20JSON/Vendors/YAJL/YAJLDocument.m deleted file mode 100644 index 71040a2c5f..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/YAJLDocument.m +++ /dev/null @@ -1,167 +0,0 @@ -// -// YAJLDocument.m -// YAJL -// -// Created by Gabriel Handford on 3/1/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - - -#import "extThree20JSON/YAJLDocument.h" - -@interface YAJLDocument () -- (void)_pop; -- (void)_popKey; -@end - -NSInteger YAJLDocumentStackCapacity = 20; - -@implementation YAJLDocument - -@synthesize root=root_, parserStatus=parserStatus_, delegate=delegate_; - -- (id)init { - return [self initWithParserOptions:0]; -} - -- (id)initWithParserOptions:(YAJLParserOptions)parserOptions { - if ((self = [super init])) { - stack_ = [[NSMutableArray alloc] initWithCapacity:YAJLDocumentStackCapacity]; - keyStack_ = [[NSMutableArray alloc] initWithCapacity:YAJLDocumentStackCapacity]; - parserStatus_ = YAJLParserStatusNone; - parser_ = [[YAJLParser alloc] initWithParserOptions:parserOptions]; - parser_.delegate = self; - } - return self; -} - -- (id)initWithData:(NSData *)data parserOptions:(YAJLParserOptions)parserOptions error:(NSError **)error { - if ((self = [self initWithParserOptions:parserOptions])) { - [self parse:data error:error]; - } - return self; -} - -- (void)dealloc { - [stack_ release]; - [keyStack_ release]; - parser_.delegate = nil; - [parser_ release]; - [root_ release]; - [super dealloc]; -} - -- (YAJLParserStatus)parse:(NSData *)data error:(NSError **)error { - parserStatus_ = [parser_ parse:data]; - if (error) *error = [parser_ parserError]; - return parserStatus_; -} - -#pragma mark Delegates - -- (void)parser:(YAJLParser *)parser didAdd:(id)value { - switch(currentType_) { - case YAJLDecoderCurrentTypeArray: - [array_ addObject:value]; - if ([delegate_ respondsToSelector:@selector(document:didAddObject:toArray:)]) - [delegate_ document:self didAddObject:value toArray:array_]; - break; - case YAJLDecoderCurrentTypeDict: - NSParameterAssert(key_); - [dict_ setObject:value forKey:key_]; - if ([delegate_ respondsToSelector:@selector(document:didSetObject:forKey:inDictionary:)]) - [delegate_ document:self didSetObject:value forKey:key_ inDictionary:dict_]; - [self _popKey]; - break; - } -} - -- (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key { - key_ = key; - [keyStack_ addObject:key_]; // Push -} - -- (void)_popKey { - key_ = nil; - [keyStack_ removeLastObject]; // Pop - if ([keyStack_ count] > 0) - key_ = [keyStack_ objectAtIndex:[keyStack_ count]-1]; -} - -- (void)parserDidStartDictionary:(YAJLParser *)parser { - NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:YAJLDocumentStackCapacity]; - if (!root_) root_ = [dict retain]; - [stack_ addObject:dict]; // Push - [dict release]; - dict_ = dict; - currentType_ = YAJLDecoderCurrentTypeDict; -} - -- (void)parserDidEndDictionary:(YAJLParser *)parser { - id value = [[stack_ objectAtIndex:[stack_ count]-1] retain]; - NSDictionary *dict = dict_; - [self _pop]; - [self parser:parser didAdd:value]; - [value release]; - if ([delegate_ respondsToSelector:@selector(document:didAddDictionary:)]) - [delegate_ document:self didAddDictionary:dict]; -} - -- (void)parserDidStartArray:(YAJLParser *)parser { - NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:YAJLDocumentStackCapacity]; - if (!root_) root_ = [array retain]; - [stack_ addObject:array]; // Push - [array release]; - array_ = array; - currentType_ = YAJLDecoderCurrentTypeArray; -} - -- (void)parserDidEndArray:(YAJLParser *)parser { - id value = [[stack_ objectAtIndex:[stack_ count]-1] retain]; - NSArray *array = array_; - [self _pop]; - [self parser:parser didAdd:value]; - [value release]; - if ([delegate_ respondsToSelector:@selector(document:didAddArray:)]) - [delegate_ document:self didAddArray:array]; -} - -- (void)_pop { - [stack_ removeLastObject]; - array_ = nil; - dict_ = nil; - currentType_ = YAJLDecoderCurrentTypeNone; - - id value = nil; - if ([stack_ count] > 0) value = [stack_ objectAtIndex:[stack_ count]-1]; - if ([value isKindOfClass:[NSArray class]]) { - array_ = (NSMutableArray *)value; - currentType_ = YAJLDecoderCurrentTypeArray; - } else if ([value isKindOfClass:[NSDictionary class]]) { - dict_ = (NSMutableDictionary *)value; - currentType_ = YAJLDecoderCurrentTypeDict; - } -} - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/YAJLGen.h b/src/extThree20JSON/Vendors/YAJL/YAJLGen.h deleted file mode 100644 index 1fa5ec1e50..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/YAJLGen.h +++ /dev/null @@ -1,171 +0,0 @@ -// -// YAJLGen.h -// YAJL -// -// Created by Gabriel Handford on 7/19/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - -#include "extThree20JSON/yajl_gen.h" - - -extern NSString *const YAJLGenInvalidObjectException; //! Exception type if we encounter invalid object - -//! JSON generate options -enum YAJLGenOptions { - YAJLGenOptionsNone = 0, //!< No options - YAJLGenOptionsBeautify = 1 << 0, //!< Beautifiy JSON output - YAJLGenOptionsIgnoreUnknownTypes = 1 << 1, //!< Ignore unknown types (will use null value) - YAJLGenOptionsIncludeUnsupportedTypes = 1 << 2, //!< Handle non-JSON types (including NSDate, NSData, NSURL) -}; -typedef NSUInteger YAJLGenOptions; - -/*! - YAJL JSON string generator. - Supports the following types: - - NSArray - - NSDictionary - - NSString - - NSNumber - - NSNull - - We also support the following types (if using YAJLGenOptionsIncludeUnsupportedTypes option), - by converting to JSON supported types: - - NSDate: number representing number of milliseconds since (1970) epoch - - NSData: Base64 encoded string - - NSURL: URL (absolute) string - */ -@interface YAJLGen : NSObject { - yajl_gen gen_; - - YAJLGenOptions genOptions_; -} - -/*! - JSON generator with options. - @param genOptions Generate options - - YAJLGenOptionsNone: No options - - YAJLGenOptionsBeautify: Beautifiy JSON output - - YAJLGenOptionsIgnoreUnknownTypes: Ignore unknown types (will use null value) - - YAJLGenOptionsIncludeUnsupportedTypes: Handle non-JSON types (including NSDate, NSData, NSURL) - - @param indentString String for indentation - */ -- (id)initWithGenOptions:(YAJLGenOptions)genOptions indentString:(NSString *)indentString; - -/*! - Write JSON for object to buffer. - @param obj Supported or custom object - */ -- (void)object:(id)obj; - -/*! - Write null value to buffer. - */ -- (void)null; - -/*! - Write bool value to buffer. - @param b Output true or false - */ -- (void)bool:(BOOL)b; - -/*! - Write numeric value to buffer. - @param number Numeric value - */ -- (void)number:(NSNumber *)number; - -/*! - Write string value to buffer. - @param s String value - */ -- (void)string:(NSString *)s; - -/*! - Write dictionary start ('{') to buffer. - */ -- (void)startDictionary; - -/*! - Write dictionary end ('}') to buffer. - */ -- (void)endDictionary; - -/*! - Write array start ('[') to buffer. - */ -- (void)startArray; - -/*! - Write array end (']') to buffer. - */ -- (void)endArray; - -/*! - Clear JSON buffer. - */ -- (void)clear; - -/*! - Get current JSON buffer. - */ -- (NSString *)buffer; - -@end - - -/*! - Custom objects can support manual JSON encoding. - - @code - @interface CustomObject : NSObject - @end - - @implementation CustomObject - - - (id)JSON { - return [NSArray arrayWithObject:[NSNumber numberWithInteger:1]]; - } - - @end - @endcode - - And then: - - @code - CustomObject *customObject = [[CustomObject alloc] init]; - NSString *JSONString = [customObject yajl_JSON]; - // JSONString == "[1]"; - @endcode - */ -@protocol YAJLCoding - -/*! - Provide custom and/or encodable object to parse to JSON string. - @result Object encodable as JSON such as NSDictionary, NSArray, etc - */ -- (id)JSON; - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/YAJLGen.m b/src/extThree20JSON/Vendors/YAJL/YAJLGen.m deleted file mode 100644 index ac23d61061..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/YAJLGen.m +++ /dev/null @@ -1,165 +0,0 @@ -// -// YAJLGen.m -// YAJL -// -// Created by Gabriel Handford on 7/19/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - -#import "extThree20JSON/YAJLGen.h" -#import "extThree20JSON/private/GTMBase64.h" - -NSString *const YAJLGenInvalidObjectException = @"YAJLGenInvalidObjectException"; - -@implementation YAJLGen - -- (id)init { - return [self initWithGenOptions:YAJLGenOptionsNone indentString:@""]; -} - -- (id)initWithGenOptions:(YAJLGenOptions)genOptions indentString:(NSString *)indentString { - if ((self = [super init])) { - genOptions_ = genOptions; - yajl_gen_config cfg = { - ((genOptions & YAJLGenOptionsBeautify) ? 1 : 0), - [indentString UTF8String] - }; - gen_ = yajl_gen_alloc(&cfg, NULL); - } - return self; -} - -- (void)dealloc { - if (gen_ != NULL) yajl_gen_free(gen_); - [super dealloc]; -} - -- (void)object:(id)obj { - if ([obj respondsToSelector:@selector(JSON)]) { - return [self object:[obj JSON]]; - } else if ([obj isKindOfClass:[NSArray class]]) { - [self startArray]; - for(id element in obj) - [self object:element]; - [self endArray]; - } else if ([obj isKindOfClass:[NSDictionary class]]) { - [self startDictionary]; - for(id key in obj) { - [self object:key]; - [self object:[obj objectForKey:key]]; - } - [self endDictionary]; - } else if ([obj isKindOfClass:[NSNumber class]]) { - if ('c' != *[obj objCType]) { - [self number:obj]; - } else { - [self bool:[obj boolValue]]; - } - } else if ([obj isKindOfClass:[NSString class]]) { - [self string:obj]; - } else if ([obj isKindOfClass:[NSNull class]]) { - [self null]; - } else { - - BOOL unknownType = NO; - if (genOptions_ & YAJLGenOptionsIncludeUnsupportedTypes) { - // Begin with support for non-JSON representable (PList) types - if ([obj isKindOfClass:[NSDate class]]) { - [self number:[NSNumber numberWithLongLong:round([obj timeIntervalSince1970] * 1000)]]; - } else if ([obj isKindOfClass:[NSData class]]) { - [self string:[YAJL_GTMBase64 stringByEncodingData:obj]]; - } else if ([obj isKindOfClass:[NSURL class]]) { - [self string:[obj absoluteString]]; - } else { - unknownType = YES; - } - } else { - unknownType = YES; - } - - // If we didn't handle special PList types - if (unknownType) { - if (!(genOptions_ & YAJLGenOptionsIgnoreUnknownTypes)) { - [NSException raise:YAJLGenInvalidObjectException format:@"Unknown object type: %@ (%@)", [obj class], obj]; - } else { - [self null]; // Use null value for unknown type if we are ignoring - } - } - } -} - -- (void)null { - yajl_gen_null(gen_); -} - -- (void)bool:(BOOL)b { - yajl_gen_bool(gen_, b); -} - -- (void)number:(NSNumber *)number { - NSString *s = [number stringValue]; - unsigned int length = [s lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - const char *c = [s UTF8String]; - yajl_gen_number(gen_, c, length); -} - -- (void)string:(NSString *)s { - unsigned int length = [s lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; - const unsigned char *c = (const unsigned char *)[s UTF8String]; - yajl_gen_string(gen_, c, length); -} - -- (void)startDictionary { - yajl_gen_map_open(gen_); -} - -- (void)endDictionary { - yajl_gen_map_close(gen_); -} - -- (void)startArray { - yajl_gen_array_open(gen_); -} - -- (void)endArray { - yajl_gen_array_close(gen_); -} - -- (void)clear { - yajl_gen_clear(gen_); -} - -- (NSString *)buffer { - const unsigned char *buf; - unsigned int len; - yajl_gen_get_buf(gen_, &buf, &len); - NSString *s = [NSString stringWithUTF8String:(const char*)buf]; - return s; -} - -@end - - - - diff --git a/src/extThree20JSON/Vendors/YAJL/YAJLParser.h b/src/extThree20JSON/Vendors/YAJL/YAJLParser.h deleted file mode 100644 index 735107bd04..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/YAJLParser.h +++ /dev/null @@ -1,181 +0,0 @@ -// -// YAJLParser.h -// YAJL -// -// Created by Gabriel Handford on 6/14/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - - -#include "extThree20JSON/yajl_parse.h" - - -extern NSString *const YAJLErrorDomain; //! Error domain for YAJL -extern NSString *const YAJLParserException; //! Generic parse exception -extern NSString *const YAJLParsingUnsupportedException; //! Parsing unsupported exception - -extern NSString *const YAJLParserValueKey; //! Key in NSError userInfo for value we errored on - -//! Parser error codes -enum YAJLParserErrorCode { - YAJLParserErrorCodeAllocError = -1000, //!< Alloc error - YAJLParserErrorCodeDoubleOverflow = -1001, //!< Double overflow - YAJLParserErrorCodeIntegerOverflow = -1002 //!< Integer overflow -}; -typedef NSInteger YAJLParserErrorCode; //! Parser error codes - -//! Parser options -enum YAJLParserOptions { - YAJLParserOptionsNone = 0, //!< No options - YAJLParserOptionsAllowComments = 1 << 0, //!< Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //) - YAJLParserOptionsCheckUTF8 = 1 << 1, //!< Invalid UTF8 strings will cause a parse error - YAJLParserOptionsStrictPrecision = 1 << 2, //!< If YES will force strict precision and return integer overflow error -}; -typedef NSUInteger YAJLParserOptions; //! Parser options - -//! Parser status -enum { - YAJLParserStatusNone = 0, //!< No status - YAJLParserStatusOK = 1, //!< Parsed OK - YAJLParserStatusInsufficientData = 2, //!< There was insufficient data - YAJLParserStatusError = 3 //!< Parser errored -}; -typedef NSUInteger YAJLParserStatus; //!< Status of the last parse event - - -@class YAJLParser; - -/*! - Delegate for YAJL JSON parser. - */ -@protocol YAJLParserDelegate - -/*! - Parser did start dictionary. - @param parser Sender - */ -- (void)parserDidStartDictionary:(YAJLParser *)parser; - -/*! - Parser did end dictionary. - @param parser Sender - */ -- (void)parserDidEndDictionary:(YAJLParser *)parser; - -/*! - Parser did start array. - @param parser Sender - */ -- (void)parserDidStartArray:(YAJLParser *)parser; - -/*! - Parser did end array. - @param parser Sender - */ -- (void)parserDidEndArray:(YAJLParser *)parser; - -/*! - Parser did map key. - @param parser Sender - @param key Key that was mapped - */ -- (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key; - -/*! - Did add value. - @param parser Sender - @param value Value of type NSNull, NSString or NSNumber - */ -- (void)parser:(YAJLParser *)parser didAdd:(id)value; - -@end - -/*! - JSON parser. - - @code - NSData *data = [NSData dataWithContentsOfFile:@"example.json"]; - - YAJLParser *parser = [[YAJLParser alloc] initWithParserOptions:YAJLParserOptionsAllowComments]; - parser.delegate = self; - [parser parse:data]; - if (parser.parserError) { - NSLog(@"Error:\n%@", parser.parserError); - } - - parser.delegate = nil; - [parser release]; - - // Include delegate methods from YAJLParserDelegate - - (void)parserDidStartDictionary:(YAJLParser *)parser { } - - (void)parserDidEndDictionary:(YAJLParser *)parser { } - - - (void)parserDidStartArray:(YAJLParser *)parser { } - - (void)parserDidEndArray:(YAJLParser *)parser { } - - - (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key { } - - (void)parser:(YAJLParser *)parser didAdd:(id)value { } - @endcode - */ -@interface YAJLParser : NSObject { - - yajl_handle handle_; - - __weak id delegate_; // weak - - YAJLParserOptions parserOptions_; - - NSError *parserError_; -} - -@property (assign, nonatomic) __weak id delegate; -@property (readonly, retain, nonatomic) NSError *parserError; -@property (readonly, nonatomic) YAJLParserOptions parserOptions; - -/*! - Create parser with data and options. - @param parserOptions Parser options - - YAJLParserOptionsNone: No options - - YAJLParserOptionsAllowComments: Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //) - - YAJLParserOptionsCheckUTF8: Invalid UTF8 strings will cause a parse error - - YAJLParserOptionsStrictPrecision: If YES will force strict precision and return integer overflow error - */ -- (id)initWithParserOptions:(YAJLParserOptions)parserOptions; - -/*! - Parse data. - - If streaming, you can call parse multiple times as long as - previous calls return YAJLParserStatusInsufficientData. - - @param data - @result Parser status - - YAJLParserStatusNone: No status - - YAJLParserStatusOK: Parsed OK - - YAJLParserStatusInsufficientData: There was insufficient data - - YAJLParserStatusError: Parser errored - */ -- (YAJLParserStatus)parse:(NSData *)data; - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/YAJLParser.m b/src/extThree20JSON/Vendors/YAJL/YAJLParser.m deleted file mode 100644 index a7f1ab5c3a..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/YAJLParser.m +++ /dev/null @@ -1,284 +0,0 @@ -// -// YAJLParser.m -// YAJL -// -// Created by Gabriel Handford on 6/14/09. -// Copyright 2009. All rights reserved. -// -// 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. -// - - -#import "extThree20JSON/YAJLParser.h" - -NSString *const YAJLErrorDomain = @"YAJLErrorDomain"; -NSString *const YAJLParserException = @"YAJLParserException"; -NSString *const YAJLParsingUnsupportedException = @"YAJLParsingUnsupportedException"; - -NSString *const YAJLParserValueKey = @"YAJLParserValueKey"; - -@interface YAJLParser () -@property (retain, nonatomic) NSError *parserError; -@end - -//! @internal - -@interface YAJLParser () -- (void)_add:(id)value; -- (void)_mapKey:(NSString *)key; - -- (void)_startDictionary; -- (void)_endDictionary; - -- (void)_startArray; -- (void)_endArray; - -- (NSError *)_errorForStatus:(NSInteger)code message:(NSString *)message value:(NSString *)value; -- (void)_cancelWithErrorForStatus:(NSInteger)code message:(NSString *)message value:(NSString *)value; -@end - -//! @endinternal - - -@implementation YAJLParser - -@synthesize parserError=parserError_, delegate=delegate_, parserOptions=parserOptions_; - -- (id)init { - return [self initWithParserOptions:0]; -} - -- (id)initWithParserOptions:(YAJLParserOptions)parserOptions { - if ((self = [super init])) { - parserOptions_ = parserOptions; - } - return self; -} - -- (void)dealloc { - if (handle_ != NULL) { - yajl_free(handle_); - handle_ = NULL; - } - - [parserError_ release]; - [super dealloc]; -} - -#pragma mark Error Helpers - -- (NSError *)_errorForStatus:(NSInteger)code message:(NSString *)message value:(NSString *)value { - NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObject:message forKey:NSLocalizedDescriptionKey]; - if (value) [userInfo setObject:value forKey:YAJLParserValueKey]; - return [NSError errorWithDomain:YAJLErrorDomain code:code userInfo:userInfo]; -} - -- (void)_cancelWithErrorForStatus:(NSInteger)code message:(NSString *)message value:(NSString *)value { - self.parserError = [self _errorForStatus:code message:message value:value]; -} - -#pragma mark YAJL Callbacks - -int yajl_null(void *ctx) { - [(id)ctx _add:[NSNull null]]; - return 1; -} - -int yajl_boolean(void *ctx, int boolVal) { - NSNumber *number = [[NSNumber alloc] initWithBool:(BOOL)boolVal]; - [(id)ctx _add:number]; - [number release]; - return 1; -} - -// Instead of using yajl_integer, and yajl_double we use yajl_number and parse -// as double (or long long); This is to be more compliant since Javascript numbers are represented -// as double precision floating point, though JSON spec doesn't define a max value -// and is up to the parser? - -//int yajl_integer(void *ctx, long integerVal) { -// [(id)ctx _add:[NSNumber numberWithLong:integerVal]]; -// return 1; -//} -// -//int yajl_double(void *ctx, double doubleVal) { -// [(id)ctx _add:[NSNumber numberWithDouble:doubleVal]]; -// return 1; -//} - -int ParseDouble(void *ctx, const char *buf, const char *numberVal, unsigned int numberLen) { - double d = strtod((char *)buf, NULL); - if ((d == HUGE_VAL || d == -HUGE_VAL) && errno == ERANGE) { - NSString *s = [[NSString alloc] initWithBytes:numberVal length:numberLen encoding:NSUTF8StringEncoding]; - [(id)ctx _cancelWithErrorForStatus:YAJLParserErrorCodeDoubleOverflow message:[NSString stringWithFormat:@"double overflow on '%@'", s] value:s]; - [s release]; - return 0; - } - NSNumber *number = [[NSNumber alloc] initWithDouble:d]; - [(id)ctx _add:number]; - [number release]; - return 1; -} - -int yajl_number(void *ctx, const char *numberVal, unsigned int numberLen) { - char buf[numberLen+1]; - memcpy(buf, numberVal, numberLen); - buf[numberLen] = 0; - - if (memchr(numberVal, '.', numberLen) || memchr(numberVal, 'e', numberLen) || memchr(numberVal, 'E', numberLen)) { - return ParseDouble(ctx, buf, numberVal, numberLen); - } else { - long long i = strtoll((const char *) buf, NULL, 10); - if ((i == LLONG_MIN || i == LLONG_MAX) && errno == ERANGE) { - if (([(id)ctx parserOptions] & YAJLParserOptionsStrictPrecision) == YAJLParserOptionsStrictPrecision) { - NSString *s = [[NSString alloc] initWithBytes:numberVal length:numberLen encoding:NSUTF8StringEncoding]; - [(id)ctx _cancelWithErrorForStatus:YAJLParserErrorCodeIntegerOverflow message:[NSString stringWithFormat:@"integer overflow on '%@'", s] value:s]; - [s release]; - return 0; - } else { - // If we integer overflow lets try double precision for HUGE_VAL > double > LLONG_MAX - return ParseDouble(ctx, buf, numberVal, numberLen); - } - } - NSNumber *number = [[NSNumber alloc] initWithLongLong:i]; - [(id)ctx _add:number]; - [number release]; - } - - return 1; -} - -int yajl_string(void *ctx, const unsigned char *stringVal, unsigned int stringLen) { - NSString *s = [[NSString alloc] initWithBytes:stringVal length:stringLen encoding:NSUTF8StringEncoding]; - [(id)ctx _add:s]; - [s release]; - return 1; -} - -int yajl_map_key(void *ctx, const unsigned char *stringVal, unsigned int stringLen) { - NSString *s = [[NSString alloc] initWithBytes:stringVal length:stringLen encoding:NSUTF8StringEncoding]; - [(id)ctx _mapKey:s]; - [s release]; - return 1; -} - -int yajl_start_map(void *ctx) { - [(id)ctx _startDictionary]; - return 1; -} - -int yajl_end_map(void *ctx) { - [(id)ctx _endDictionary]; - return 1; -} - -int yajl_start_array(void *ctx) { - [(id)ctx _startArray]; - return 1; -} - -int yajl_end_array(void *ctx) { - [(id)ctx _endArray]; - return 1; -} - -static yajl_callbacks callbacks = { -yajl_null, -yajl_boolean, -NULL, // yajl_integer (using yajl_number) -NULL, // yajl_double (using yajl_number) -yajl_number, -yajl_string, -yajl_start_map, -yajl_map_key, -yajl_end_map, -yajl_start_array, -yajl_end_array -}; - -#pragma mark - - -//! @internal - -- (void)_add:(id)value { - [delegate_ parser:self didAdd:value]; -} - -- (void)_mapKey:(NSString *)key { - [delegate_ parser:self didMapKey:key]; -} - -- (void)_startDictionary { - [delegate_ parserDidStartDictionary:self]; -} - -- (void)_endDictionary { - [delegate_ parserDidEndDictionary:self]; -} - -- (void)_startArray { - [delegate_ parserDidStartArray:self]; -} - -- (void)_endArray { - [delegate_ parserDidEndArray:self]; -} - -//! @endinternal - -- (YAJLParserStatus)parse:(NSData *)data { - if (!handle_) { - yajl_parser_config cfg = { - ((parserOptions_ & YAJLParserOptionsAllowComments) ? 1 : 0), // allowComments: if nonzero, javascript style comments will be allowed in the input (both /* */ and //) - ((parserOptions_ & YAJLParserOptionsCheckUTF8) ? 1 : 0) // checkUTF8: if nonzero, invalid UTF8 strings will cause a parse error - }; - - handle_ = yajl_alloc(&callbacks, &cfg, NULL, self); - if (!handle_) { - self.parserError = [self _errorForStatus:YAJLParserErrorCodeAllocError message:@"Unable to allocate YAJL handle" value:nil]; - return YAJLParserStatusError; - } - } - - yajl_status status = yajl_parse(handle_, [data bytes], [data length]); - if (status == yajl_status_client_canceled) { - // We cancelled because we encountered an error here in the client; - // and parserError should be already set - NSAssert(self.parserError, @"Client cancelled, but we have no parserError set"); - return YAJLParserStatusError; - } else if (status == yajl_status_error) { - unsigned char *errorMessage = yajl_get_error(handle_, 1, [data bytes], [data length]); - NSString *errorString = [NSString stringWithUTF8String:(char *)errorMessage]; - self.parserError = [self _errorForStatus:status message:errorString value:nil]; - yajl_free_error(handle_, errorMessage); - return YAJLParserStatusError; - } else if (status == yajl_status_insufficient_data) { - return YAJLParserStatusInsufficientData; - } else if (status == yajl_status_ok) { - return YAJLParserStatusOK; - } else { - self.parserError = [self _errorForStatus:status message:[NSString stringWithFormat:@"Unexpected status %d", status] value:nil]; - return YAJLParserStatusError; - } -} - -@end diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/BUILDING b/src/extThree20JSON/Vendors/YAJL/yajl/BUILDING deleted file mode 100755 index 8460ed4b40..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/BUILDING +++ /dev/null @@ -1,23 +0,0 @@ -Short story (If you already have ruby and cmake): - -./configure && make install - -When things go wrong: - -attain CMake (http://www.cmake.org) and ruby (http://ruby-lang.org) and -try again. - -OR, attain CMake and build by hand: - -1. mkdir build -2. cd build -3. cmake .. -4. make -5. build output left in yajl-X.Y.Z - -NOTE: for 64-bit systems where lib64 is used you can pass the cmake - variable LIB_SUFFIX to cause installation into the system's 'lib64' - directory. - -best, -lloyd diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/BUILDING.win32 b/src/extThree20JSON/Vendors/YAJL/yajl/BUILDING.win32 deleted file mode 100755 index 36685416ee..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/BUILDING.win32 +++ /dev/null @@ -1,12 +0,0 @@ -YAJL has been successfully built using Visual Studio 8. CMake is used to -build the software and by specifying a generator explicitly at cmake: - -1. acquire cmake (http://www.cmake.org) -2. mkdir build -3. cd build -4. cmake .. -5. devenv YetAnotherJSONParser.sln /project ALL_BUILD /build Release -6. build output is left in build/yajl-X.Y.Z - -Earlier versions of visual studio have not been tested, but should -work without any major issues. diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/CMakeLists.txt b/src/extThree20JSON/Vendors/YAJL/yajl/CMakeLists.txt deleted file mode 100755 index 5fa3ec4124..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2010, Lloyd Hilaiel. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# 3. Neither the name of Lloyd Hilaiel nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -PROJECT(YetAnotherJSONParser C) - -SET (YAJL_MAJOR 1) -SET (YAJL_MINOR 0) -SET (YAJL_MICRO 11) - -SET (YAJL_DIST_NAME "yajl-${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO}") - -# RPATH handling -- given we statically link, we'll turn off -# unnec. rpath embedding -SET(CMAKE_SKIP_RPATH TRUE) - -IF (NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "Release") -ENDIF (NOT CMAKE_BUILD_TYPE) - -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") - -IF (WIN32) - ADD_DEFINITIONS(-DWIN32) - SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF") - SET(CMAKE_EXE_LINKER_FLAGS "${linkFlags}" - CACHE STRING "YAJL linker flags" FORCE) - SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "" - CACHE STRING "YAJL debug linker flags" FORCE) - SET(CMAKE_EXE_LINKER_FLAGS_RELEASE - CACHE STRING "YAJL release linker flags" FORCE) - SET(CMAKE_SHARED_LINKER_FLAGS "${linkFlags}" - CACHE STRING "YAJL shared linker flags" FORCE) - SET(CMAKE_MODULE_LINKER_FLAGS "${linkFlags}" - CACHE STRING "YAJL module linker flags" FORCE) - - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711") - SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7") - SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2") -ELSE (WIN32) - SET(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} -fPIC -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes") - - SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g") - SET(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -Wuninitialized") -ENDIF (WIN32) - - -ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(test) -ADD_SUBDIRECTORY(reformatter) -ADD_SUBDIRECTORY(verify) - -INCLUDE(YAJLDoc.cmake) - -# a test target -ADD_CUSTOM_TARGET(test - ./run_tests.sh ${CMAKE_CURRENT_BINARY_DIR}/test/yajl_test - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/COPYING b/src/extThree20JSON/Vendors/YAJL/yajl/COPYING deleted file mode 100755 index 11575ae046..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/COPYING +++ /dev/null @@ -1,29 +0,0 @@ -Copyright 2010, Lloyd Hilaiel. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - 3. Neither the name of Lloyd Hilaiel nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/ChangeLog b/src/extThree20JSON/Vendors/YAJL/yajl/ChangeLog deleted file mode 100755 index 1b4343c049..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/ChangeLog +++ /dev/null @@ -1,119 +0,0 @@ -1.0.11 - * lth remove -Wno-missing-field-initializers for greater gcc compat (3.4.6) - -1.0.10 - * Brian Maher - yajl is now buildable without a c++ compiler present - * Brian Maher - fix header installation on OSX with cmake 2.8.0 installed - * lth & vitali - allow builder to specify alternate lib directory - for installation (i.e. lib64) - * Vitali Lovich - yajl version number now programatically accessible - * lth - prevent cmake from embedding rpaths in binaries. Static linking - makes this unneccesary. - -1.0.9 - * lth - fix inverted logic causing yajl_gen_double() to always fail on - win32 (thanks to Fredrik Kihlander for the report) - -1.0.8 - * Randall E. Barker - move dllexport defnitions so dlls with proper - exports can again be generated on windows - * lth - add yajl_get_bytes_consumed() which allows the client to - determine the offset as an error, as well as determine how - many bytes of an input buffer were consumed. - * lth - fixes to keep "error offset" up to date (like when the - client callback returns 0) - * Brian Maher - allow client to specify a printing function in - generation - -1.0.7 - * lth fix win32 build (isinf and isnan) - -1.0.6 - * lth fix several compiler warnings - * lth fix generation of invalid json from yajl_gen_double - (NaN is not JSON) - * jstamp support for combining short options in tools - * jstamp exit properly on errors from tools - * octo test success no longer depends on integer size - * max fix configure --prefix - -1.0.5 - * lth several performance improvements related to function - inlinin' - -1.0.4 - * lth fix broken utf8 validation for three & four byte represenations. - thanks to http://github.com/brianmario and - http://github.com/technoweenie - -1.0.3 - * lth fix syntax error in cplusplus extern "C" statements for wider - compiler support - -1.0.2 - * lth update doxygen documentation with new sample code, passing NULL - for allocation functions added in 1.0.0 - -1.0.1 - * lth resolve crash in json_reformatter due to incorrectly ordered - parameters. - -1.0.0 - * lth add 'make install' rules, thaks to Andrei Soroker for the - contribution. - * lth client may override allocation routines at generator or parser - allocation time - * tjw add yajl_parse_complete routine to allow client to explicitly - specify end-of-input, solving the "lonely number" case, where - json text consists only of an element with no explicit syntactic - end. - * tjw many new test cases - * tjw cleanup of code for symmetry and ease of reading - * lth integration of patches from Robert Varga which cleanup - compilation warnings on 64 bit linux - -0.4.0 - * lth buffer overflow bug in yajl_gen_double s/%lf/%g/ - thanks to - Eric Bergstrome - * lth yajl_number callback to allow passthrough of arbitrary precision - numbers to client. Thanks to Hatem Nassrat. - * lth yajl_integer now deals in long, instead of long long. This - combined with yajl_number improves compiler compatibility while - maintaining precision. - * lth better ./configure && make experience (still requires cmake and - ruby) - * lth fix handling of special characters hex 0F and 1F in yajl_encode - (thanks to Robert Geiger) - * lth allow leading zeros in exponents (thanks to Hatem Nassrat) - -0.3.0 - * lth doxygen documentation (html & man) generated as part of the - build - * lth many documentation updates. - * lth fix to work with older versions of cmake (don't use LOOSE_LOOP - constructs) - * lth work around different behavior of freebsd 4 scanf. initialize - parameter to scanf to zero. - * lth all tests run 32x with ranging buffer sizes to stress stream - parsing - * lth yajl_test accepts -b option to allow read buffer size to be - set - * lth option to validate UTF8 added to parser (argument in - yajl_parser_cfg) - * lth fix buffer overrun when chunk ends inside \u escaped text - * lth support client cancelation - -0.2.2 - * lth on windows build debug with C7 symbols and no pdb files. - -0.2.1 - * fix yajl_reformat and yajl_verify to work on arbitrarily sized - inputs. - * fix win32 build break, clean up all errors and warnings. - * fix optimized build flags. - -0.2.0 - * optionally support comments in input text - -0.1.0 - * Initial release diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/README b/src/extThree20JSON/Vendors/YAJL/yajl/README deleted file mode 100755 index 93b3a1aa61..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/README +++ /dev/null @@ -1,68 +0,0 @@ -Welcome to Yet Another JSON Library (YAJL) - -## Why does the world need another C library for parsing JSON? - -Good question. In a review of current C JSON parsing libraries I was -unable to find one that satisfies my requirements. Those are, -0. written in C -1. portable -2. robust -- as close to "crash proof" as possible -3. data representation independent -4. fast -5. generates verbose, useful error messages including context of where - the error occurs in the input text. -6. can parse JSON data off a stream, incrementally -7. simple to use -8. tiny - -Numbers 3, 5, 6, and 7 where particularly hard to find, and were what -caused me to ultimately create YAJL. This document is a tour of some -of the more important aspects of YAJL. - -## YAJL is Free. - -BSD licensing means you can use it in open source and commercial products -alike. My request beyond the licensing is that if you find bugs drop -me a email, or better yet, fork me on git and fix it! - -Porting YAJL should be trivial, the implementation is ANSI C. If you -port to new systems I'd love to hear of it and integrate your patches. - -## YAJL is data representation independent. - -BYODR! Many JSON libraries impose a structure based data representation -on you. This is a benefit in some cases and a drawback in others. -YAJL uses callbacks to remain agnostic of the in-memory representation. -So if you wish to build up an in-memory representation, you may do so -using YAJL, but you must bring the code that defines and populates the -in memory structure. - -This also means that YAJL can be used by other (higher level) JSON -libraries if so desired. - -## YAJL supports stream parsing - -This means you do not need to hold the whole JSON representation in -textual form in memory. This makes YAJL ideal for filtering projects, -where you're converting YAJL from one form to another (i.e. XML). The -included JSON pretty printer is an example of such a filter program. - -## YAJL is fast - -Minimal memory copying is performed. YAJL, when possible, returns -pointers into the client provided text (i.e. for strings that have no -embedded escape chars, hopefully the common case). I've put a lot of -effort into profiling and tuning performance, but I have ignored a -couple possible performance improvements to keep the interface clean, -small, and flexible. My hope is that YAJL will perform comparably to -the fastest JSON parser out there. - -YAJL should impose both minimal CPU and memory requirements on your -application. - -## YAJL is tiny. - -Fat free. No whip. - -enjoy, -Lloyd - July, 2007 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/TODO b/src/extThree20JSON/Vendors/YAJL/yajl/TODO deleted file mode 100755 index 56c3dc080c..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/TODO +++ /dev/null @@ -1,9 +0,0 @@ -* add a test for 0x1F bug -* numeric overflow in integers and double -* line and char offsets in the lexer and in error messages -* testing: - a. the permuter - b. some performance comparison against json_checker. -* investigate pull instead of push parsing -* Handle memory allocation failures gracefully -* cygwin/msys support on win32 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/YAJLDoc.cmake b/src/extThree20JSON/Vendors/YAJL/yajl/YAJLDoc.cmake deleted file mode 100755 index 049cdef2c4..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/YAJLDoc.cmake +++ /dev/null @@ -1,26 +0,0 @@ -FIND_PROGRAM(doxygenPath doxygen) - -IF (doxygenPath) - SET (YAJL_VERSION ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO}) - SET(yajlDirName yajl-${YAJL_VERSION}) - SET(docPath - "${CMAKE_CURRENT_BINARY_DIR}/${yajlDirName}/share/doc/${yajlDirName}") - MESSAGE("** using doxygen at: ${doxygenPath}") - MESSAGE("** documentation output to: ${docPath}") - - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/YAJL.dxy - ${CMAKE_CURRENT_BINARY_DIR}/YAJL.dxy @ONLY) - - FILE(MAKE_DIRECTORY "${docPath}") - - ADD_CUSTOM_TARGET(doc - ${doxygenPath} YAJL.dxy - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - -ELSE (doxygenPath) - MESSAGE("!! doxygen not found, not generating documentation") - ADD_CUSTOM_TARGET( - doc - echo doxygen not installed, not generating documentation - ) -ENDIF (doxygenPath) diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/configure b/src/extThree20JSON/Vendors/YAJL/yajl/configure deleted file mode 100755 index f54775e464..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/configure +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env ruby -# Copyright 2010, Lloyd Hilaiel. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# 3. Neither the name of Lloyd Hilaiel nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -require 'fileutils' -require 'optparse' - -prefix = "/usr/local" -options = {} -OptionParser.new do |opts| - opts.banner = "Usage: configure [options]" - opts.on("-p", "--prefix PATH", "Set installation prefix") do |p| - prefix = p - end - opts.on_tail("-h", "--help", "Output usage summary") do - puts opts - exit - end - - opts.parse!(ARGV) -end - -puts "== removing old build files" -FileUtils.rm_rf("build") -FileUtils.rm_f("Makefile") -puts "== running CMake in build directory" -FileUtils.mkdir("build") -FileUtils.cd("build") do - if (!system("cmake -DCMAKE_INSTALL_PREFIX='#{prefix}' ..")) - puts "The \"cmake\" program is required to configure yajl. It's" - puts "available from most ports/packaging systems and http://cmake.org" - exit 1 - end -end - -# now generate a Makefile -puts "== Generating Makefile" -File.open("Makefile", "w+") do |f| - f.puts ".PHONY: all clean distclean install package test distro" - f.puts "all: distro doc test" - f.puts - f.puts "distro:" - f.puts " @cd build && make" - f.puts - f.puts "doc:" - f.puts " @cd build && make doc" - f.puts - f.puts "test:" - f.puts " @cd build && make test" - f.puts - f.puts "clean:" - f.puts " @cd build && make clean" - f.puts - f.puts "distclean:" - f.puts " @rm -rf Makefile build" - f.puts " @rm -f yajl-*.tgz" - f.puts - f.puts "install: all" - f.puts " @cd build && make install" - f.puts - f.puts "package: all" - f.puts " @echo \"compressing to `basename build/yajl-*`.tgz\"" - f.puts " @cd build && tar czf ../`basename yajl-*`.tgz yajl-*" -end - -puts "== Configured with installation prefix: #{prefix}" - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/reformatter/CMakeLists.txt b/src/extThree20JSON/Vendors/YAJL/yajl/reformatter/CMakeLists.txt deleted file mode 100755 index dc3bc3e923..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/reformatter/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2010, Lloyd Hilaiel. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# 3. Neither the name of Lloyd Hilaiel nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# set up a paths -SET (binDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/bin) - -# create a directories -FILE(MAKE_DIRECTORY ${binDir}) - -SET (SRCS json_reformat.c) - -# use the library we build, duh. -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include) -LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) - -ADD_EXECUTABLE(json_reformat ${SRCS}) - -TARGET_LINK_LIBRARIES(json_reformat yajl_s) - -# copy the binary into the output directory -GET_TARGET_PROPERTY(binPath json_reformat LOCATION) - -ADD_CUSTOM_COMMAND(TARGET json_reformat POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir}) - -IF (NOT WIN32) - INSTALL(TARGETS json_reformat RUNTIME DESTINATION bin) -ENDIF () diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/reformatter/json_reformat.c b/src/extThree20JSON/Vendors/YAJL/yajl/reformatter/json_reformat.c deleted file mode 100755 index fbfc02cb24..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/reformatter/json_reformat.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -#include -#include -#include - -static int reformat_null(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_null(g); - return 1; -} - -static int reformat_boolean(void * ctx, int boolean) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_bool(g, boolean); - return 1; -} - -static int reformat_number(void * ctx, const char * s, unsigned int l) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_number(g, s, l); - return 1; -} - -static int reformat_string(void * ctx, const unsigned char * stringVal, - unsigned int stringLen) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_string(g, stringVal, stringLen); - return 1; -} - -static int reformat_map_key(void * ctx, const unsigned char * stringVal, - unsigned int stringLen) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_string(g, stringVal, stringLen); - return 1; -} - -static int reformat_start_map(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_map_open(g); - return 1; -} - - -static int reformat_end_map(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_map_close(g); - return 1; -} - -static int reformat_start_array(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_array_open(g); - return 1; -} - -static int reformat_end_array(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_array_close(g); - return 1; -} - -static yajl_callbacks callbacks = { - reformat_null, - reformat_boolean, - NULL, - NULL, - reformat_number, - reformat_string, - reformat_start_map, - reformat_map_key, - reformat_end_map, - reformat_start_array, - reformat_end_array -}; - -static void -usage(const char * progname) -{ - fprintf(stderr, "%s: reformat json from stdin\n" - "usage: json_reformat [options]\n" - " -m minimize json rather than beautify (default)\n" - " -u allow invalid UTF8 inside strings during parsing\n", - progname); - exit(1); - -} - -int -main(int argc, char ** argv) -{ - yajl_handle hand; - static unsigned char fileData[65536]; - /* generator config */ - yajl_gen_config conf = { 1, " " }; - yajl_gen g; - yajl_status stat; - size_t rd; - /* allow comments */ - yajl_parser_config cfg = { 1, 1 }; - int retval = 0, done = 0; - - /* check arguments.*/ - int a = 1; - while ((a < argc) && (argv[a][0] == '-') && (strlen(argv[a]) > 1)) { - unsigned int i; - for ( i=1; i < strlen(argv[a]); i++) { - switch (argv[a][i]) { - case 'm': - conf.beautify = 0; - break; - case 'u': - cfg.checkUTF8 = 0; - break; - default: - fprintf(stderr, "unrecognized option: '%c'\n\n", argv[a][i]); - usage(argv[0]); - } - } - ++a; - } - if (a < argc) { - usage(argv[0]); - } - - g = yajl_gen_alloc(&conf, NULL); - - /* ok. open file. let's read and parse */ - hand = yajl_alloc(&callbacks, &cfg, NULL, (void *) g); - - while (!done) { - rd = fread((void *) fileData, 1, sizeof(fileData) - 1, stdin); - - if (rd == 0) { - if (!feof(stdin)) { - fprintf(stderr, "error on file read.\n"); - retval = 1; - break; - } - done = 1; - } - fileData[rd] = 0; - - if (done) - /* parse any remaining buffered data */ - stat = yajl_parse_complete(hand); - else - /* read file data, pass to parser */ - stat = yajl_parse(hand, fileData, rd); - - if (stat != yajl_status_ok && - stat != yajl_status_insufficient_data) - { - unsigned char * str = yajl_get_error(hand, 1, fileData, rd); - fprintf(stderr, "%s", (const char *) str); - yajl_free_error(hand, str); - retval = 1; - break; - } else { - const unsigned char * buf; - unsigned int len; - yajl_gen_get_buf(g, &buf, &len); - fwrite(buf, 1, len, stdout); - yajl_gen_clear(g); - } - } - - yajl_gen_free(g); - yajl_free(hand); - - return retval; -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/CMakeLists.txt b/src/extThree20JSON/Vendors/YAJL/yajl/src/CMakeLists.txt deleted file mode 100755 index 4472157ecc..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/CMakeLists.txt +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2010, Lloyd Hilaiel. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# 3. Neither the name of Lloyd Hilaiel nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -SET (SRCS yajl.c yajl_lex.c yajl_parser.c yajl_buf.c - yajl_encode.c yajl_gen.c yajl_alloc.c - yajl_version.c -) -SET (HDRS yajl_parser.h yajl_lex.h yajl_buf.h yajl_encode.h yajl_alloc.h) -SET (PUB_HDRS api/yajl_parse.h api/yajl_gen.h api/yajl_common.h) - -# useful when fixing lexer bugs. -#ADD_DEFINITIONS(-DYAJL_LEXER_DEBUG) - -# Ensure defined when building YAJL (as opposed to using it from -# another project). Used to ensure correct function export when -# building win32 DLL. -ADD_DEFINITIONS(-DYAJL_BUILD) - -# set up some paths -SET (libDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) -SET (incDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include/yajl) - -# set the output path for libraries -SET(LIBRARY_OUTPUT_PATH ${libDir}) - -ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS}) - -ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS}) - -#### setup shared library version number -SET_TARGET_PROPERTIES(yajl PROPERTIES - DEFINE_SYMBOL YAJL_SHARED - SOVERSION ${YAJL_MAJOR} - VERSION ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO}) - -#### build up an sdk as a post build step - -# create some directories -FILE(MAKE_DIRECTORY ${libDir}) -FILE(MAKE_DIRECTORY ${incDir}) - -# generate build-time source -CONFIGURE_FILE(api/yajl_version.h.cmake ${incDir}/yajl_version.h) - -# copy public headers to output directory -FOREACH (header ${PUB_HDRS}) - SET (header ${CMAKE_CURRENT_SOURCE_DIR}/${header}) - - EXEC_PROGRAM(${CMAKE_COMMAND} ARGS -E copy_if_different ${header} ${incDir}) - - ADD_CUSTOM_COMMAND(TARGET yajl_s POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${header} ${incDir}) -ENDFOREACH (header ${PUB_HDRS}) - -INCLUDE_DIRECTORIES(${incDir}/..) - -IF(NOT WIN32) - # at build time you may specify the cmake variable LIB_SUFFIX to handle - # 64-bit systems which use 'lib64' - INSTALL(TARGETS yajl LIBRARY DESTINATION lib${LIB_SUFFIX}) - INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX}) - INSTALL(DIRECTORY api/ DESTINATION include/yajl) -ENDIF() diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/YAJL.dxy b/src/extThree20JSON/Vendors/YAJL/yajl/src/YAJL.dxy deleted file mode 100755 index 680eb43f0c..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/YAJL.dxy +++ /dev/null @@ -1,1258 +0,0 @@ -# Doxyfile 1.5.2 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file that -# follow. The default is UTF-8 which is also the encoding used for all text before -# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into -# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of -# possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = YAJL - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @YAJL_VERSION@ - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = yajl-@YAJL_VERSION@/share - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, -# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, -# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, -# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = YES - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = NO - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning - -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = ../src/yajl ../src/api - -# This tag can be used to specify the character encoding of the source files that -# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default -# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. -# See http://www.gnu.org/software/libiconv for the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py - -FILE_PATTERNS = *.h - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the output. -# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, -# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = doc/yajl-@YAJL_VERSION@ - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = YES - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to -# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to -# specify the directory where the mscgen tool resides. If left empty the tool is assumed to -# be found in the default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected -# functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen will always -# show the root nodes and its direct children regardless of this setting. - -DOT_GRAPH_MAX_NODES = 50 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_common.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_common.h deleted file mode 100755 index a227debbd1..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_common.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __YAJL_COMMON_H__ -#define __YAJL_COMMON_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#define YAJL_MAX_DEPTH 128 - -/* msft dll export gunk. To build a DLL on windows, you - * must define WIN32, YAJL_SHARED, and YAJL_BUILD. To use a shared - * DLL, you must define YAJL_SHARED and WIN32 */ -#if defined(WIN32) && defined(YAJL_SHARED) -# ifdef YAJL_BUILD -# define YAJL_API __declspec(dllexport) -# else -# define YAJL_API __declspec(dllimport) -# endif -#else -# define YAJL_API -#endif - -/** pointer to a malloc function, supporting client overriding memory - * allocation routines */ -typedef void * (*yajl_malloc_func)(void *ctx, unsigned int sz); - -/** pointer to a free function, supporting client overriding memory - * allocation routines */ -typedef void (*yajl_free_func)(void *ctx, void * ptr); - -/** pointer to a realloc function which can resize an allocation. */ -typedef void * (*yajl_realloc_func)(void *ctx, void * ptr, unsigned int sz); - -/** A structure which can be passed to yajl_*_alloc routines to allow the - * client to specify memory allocation functions to be used. */ -typedef struct -{ - /** pointer to a function that can allocate uninitialized memory */ - yajl_malloc_func malloc; - /** pointer to a function that can resize memory allocations */ - yajl_realloc_func realloc; - /** pointer to a function that can free memory allocated using - * reallocFunction or mallocFunction */ - yajl_free_func free; - /** a context pointer that will be passed to above allocation routines */ - void * ctx; -} yajl_alloc_funcs; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_gen.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_gen.h deleted file mode 100755 index 15504ca056..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_gen.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * \file yajl_gen.h - * Interface to YAJL's JSON generation facilities. - */ - -#include - -#ifndef __YAJL_GEN_H__ -#define __YAJL_GEN_H__ - -#ifdef __cplusplus -extern "C" { -#endif - /** generator status codes */ - typedef enum { - /** no error */ - yajl_gen_status_ok = 0, - /** at a point where a map key is generated, a function other than - * yajl_gen_string was called */ - yajl_gen_keys_must_be_strings, - /** YAJL's maximum generation depth was exceeded. see - * YAJL_MAX_DEPTH */ - yajl_max_depth_exceeded, - /** A generator function (yajl_gen_XXX) was called while in an error - * state */ - yajl_gen_in_error_state, - /** A complete JSON document has been generated */ - yajl_gen_generation_complete, - /** yajl_gen_double was passed an invalid floating point value - * (infinity or NaN). */ - yajl_gen_invalid_number, - /** A print callback was passed in, so there is no internal - * buffer to get from */ - yajl_gen_no_buf - } yajl_gen_status; - - /** an opaque handle to a generator */ - typedef struct yajl_gen_t * yajl_gen; - - /** a callback used for "printing" the results. */ - typedef void (*yajl_print_t)(void * ctx, - const char * str, - unsigned int len); - - /** configuration structure for the generator */ - typedef struct { - /** generate indented (beautiful) output */ - unsigned int beautify; - /** an opportunity to define an indent string. such as \\t or - * some number of spaces. default is four spaces ' '. This - * member is only relevant when beautify is true */ - const char * indentString; - } yajl_gen_config; - - /** allocate a generator handle - * \param config a pointer to a structure containing parameters which - * configure the behavior of the json generator - * \param allocFuncs an optional pointer to a structure which allows - * the client to overide the memory allocation - * used by yajl. May be NULL, in which case - * malloc/free/realloc will be used. - * - * \returns an allocated handle on success, NULL on failure (bad params) - */ - YAJL_API yajl_gen yajl_gen_alloc(const yajl_gen_config * config, - const yajl_alloc_funcs * allocFuncs); - - /** allocate a generator handle that will print to the specified - * callback rather than storing the results in an internal buffer. - * \param callback a pointer to a printer function. May be NULL - * in which case, the results will be store in an - * internal buffer. - * \param config a pointer to a structure containing parameters - * which configure the behavior of the json - * generator. - * \param allocFuncs an optional pointer to a structure which allows - * the client to overide the memory allocation - * used by yajl. May be NULL, in which case - * malloc/free/realloc will be used. - * \param ctx a context pointer that will be passed to the - * printer callback. - * - * \returns an allocated handle on success, NULL on failure (bad params) - */ - YAJL_API yajl_gen yajl_gen_alloc2(const yajl_print_t callback, - const yajl_gen_config * config, - const yajl_alloc_funcs * allocFuncs, - void * ctx); - - /** free a generator handle */ - YAJL_API void yajl_gen_free(yajl_gen handle); - - YAJL_API yajl_gen_status yajl_gen_integer(yajl_gen hand, long int number); - /** generate a floating point number. number may not be infinity or - * NaN, as these have no representation in JSON. In these cases the - * generator will return 'yajl_gen_invalid_number' */ - YAJL_API yajl_gen_status yajl_gen_double(yajl_gen hand, double number); - YAJL_API yajl_gen_status yajl_gen_number(yajl_gen hand, - const char * num, - unsigned int len); - YAJL_API yajl_gen_status yajl_gen_string(yajl_gen hand, - const unsigned char * str, - unsigned int len); - YAJL_API yajl_gen_status yajl_gen_null(yajl_gen hand); - YAJL_API yajl_gen_status yajl_gen_bool(yajl_gen hand, int boolean); - YAJL_API yajl_gen_status yajl_gen_map_open(yajl_gen hand); - YAJL_API yajl_gen_status yajl_gen_map_close(yajl_gen hand); - YAJL_API yajl_gen_status yajl_gen_array_open(yajl_gen hand); - YAJL_API yajl_gen_status yajl_gen_array_close(yajl_gen hand); - - /** access the null terminated generator buffer. If incrementally - * outputing JSON, one should call yajl_gen_clear to clear the - * buffer. This allows stream generation. */ - YAJL_API yajl_gen_status yajl_gen_get_buf(yajl_gen hand, - const unsigned char ** buf, - unsigned int * len); - - /** clear yajl's output buffer, but maintain all internal generation - * state. This function will not "reset" the generator state, and is - * intended to enable incremental JSON outputing. */ - YAJL_API void yajl_gen_clear(yajl_gen hand); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_parse.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_parse.h deleted file mode 100755 index 13920e38af..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_parse.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * \file yajl_parse.h - * Interface to YAJL's JSON parsing facilities. - */ - -#include - -#ifndef __YAJL_PARSE_H__ -#define __YAJL_PARSE_H__ - -#ifdef __cplusplus -extern "C" { -#endif - /** error codes returned from this interface */ - typedef enum { - /** no error was encountered */ - yajl_status_ok, - /** a client callback returned zero, stopping the parse */ - yajl_status_client_canceled, - /** The parse cannot yet complete because more json input text - * is required, call yajl_parse with the next buffer of input text. - * (pertinent only when stream parsing) */ - yajl_status_insufficient_data, - /** An error occured during the parse. Call yajl_get_error for - * more information about the encountered error */ - yajl_status_error - } yajl_status; - - /** attain a human readable, english, string for an error */ - YAJL_API const char * yajl_status_to_string(yajl_status code); - - /** an opaque handle to a parser */ - typedef struct yajl_handle_t * yajl_handle; - - /** yajl is an event driven parser. this means as json elements are - * parsed, you are called back to do something with the data. The - * functions in this table indicate the various events for which - * you will be called back. Each callback accepts a "context" - * pointer, this is a void * that is passed into the yajl_parse - * function which the client code may use to pass around context. - * - * All callbacks return an integer. If non-zero, the parse will - * continue. If zero, the parse will be canceled and - * yajl_status_client_canceled will be returned from the parse. - * - * Note about handling of numbers: - * yajl will only convert numbers that can be represented in a double - * or a long int. All other numbers will be passed to the client - * in string form using the yajl_number callback. Furthermore, if - * yajl_number is not NULL, it will always be used to return numbers, - * that is yajl_integer and yajl_double will be ignored. If - * yajl_number is NULL but one of yajl_integer or yajl_double are - * defined, parsing of a number larger than is representable - * in a double or long int will result in a parse error. - */ - typedef struct { - int (* yajl_null)(void * ctx); - int (* yajl_boolean)(void * ctx, int boolVal); - int (* yajl_integer)(void * ctx, long integerVal); - int (* yajl_double)(void * ctx, double doubleVal); - /** A callback which passes the string representation of the number - * back to the client. Will be used for all numbers when present */ - int (* yajl_number)(void * ctx, const char * numberVal, - unsigned int numberLen); - - /** strings are returned as pointers into the JSON text when, - * possible, as a result, they are _not_ null padded */ - int (* yajl_string)(void * ctx, const unsigned char * stringVal, - unsigned int stringLen); - - int (* yajl_start_map)(void * ctx); - int (* yajl_map_key)(void * ctx, const unsigned char * key, - unsigned int stringLen); - int (* yajl_end_map)(void * ctx); - - int (* yajl_start_array)(void * ctx); - int (* yajl_end_array)(void * ctx); - } yajl_callbacks; - - /** configuration structure for the generator */ - typedef struct { - /** if nonzero, javascript style comments will be allowed in - * the json input, both slash star and slash slash */ - unsigned int allowComments; - /** if nonzero, invalid UTF8 strings will cause a parse - * error */ - unsigned int checkUTF8; - } yajl_parser_config; - - /** allocate a parser handle - * \param callbacks a yajl callbacks structure specifying the - * functions to call when different JSON entities - * are encountered in the input text. May be NULL, - * which is only useful for validation. - * \param config configuration parameters for the parse. - * \param ctx a context pointer that will be passed to callbacks. - */ - YAJL_API yajl_handle yajl_alloc(const yajl_callbacks * callbacks, - const yajl_parser_config * config, - const yajl_alloc_funcs * allocFuncs, - void * ctx); - - /** free a parser handle */ - YAJL_API void yajl_free(yajl_handle handle); - - /** Parse some json! - * \param hand - a handle to the json parser allocated with yajl_alloc - * \param jsonText - a pointer to the UTF8 json text to be parsed - * \param jsonTextLength - the length, in bytes, of input text - */ - YAJL_API yajl_status yajl_parse(yajl_handle hand, - const unsigned char * jsonText, - unsigned int jsonTextLength); - - /** Parse any remaining buffered json. - * Since yajl is a stream-based parser, without an explicit end of - * input, yajl sometimes can't decide if content at the end of the - * stream is valid or not. For example, if "1" has been fed in, - * yajl can't know whether another digit is next or some character - * that would terminate the integer token. - * - * \param hand - a handle to the json parser allocated with yajl_alloc - */ - YAJL_API yajl_status yajl_parse_complete(yajl_handle hand); - - /** get an error string describing the state of the - * parse. - * - * If verbose is non-zero, the message will include the JSON - * text where the error occured, along with an arrow pointing to - * the specific char. - * - * \returns A dynamically allocated string will be returned which should - * be freed with yajl_free_error - */ - YAJL_API unsigned char * yajl_get_error(yajl_handle hand, int verbose, - const unsigned char * jsonText, - unsigned int jsonTextLength); - - /** - * get the amount of data consumed from the last chunk passed to YAJL. - * - * In the case of a successful parse this can help you understand if - * the entire buffer was consumed (which will allow you to handle - * "junk at end of input". - * - * In the event an error is encountered during parsing, this function - * affords the client a way to get the offset into the most recent - * chunk where the error occured. 0 will be returned if no error - * was encountered. - */ - YAJL_API unsigned int yajl_get_bytes_consumed(yajl_handle hand); - - /** free an error returned from yajl_get_error */ - YAJL_API void yajl_free_error(yajl_handle hand, unsigned char * str); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_version.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_version.h deleted file mode 100755 index 0bae087b68..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_version.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef YAJL_VERSION_H_ -#define YAJL_VERSION_H_ - -#include - -#define YAJL_MAJOR 1 -#define YAJL_MINOR 0 -#define YAJL_MICRO 11 - -#define YAJL_VERSION ((YAJL_MAJOR * 10000) + (YAJL_MINOR * 100) + YAJL_MICRO) - -#ifdef __cplusplus -extern "C" { -#endif - -extern int YAJL_API yajl_version(void); - -#ifdef __cplusplus -} -#endif - -#endif /* YAJL_VERSION_H_ */ - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_version.h.cmake b/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_version.h.cmake deleted file mode 100755 index 4262ff71f9..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/api/yajl_version.h.cmake +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef YAJL_VERSION_H_ -#define YAJL_VERSION_H_ - -#include - -#define YAJL_MAJOR ${YAJL_MAJOR} -#define YAJL_MINOR ${YAJL_MINOR} -#define YAJL_MICRO ${YAJL_MICRO} - -#define YAJL_VERSION ((YAJL_MAJOR * 10000) + (YAJL_MINOR * 100) + YAJL_MICRO) - -#ifdef __cplusplus -extern "C" { -#endif - -extern int YAJL_API yajl_version(void); - -#ifdef __cplusplus -} -#endif - -#endif /* YAJL_VERSION_H_ */ - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl deleted file mode 100755 index f3a1f213bb..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl +++ /dev/null @@ -1,196 +0,0 @@ -/*! - \mainpage Yet Another JSON Library (YAJL) - \author Lloyd Hilaiel - \date 2010 - -Yet Another JSON Library (YAJL) is a small event-driven (SAX-style) -JSON parser written in ANSI C, and a small validating JSON -generator. YAJL is released under the BSD license. - -\section features Features - - -# Stream (incremental) parsing and generation of JSON - -# ANSI C - -# Human readable error messages with context - -# tiny - -# event driven - -# support for generating "beautified" JSON - -\section usage Usage - -The following code sample is a complete JSON "reformating" program. It -demonstrates how to perform stream parsing and generation. - -\code -#include -#include - -#include -#include -#include - -static int reformat_null(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_null(g); - return 1; -} - -static int reformat_boolean(void * ctx, int boolean) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_bool(g, boolean); - return 1; -} - -static int reformat_number(void * ctx, const char * s, unsigned int l) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_number(g, s, l); - return 1; -} - -static int reformat_string(void * ctx, const unsigned char * stringVal, - unsigned int stringLen) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_string(g, stringVal, stringLen); - return 1; -} - -static int reformat_map_key(void * ctx, const unsigned char * stringVal, - unsigned int stringLen) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_string(g, stringVal, stringLen); - return 1; -} - -static int reformat_start_map(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_map_open(g); - return 1; -} - - -static int reformat_end_map(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_map_close(g); - return 1; -} - -static int reformat_start_array(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_array_open(g); - return 1; -} - -static int reformat_end_array(void * ctx) -{ - yajl_gen g = (yajl_gen) ctx; - yajl_gen_array_close(g); - return 1; -} - -static yajl_callbacks callbacks = { - reformat_null, - reformat_boolean, - NULL, - NULL, - reformat_number, - reformat_string, - reformat_start_map, - reformat_map_key, - reformat_end_map, - reformat_start_array, - reformat_end_array -}; - -static void -usage(const char * progname) -{ - fprintf(stderr, "usage: %s \n" - " -m minimize json rather than beautify (default)\n" - " -u allow invalid UTF8 inside strings during parsing\n", - progname); - exit(1); - -} - -int -main(int argc, char ** argv) -{ - yajl_handle hand; - static unsigned char fileData[65536]; - /* generator config */ - yajl_gen_config conf = { 1, " " }; - yajl_gen g; - yajl_status stat; - size_t rd; - /* allow comments */ - yajl_parser_config cfg = { 1, 1 }; - int done = 0; - - /* check arguments. We expect exactly one! */ - if (argc == 2) { - if (!strcmp("-m", argv[1])) { - conf.beautify = 0; - - } else if (!strcmp("-u", argv[1])) { - cfg.checkUTF8 = 0; - } else { - usage(argv[0]); - } - } else if (argc != 1) { - usage(argv[0]); - } - - g = yajl_gen_alloc(&conf, NULL); - - /* ok. open file. let's read and parse */ - hand = yajl_alloc(&callbacks, &cfg, NULL, (void *) g); - - while (!done) { - rd = fread((void *) fileData, 1, sizeof(fileData) - 1, stdin); - - if (rd == 0) { - if (!feof(stdin)) { - fprintf(stderr, "error on file read.\n"); - break; - } - done = 1; - } - fileData[rd] = 0; - - if (done) - /* parse any remaining buffered data */ - stat = yajl_parse_complete(hand); - else - /* read file data, pass to parser */ - stat = yajl_parse(hand, fileData, rd); - - if (stat != yajl_status_ok && - stat != yajl_status_insufficient_data) - { - unsigned char * str = yajl_get_error(hand, 1, fileData, rd); - fprintf(stderr, (const char *) str); - yajl_free_error(hand, str); - } else { - const unsigned char * buf; - unsigned int len; - yajl_gen_get_buf(g, &buf, &len); - fwrite(buf, 1, len, stdout); - yajl_gen_clear(g); - } - } - - yajl_gen_free(g); - yajl_free(hand); - - return 0; -} -\endcode -*/ diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl.c b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl.c deleted file mode 100755 index 9cabbd5bdc..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "extThree20JSON/yajl_parse.h" -#include "extThree20JSON/private/yajl_lex.h" -#include "extThree20JSON/private/yajl_parser.h" -#include "extThree20JSON/private/yajl_alloc.h" - -#include -#include -#include - -const char * -yajl_status_to_string(yajl_status stat) -{ - const char * statStr = "unknown"; - switch (stat) { - case yajl_status_ok: - statStr = "ok, no error"; - break; - case yajl_status_client_canceled: - statStr = "client canceled parse"; - break; - case yajl_status_insufficient_data: - statStr = "eof was met before the parse could complete"; - break; - case yajl_status_error: - statStr = "parse error"; - break; - } - return statStr; -} - -yajl_handle -yajl_alloc(const yajl_callbacks * callbacks, - const yajl_parser_config * config, - const yajl_alloc_funcs * afs, - void * ctx) -{ - unsigned int allowComments = 0; - unsigned int validateUTF8 = 0; - yajl_handle hand = NULL; - yajl_alloc_funcs afsBuffer; - - /* first order of business is to set up memory allocation routines */ - if (afs != NULL) { - if (afs->malloc == NULL || afs->realloc == NULL || afs->free == NULL) - { - return NULL; - } - } else { - yajl_set_default_alloc_funcs(&afsBuffer); - afs = &afsBuffer; - } - - hand = (yajl_handle) YA_MALLOC(afs, sizeof(struct yajl_handle_t)); - - /* copy in pointers to allocation routines */ - memcpy((void *) &(hand->alloc), (void *) afs, sizeof(yajl_alloc_funcs)); - - if (config != NULL) { - allowComments = config->allowComments; - validateUTF8 = config->checkUTF8; - } - - hand->callbacks = callbacks; - hand->ctx = ctx; - hand->lexer = yajl_lex_alloc(&(hand->alloc), allowComments, validateUTF8); - hand->bytesConsumed = 0; - hand->decodeBuf = yajl_buf_alloc(&(hand->alloc)); - yajl_bs_init(hand->stateStack, &(hand->alloc)); - - yajl_bs_push(hand->stateStack, yajl_state_start); - - return hand; -} - -void -yajl_free(yajl_handle handle) -{ - yajl_bs_free(handle->stateStack); - yajl_buf_free(handle->decodeBuf); - yajl_lex_free(handle->lexer); - YA_FREE(&(handle->alloc), handle); -} - -yajl_status -yajl_parse(yajl_handle hand, const unsigned char * jsonText, - unsigned int jsonTextLen) -{ - yajl_status status; - status = yajl_do_parse(hand, jsonText, jsonTextLen); - return status; -} - -yajl_status -yajl_parse_complete(yajl_handle hand) -{ - /* The particular case we want to handle is a trailing number. - * Further input consisting of digits could cause our interpretation - * of the number to change (buffered "1" but "2" comes in). - * A very simple approach to this is to inject whitespace to terminate - * any number in the lex buffer. - */ - return yajl_parse(hand, (const unsigned char *)" ", 1); -} - -unsigned char * -yajl_get_error(yajl_handle hand, int verbose, - const unsigned char * jsonText, unsigned int jsonTextLen) -{ - return yajl_render_error_string(hand, jsonText, jsonTextLen, verbose); -} - -unsigned int -yajl_get_bytes_consumed(yajl_handle hand) -{ - if (!hand) return 0; - else return hand->bytesConsumed; -} - - -void -yajl_free_error(yajl_handle hand, unsigned char * str) -{ - /* use memory allocation functions if set */ - YA_FREE(&(hand->alloc), str); -} - -/* XXX: add utility routines to parse from file */ diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_alloc.c b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_alloc.c deleted file mode 100755 index b8d10bc066..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_alloc.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * \file yajl_alloc.h - * default memory allocation routines for yajl which use malloc/realloc and - * free - */ - -#include "extThree20JSON/private/yajl_alloc.h" -#include - -static void * yajl_internal_malloc(void *ctx, unsigned int sz) -{ - return malloc(sz); -} - -static void * yajl_internal_realloc(void *ctx, void * previous, - unsigned int sz) -{ - return realloc(previous, sz); -} - -static void yajl_internal_free(void *ctx, void * ptr) -{ - free(ptr); -} - -void yajl_set_default_alloc_funcs(yajl_alloc_funcs * yaf) -{ - yaf->malloc = yajl_internal_malloc; - yaf->free = yajl_internal_free; - yaf->realloc = yajl_internal_realloc; - yaf->ctx = NULL; -} - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_alloc.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_alloc.h deleted file mode 100755 index a98f8abcea..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_alloc.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * \file yajl_alloc.h - * default memory allocation routines for yajl which use malloc/realloc and - * free - */ - -#ifndef __YAJL_ALLOC_H__ -#define __YAJL_ALLOC_H__ - -#include "extThree20JSON/yajl_common.h" - -#define YA_MALLOC(afs, sz) (afs)->malloc((afs)->ctx, (sz)) -#define YA_FREE(afs, ptr) (afs)->free((afs)->ctx, (ptr)) -#define YA_REALLOC(afs, ptr, sz) (afs)->realloc((afs)->ctx, (ptr), (sz)) - -void yajl_set_default_alloc_funcs(yajl_alloc_funcs * yaf); - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_buf.c b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_buf.c deleted file mode 100755 index 151f348274..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_buf.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "extThree20JSON/private/yajl_buf.h" - -#include -#include -#include - -#define YAJL_BUF_INIT_SIZE 2048 - -struct yajl_buf_t { - unsigned int len; - unsigned int used; - unsigned char * data; - yajl_alloc_funcs * alloc; -}; - -static -void yajl_buf_ensure_available(yajl_buf buf, unsigned int want) -{ - unsigned int need; - - assert(buf != NULL); - - /* first call */ - if (buf->data == NULL) { - buf->len = YAJL_BUF_INIT_SIZE; - buf->data = (unsigned char *) YA_MALLOC(buf->alloc, buf->len); - buf->data[0] = 0; - } - - need = buf->len; - - while (want >= (need - buf->used)) need <<= 1; - - if (need != buf->len) { - buf->data = (unsigned char *) YA_REALLOC(buf->alloc, buf->data, need); - buf->len = need; - } -} - -yajl_buf yajl_buf_alloc(yajl_alloc_funcs * alloc) -{ - yajl_buf b = YA_MALLOC(alloc, sizeof(struct yajl_buf_t)); - memset((void *) b, 0, sizeof(struct yajl_buf_t)); - b->alloc = alloc; - return b; -} - -void yajl_buf_free(yajl_buf buf) -{ - assert(buf != NULL); - if (buf->data) YA_FREE(buf->alloc, buf->data); - YA_FREE(buf->alloc, buf); -} - -void yajl_buf_append(yajl_buf buf, const void * data, unsigned int len) -{ - yajl_buf_ensure_available(buf, len); - if (len > 0) { - assert(data != NULL); - memcpy(buf->data + buf->used, data, len); - buf->used += len; - buf->data[buf->used] = 0; - } -} - -void yajl_buf_clear(yajl_buf buf) -{ - buf->used = 0; - if (buf->data) buf->data[buf->used] = 0; -} - -const unsigned char * yajl_buf_data(yajl_buf buf) -{ - return buf->data; -} - -unsigned int yajl_buf_len(yajl_buf buf) -{ - return buf->used; -} - -void -yajl_buf_truncate(yajl_buf buf, unsigned int len) -{ - assert(len <= buf->used); - buf->used = len; -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_buf.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_buf.h deleted file mode 100755 index 4ded84e775..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_buf.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __YAJL_BUF_H__ -#define __YAJL_BUF_H__ - -#include "extThree20JSON/yajl_common.h" -#include "extThree20JSON/private/yajl_alloc.h" - -/* - * Implementation/performance notes. If this were moved to a header - * only implementation using #define's where possible we might be - * able to sqeeze a little performance out of the guy by killing function - * call overhead. YMMV. - */ - -/** - * yajl_buf is a buffer with exponential growth. the buffer ensures that - * you are always null padded. - */ -typedef struct yajl_buf_t * yajl_buf; - -/* allocate a new buffer */ -yajl_buf yajl_buf_alloc(yajl_alloc_funcs * alloc); - -/* free the buffer */ -void yajl_buf_free(yajl_buf buf); - -/* append a number of bytes to the buffer */ -void yajl_buf_append(yajl_buf buf, const void * data, unsigned int len); - -/* empty the buffer */ -void yajl_buf_clear(yajl_buf buf); - -/* get a pointer to the beginning of the buffer */ -const unsigned char * yajl_buf_data(yajl_buf buf); - -/* get the length of the buffer */ -unsigned int yajl_buf_len(yajl_buf buf); - -/* truncate the buffer */ -void yajl_buf_truncate(yajl_buf buf, unsigned int len); - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_bytestack.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_bytestack.h deleted file mode 100755 index 82b1a88e96..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_bytestack.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * A header only implementation of a simple stack of bytes, used in YAJL - * to maintain parse state. - */ - -#ifndef __YAJL_BYTESTACK_H__ -#define __YAJL_BYTESTACK_H__ - -#include "extThree20JSON/yajl_common.h" - -#define YAJL_BS_INC 128 - -typedef struct yajl_bytestack_t -{ - unsigned char * stack; - unsigned int size; - unsigned int used; - yajl_alloc_funcs * yaf; -} yajl_bytestack; - -/* initialize a bytestack */ -#define yajl_bs_init(obs, _yaf) { \ - (obs).stack = NULL; \ - (obs).size = 0; \ - (obs).used = 0; \ - (obs).yaf = (_yaf); \ - } \ - - -/* initialize a bytestack */ -#define yajl_bs_free(obs) \ - if ((obs).stack) (obs).yaf->free((obs).yaf->ctx, (obs).stack); - -#define yajl_bs_current(obs) \ - (assert((obs).used > 0), (obs).stack[(obs).used - 1]) - -#define yajl_bs_push(obs, byte) { \ - if (((obs).size - (obs).used) == 0) { \ - (obs).size += YAJL_BS_INC; \ - (obs).stack = (obs).yaf->realloc((obs).yaf->ctx,\ - (void *) (obs).stack, (obs).size);\ - } \ - (obs).stack[((obs).used)++] = (byte); \ -} - -/* removes the top item of the stack, returns nothing */ -#define yajl_bs_pop(obs) { ((obs).used)--; } - -#define yajl_bs_set(obs, byte) \ - (obs).stack[((obs).used) - 1] = (byte); - - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_encode.c b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_encode.c deleted file mode 100755 index c36404b954..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_encode.c +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "extThree20JSON/private/yajl_encode.h" - -#include -#include -#include -#include - -static void CharToHex(unsigned char c, char * hexBuf) -{ - const char * hexchar = "0123456789ABCDEF"; - hexBuf[0] = hexchar[c >> 4]; - hexBuf[1] = hexchar[c & 0x0F]; -} - -void -yajl_string_encode(yajl_buf buf, const unsigned char * str, - unsigned int len) -{ - yajl_string_encode2((const yajl_print_t) &yajl_buf_append, buf, str, len); -} - -void -yajl_string_encode2(const yajl_print_t print, - void * ctx, - const unsigned char * str, - unsigned int len) -{ - unsigned int beg = 0; - unsigned int end = 0; - char hexBuf[7]; - hexBuf[0] = '\\'; hexBuf[1] = 'u'; hexBuf[2] = '0'; hexBuf[3] = '0'; - hexBuf[6] = 0; - - while (end < len) { - const char * escaped = NULL; - switch (str[end]) { - case '\r': escaped = "\\r"; break; - case '\n': escaped = "\\n"; break; - case '\\': escaped = "\\\\"; break; - /* case '/': escaped = "\\/"; break; */ - case '"': escaped = "\\\""; break; - case '\f': escaped = "\\f"; break; - case '\b': escaped = "\\b"; break; - case '\t': escaped = "\\t"; break; - default: - if ((unsigned char) str[end] < 32) { - CharToHex(str[end], hexBuf + 4); - escaped = hexBuf; - } - break; - } - if (escaped != NULL) { - print(ctx, (const char *) (str + beg), end - beg); - print(ctx, escaped, strlen(escaped)); - beg = ++end; - } else { - ++end; - } - } - print(ctx, (const char *) (str + beg), end - beg); -} - -static void hexToDigit(unsigned int * val, const unsigned char * hex) -{ - unsigned int i; - for (i=0;i<4;i++) { - unsigned char c = hex[i]; - if (c >= 'A') c = (c & ~0x20) - 7; - c -= '0'; - assert(!(c & 0xF0)); - *val = (*val << 4) | c; - } -} - -static void Utf32toUtf8(unsigned int codepoint, char * utf8Buf) -{ - if (codepoint < 0x80) { - utf8Buf[0] = (char) codepoint; - utf8Buf[1] = 0; - } else if (codepoint < 0x0800) { - utf8Buf[0] = (char) ((codepoint >> 6) | 0xC0); - utf8Buf[1] = (char) ((codepoint & 0x3F) | 0x80); - utf8Buf[2] = 0; - } else if (codepoint < 0x10000) { - utf8Buf[0] = (char) ((codepoint >> 12) | 0xE0); - utf8Buf[1] = (char) (((codepoint >> 6) & 0x3F) | 0x80); - utf8Buf[2] = (char) ((codepoint & 0x3F) | 0x80); - utf8Buf[3] = 0; - } else if (codepoint < 0x200000) { - utf8Buf[0] =(char)((codepoint >> 18) | 0xF0); - utf8Buf[1] =(char)(((codepoint >> 12) & 0x3F) | 0x80); - utf8Buf[2] =(char)(((codepoint >> 6) & 0x3F) | 0x80); - utf8Buf[3] =(char)((codepoint & 0x3F) | 0x80); - utf8Buf[4] = 0; - } else { - utf8Buf[0] = '?'; - utf8Buf[1] = 0; - } -} - -void yajl_string_decode(yajl_buf buf, const unsigned char * str, - unsigned int len) -{ - unsigned int beg = 0; - unsigned int end = 0; - - while (end < len) { - if (str[end] == '\\') { - char utf8Buf[5]; - const char * unescaped = "?"; - yajl_buf_append(buf, str + beg, end - beg); - switch (str[++end]) { - case 'r': unescaped = "\r"; break; - case 'n': unescaped = "\n"; break; - case '\\': unescaped = "\\"; break; - case '/': unescaped = "/"; break; - case '"': unescaped = "\""; break; - case 'f': unescaped = "\f"; break; - case 'b': unescaped = "\b"; break; - case 't': unescaped = "\t"; break; - case 'u': { - unsigned int codepoint = 0; - hexToDigit(&codepoint, str + ++end); - end+=3; - /* check if this is a surrogate */ - if ((codepoint & 0xFC00) == 0xD800) { - end++; - if (str[end] == '\\' && str[end + 1] == 'u') { - unsigned int surrogate = 0; - hexToDigit(&surrogate, str + end + 2); - codepoint = - (((codepoint & 0x3F) << 10) | - ((((codepoint >> 6) & 0xF) + 1) << 16) | - (surrogate & 0x3FF)); - end += 5; - } else { - unescaped = "?"; - break; - } - } - - Utf32toUtf8(codepoint, utf8Buf); - unescaped = utf8Buf; - break; - } - default: - assert("this should never happen" == NULL); - } - yajl_buf_append(buf, unescaped, strlen(unescaped)); - beg = ++end; - } else { - end++; - } - } - yajl_buf_append(buf, str + beg, end - beg); -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_encode.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_encode.h deleted file mode 100755 index d59c782268..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_encode.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __YAJL_ENCODE_H__ -#define __YAJL_ENCODE_H__ - -#include "extThree20JSON/private/yajl_buf.h" -#include "extThree20JSON/yajl_gen.h" - -void yajl_string_encode2(const yajl_print_t printer, - void * ctx, - const unsigned char * str, - unsigned int length); - -void yajl_string_encode(yajl_buf buf, const unsigned char * str, - unsigned int length); - -void yajl_string_decode(yajl_buf buf, const unsigned char * str, - unsigned int length); - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_gen.c b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_gen.c deleted file mode 100755 index 400ce99ab5..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_gen.c +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "extThree20JSON/yajl_gen.h" -#include "extThree20JSON/private/yajl_buf.h" -#include "extThree20JSON/private/yajl_encode.h" - -#include -#include -#include -#include - -typedef enum { - yajl_gen_start, - yajl_gen_map_start, - yajl_gen_map_key, - yajl_gen_map_val, - yajl_gen_array_start, - yajl_gen_in_array, - yajl_gen_complete, - yajl_gen_error -} yajl_gen_state; - -struct yajl_gen_t -{ - unsigned int depth; - unsigned int pretty; - const char * indentString; - yajl_gen_state state[YAJL_MAX_DEPTH]; - yajl_print_t print; - void * ctx; /* yajl_buf */ - /* memory allocation routines */ - yajl_alloc_funcs alloc; -}; - -yajl_gen -yajl_gen_alloc(const yajl_gen_config * config, - const yajl_alloc_funcs * afs) -{ - return yajl_gen_alloc2(NULL, config, afs, NULL); -} - -yajl_gen -yajl_gen_alloc2(const yajl_print_t callback, - const yajl_gen_config * config, - const yajl_alloc_funcs * afs, - void * ctx) -{ - yajl_gen g = NULL; - yajl_alloc_funcs afsBuffer; - - /* first order of business is to set up memory allocation routines */ - if (afs != NULL) { - if (afs->malloc == NULL || afs->realloc == NULL || afs->free == NULL) - { - return NULL; - } - } else { - yajl_set_default_alloc_funcs(&afsBuffer); - afs = &afsBuffer; - } - - g = (yajl_gen) YA_MALLOC(afs, sizeof(struct yajl_gen_t)); - memset((void *) g, 0, sizeof(struct yajl_gen_t)); - /* copy in pointers to allocation routines */ - memcpy((void *) &(g->alloc), (void *) afs, sizeof(yajl_alloc_funcs)); - - if (config) { - g->pretty = config->beautify; - g->indentString = config->indentString ? config->indentString : " "; - } - - if (callback) { - g->print = callback; - g->ctx = ctx; - } else { - g->print = (yajl_print_t)&yajl_buf_append; - g->ctx = yajl_buf_alloc(&(g->alloc)); - } - - return g; -} - -void -yajl_gen_free(yajl_gen g) -{ - if (g->print == (yajl_print_t)&yajl_buf_append) yajl_buf_free((yajl_buf)g->ctx); - YA_FREE(&(g->alloc), g); -} - -#define INSERT_SEP \ - if (g->state[g->depth] == yajl_gen_map_key || \ - g->state[g->depth] == yajl_gen_in_array) { \ - g->print(g->ctx, ",", 1); \ - if (g->pretty) g->print(g->ctx, "\n", 1); \ - } else if (g->state[g->depth] == yajl_gen_map_val) { \ - g->print(g->ctx, ":", 1); \ - if (g->pretty) g->print(g->ctx, " ", 1); \ - } - -#define INSERT_WHITESPACE \ - if (g->pretty) { \ - if (g->state[g->depth] != yajl_gen_map_val) { \ - unsigned int _i; \ - for (_i=0;_idepth;_i++) \ - g->print(g->ctx, g->indentString, \ - strlen(g->indentString)); \ - } \ - } - -#define ENSURE_NOT_KEY \ - if (g->state[g->depth] == yajl_gen_map_key) { \ - return yajl_gen_keys_must_be_strings; \ - } \ - -/* check that we're not complete, or in error state. in a valid state - * to be generating */ -#define ENSURE_VALID_STATE \ - if (g->state[g->depth] == yajl_gen_error) { \ - return yajl_gen_in_error_state;\ - } else if (g->state[g->depth] == yajl_gen_complete) { \ - return yajl_gen_generation_complete; \ - } - -#define INCREMENT_DEPTH \ - if (++(g->depth) >= YAJL_MAX_DEPTH) return yajl_max_depth_exceeded; - -#define APPENDED_ATOM \ - switch (g->state[g->depth]) { \ - case yajl_gen_start: \ - g->state[g->depth] = yajl_gen_complete; \ - break; \ - case yajl_gen_map_start: \ - case yajl_gen_map_key: \ - g->state[g->depth] = yajl_gen_map_val; \ - break; \ - case yajl_gen_array_start: \ - g->state[g->depth] = yajl_gen_in_array; \ - break; \ - case yajl_gen_map_val: \ - g->state[g->depth] = yajl_gen_map_key; \ - break; \ - default: \ - break; \ - } \ - -#define FINAL_NEWLINE \ - if (g->pretty && g->state[g->depth] == yajl_gen_complete) \ - g->print(g->ctx, "\n", 1); - -yajl_gen_status -yajl_gen_integer(yajl_gen g, long int number) -{ - char i[32]; - ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE; - sprintf(i, "%ld", number); - g->print(g->ctx, i, strlen(i)); - APPENDED_ATOM; - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -#ifdef WIN32 -#include -#define isnan _isnan -#define isinf !_finite -#endif - -yajl_gen_status -yajl_gen_double(yajl_gen g, double number) -{ - char i[32]; - ENSURE_VALID_STATE; ENSURE_NOT_KEY; - if (isnan(number) || isinf(number)) return yajl_gen_invalid_number; - INSERT_SEP; INSERT_WHITESPACE; - sprintf(i, "%g", number); - g->print(g->ctx, i, strlen(i)); - APPENDED_ATOM; - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_number(yajl_gen g, const char * s, unsigned int l) -{ - ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE; - g->print(g->ctx, s, l); - APPENDED_ATOM; - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_string(yajl_gen g, const unsigned char * str, - unsigned int len) -{ - ENSURE_VALID_STATE; INSERT_SEP; INSERT_WHITESPACE; - g->print(g->ctx, "\"", 1); - yajl_string_encode2(g->print, g->ctx, str, len); - g->print(g->ctx, "\"", 1); - APPENDED_ATOM; - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_null(yajl_gen g) -{ - ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE; - g->print(g->ctx, "null", strlen("null")); - APPENDED_ATOM; - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_bool(yajl_gen g, int boolean) -{ - const char * val = boolean ? "true" : "false"; - - ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE; - g->print(g->ctx, val, strlen(val)); - APPENDED_ATOM; - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_map_open(yajl_gen g) -{ - ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE; - INCREMENT_DEPTH; - - g->state[g->depth] = yajl_gen_map_start; - g->print(g->ctx, "{", 1); - if (g->pretty) g->print(g->ctx, "\n", 1); - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_map_close(yajl_gen g) -{ - ENSURE_VALID_STATE; - (g->depth)--; - if (g->pretty) g->print(g->ctx, "\n", 1); - APPENDED_ATOM; - INSERT_WHITESPACE; - g->print(g->ctx, "}", 1); - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_array_open(yajl_gen g) -{ - ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE; - INCREMENT_DEPTH; - g->state[g->depth] = yajl_gen_array_start; - g->print(g->ctx, "[", 1); - if (g->pretty) g->print(g->ctx, "\n", 1); - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_array_close(yajl_gen g) -{ - ENSURE_VALID_STATE; - if (g->pretty) g->print(g->ctx, "\n", 1); - (g->depth)--; - APPENDED_ATOM; - INSERT_WHITESPACE; - g->print(g->ctx, "]", 1); - FINAL_NEWLINE; - return yajl_gen_status_ok; -} - -yajl_gen_status -yajl_gen_get_buf(yajl_gen g, const unsigned char ** buf, - unsigned int * len) -{ - if (g->print != (yajl_print_t)&yajl_buf_append) return yajl_gen_no_buf; - *buf = yajl_buf_data((yajl_buf)g->ctx); - *len = yajl_buf_len((yajl_buf)g->ctx); - return yajl_gen_status_ok; -} - -void -yajl_gen_clear(yajl_gen g) -{ - if (g->print == (yajl_print_t)&yajl_buf_append) yajl_buf_clear((yajl_buf)g->ctx); -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_lex.c b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_lex.c deleted file mode 100755 index 62d4eb70d5..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_lex.c +++ /dev/null @@ -1,737 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "extThree20JSON/private/yajl_lex.h" -#include "extThree20JSON/private/yajl_buf.h" - -#include -#include -#include -#include - -#ifdef YAJL_LEXER_DEBUG -static const char * -tokToStr(yajl_tok tok) -{ - switch (tok) { - case yajl_tok_bool: return "bool"; - case yajl_tok_colon: return "colon"; - case yajl_tok_comma: return "comma"; - case yajl_tok_eof: return "eof"; - case yajl_tok_error: return "error"; - case yajl_tok_left_brace: return "brace"; - case yajl_tok_left_bracket: return "bracket"; - case yajl_tok_null: return "null"; - case yajl_tok_integer: return "integer"; - case yajl_tok_double: return "double"; - case yajl_tok_right_brace: return "brace"; - case yajl_tok_right_bracket: return "bracket"; - case yajl_tok_string: return "string"; - case yajl_tok_string_with_escapes: return "string_with_escapes"; - } - return "unknown"; -} -#endif - -/* Impact of the stream parsing feature on the lexer: - * - * YAJL support stream parsing. That is, the ability to parse the first - * bits of a chunk of JSON before the last bits are available (still on - * the network or disk). This makes the lexer more complex. The - * responsibility of the lexer is to handle transparently the case where - * a chunk boundary falls in the middle of a token. This is - * accomplished is via a buffer and a character reading abstraction. - * - * Overview of implementation - * - * When we lex to end of input string before end of token is hit, we - * copy all of the input text composing the token into our lexBuf. - * - * Every time we read a character, we do so through the readChar function. - * readChar's responsibility is to handle pulling all chars from the buffer - * before pulling chars from input text - */ - -struct yajl_lexer_t { - /* the overal line and char offset into the data */ - unsigned int lineOff; - unsigned int charOff; - - /* error */ - yajl_lex_error error; - - /* a input buffer to handle the case where a token is spread over - * multiple chunks */ - yajl_buf buf; - - /* in the case where we have data in the lexBuf, bufOff holds - * the current offset into the lexBuf. */ - unsigned int bufOff; - - /* are we using the lex buf? */ - unsigned int bufInUse; - - /* shall we allow comments? */ - unsigned int allowComments; - - /* shall we validate utf8 inside strings? */ - unsigned int validateUTF8; - - yajl_alloc_funcs * alloc; -}; - -#define readChar(lxr, txt, off) \ - (((lxr)->bufInUse && yajl_buf_len((lxr)->buf) && lxr->bufOff < yajl_buf_len((lxr)->buf)) ? \ - (*((const unsigned char *) yajl_buf_data((lxr)->buf) + ((lxr)->bufOff)++)) : \ - ((txt)[(*(off))++])) - -#define unreadChar(lxr, off) ((*(off) > 0) ? (*(off))-- : ((lxr)->bufOff--)) - -yajl_lexer -yajl_lex_alloc(yajl_alloc_funcs * alloc, - unsigned int allowComments, unsigned int validateUTF8) -{ - yajl_lexer lxr = (yajl_lexer) YA_MALLOC(alloc, sizeof(struct yajl_lexer_t)); - memset((void *) lxr, 0, sizeof(struct yajl_lexer_t)); - lxr->buf = yajl_buf_alloc(alloc); - lxr->allowComments = allowComments; - lxr->validateUTF8 = validateUTF8; - lxr->alloc = alloc; - return lxr; -} - -void -yajl_lex_free(yajl_lexer lxr) -{ - yajl_buf_free(lxr->buf); - YA_FREE(lxr->alloc, lxr); - return; -} - -/* a lookup table which lets us quickly determine three things: - * VEC - valid escaped conrol char - * IJC - invalid json char - * VHC - valid hex char - * note. the solidus '/' may be escaped or not. - * note. the - */ -#define VEC 1 -#define IJC 2 -#define VHC 4 -static const char charLookupTable[256] = -{ -/*00*/ IJC , IJC , IJC , IJC , IJC , IJC , IJC , IJC , -/*08*/ IJC , IJC , IJC , IJC , IJC , IJC , IJC , IJC , -/*10*/ IJC , IJC , IJC , IJC , IJC , IJC , IJC , IJC , -/*18*/ IJC , IJC , IJC , IJC , IJC , IJC , IJC , IJC , - -/*20*/ 0 , 0 , VEC|IJC, 0 , 0 , 0 , 0 , 0 , -/*28*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , VEC , -/*30*/ VHC , VHC , VHC , VHC , VHC , VHC , VHC , VHC , -/*38*/ VHC , VHC , 0 , 0 , 0 , 0 , 0 , 0 , - -/*40*/ 0 , VHC , VHC , VHC , VHC , VHC , VHC , 0 , -/*48*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , -/*50*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , -/*58*/ 0 , 0 , 0 , 0 , VEC|IJC, 0 , 0 , 0 , - -/*60*/ 0 , VHC , VEC|VHC, VHC , VHC , VHC , VEC|VHC, 0 , -/*68*/ 0 , 0 , 0 , 0 , 0 , 0 , VEC , 0 , -/*70*/ 0 , 0 , VEC , 0 , VEC , 0 , 0 , 0 , -/*78*/ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - -/* include these so we don't have to always check the range of the char */ - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 -}; - -/** process a variable length utf8 encoded codepoint. - * - * returns: - * yajl_tok_string - if valid utf8 char was parsed and offset was - * advanced - * yajl_tok_eof - if end of input was hit before validation could - * complete - * yajl_tok_error - if invalid utf8 was encountered - * - * NOTE: on error the offset will point to the first char of the - * invalid utf8 */ -#define UTF8_CHECK_EOF if (*offset >= jsonTextLen) { return yajl_tok_eof; } - -static yajl_tok -yajl_lex_utf8_char(yajl_lexer lexer, const unsigned char * jsonText, - unsigned int jsonTextLen, unsigned int * offset, - unsigned char curChar) -{ - if (curChar <= 0x7f) { - /* single byte */ - return yajl_tok_string; - } else if ((curChar >> 5) == 0x6) { - /* two byte */ - UTF8_CHECK_EOF; - curChar = readChar(lexer, jsonText, offset); - if ((curChar >> 6) == 0x2) return yajl_tok_string; - } else if ((curChar >> 4) == 0x0e) { - /* three byte */ - UTF8_CHECK_EOF; - curChar = readChar(lexer, jsonText, offset); - if ((curChar >> 6) == 0x2) { - UTF8_CHECK_EOF; - curChar = readChar(lexer, jsonText, offset); - if ((curChar >> 6) == 0x2) return yajl_tok_string; - } - } else if ((curChar >> 3) == 0x1e) { - /* four byte */ - UTF8_CHECK_EOF; - curChar = readChar(lexer, jsonText, offset); - if ((curChar >> 6) == 0x2) { - UTF8_CHECK_EOF; - curChar = readChar(lexer, jsonText, offset); - if ((curChar >> 6) == 0x2) { - UTF8_CHECK_EOF; - curChar = readChar(lexer, jsonText, offset); - if ((curChar >> 6) == 0x2) return yajl_tok_string; - } - } - } - - return yajl_tok_error; -} - -/* lex a string. input is the lexer, pointer to beginning of - * json text, and start of string (offset). - * a token is returned which has the following meanings: - * yajl_tok_string: lex of string was successful. offset points to - * terminating '"'. - * yajl_tok_eof: end of text was encountered before we could complete - * the lex. - * yajl_tok_error: embedded in the string were unallowable chars. offset - * points to the offending char - */ -#define STR_CHECK_EOF \ -if (*offset >= jsonTextLen) { \ - tok = yajl_tok_eof; \ - goto finish_string_lex; \ -} - -static yajl_tok -yajl_lex_string(yajl_lexer lexer, const unsigned char * jsonText, - unsigned int jsonTextLen, unsigned int * offset) -{ - yajl_tok tok = yajl_tok_error; - int hasEscapes = 0; - - for (;;) { - unsigned char curChar; - - STR_CHECK_EOF; - - curChar = readChar(lexer, jsonText, offset); - - /* quote terminates */ - if (curChar == '"') { - tok = yajl_tok_string; - break; - } - /* backslash escapes a set of control chars, */ - else if (curChar == '\\') { - hasEscapes = 1; - STR_CHECK_EOF; - - /* special case \u */ - curChar = readChar(lexer, jsonText, offset); - if (curChar == 'u') { - unsigned int i = 0; - - for (i=0;i<4;i++) { - STR_CHECK_EOF; - curChar = readChar(lexer, jsonText, offset); - if (!(charLookupTable[curChar] & VHC)) { - /* back up to offending char */ - unreadChar(lexer, offset); - lexer->error = yajl_lex_string_invalid_hex_char; - goto finish_string_lex; - } - } - } else if (!(charLookupTable[curChar] & VEC)) { - /* back up to offending char */ - unreadChar(lexer, offset); - lexer->error = yajl_lex_string_invalid_escaped_char; - goto finish_string_lex; - } - } - /* when not validating UTF8 it's a simple table lookup to determine - * if the present character is invalid */ - else if(charLookupTable[curChar] & IJC) { - /* back up to offending char */ - unreadChar(lexer, offset); - lexer->error = yajl_lex_string_invalid_json_char; - goto finish_string_lex; - } - /* when in validate UTF8 mode we need to do some extra work */ - else if (lexer->validateUTF8) { - yajl_tok t = yajl_lex_utf8_char(lexer, jsonText, jsonTextLen, - offset, curChar); - - if (t == yajl_tok_eof) { - tok = yajl_tok_eof; - goto finish_string_lex; - } else if (t == yajl_tok_error) { - lexer->error = yajl_lex_string_invalid_utf8; - goto finish_string_lex; - } - } - /* accept it, and move on */ - } - finish_string_lex: - /* tell our buddy, the parser, wether he needs to process this string - * again */ - if (hasEscapes && tok == yajl_tok_string) { - tok = yajl_tok_string_with_escapes; - } - - return tok; -} - -#define RETURN_IF_EOF if (*offset >= jsonTextLen) return yajl_tok_eof; - -static yajl_tok -yajl_lex_number(yajl_lexer lexer, const unsigned char * jsonText, - unsigned int jsonTextLen, unsigned int * offset) -{ - /** XXX: numbers are the only entities in json that we must lex - * _beyond_ in order to know that they are complete. There - * is an ambiguous case for integers at EOF. */ - - unsigned char c; - - yajl_tok tok = yajl_tok_integer; - - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - - /* optional leading minus */ - if (c == '-') { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - } - - /* a single zero, or a series of integers */ - if (c == '0') { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - } else if (c >= '1' && c <= '9') { - do { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - } while (c >= '0' && c <= '9'); - } else { - unreadChar(lexer, offset); - lexer->error = yajl_lex_missing_integer_after_minus; - return yajl_tok_error; - } - - /* optional fraction (indicates this is floating point) */ - if (c == '.') { - int numRd = 0; - - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - - while (c >= '0' && c <= '9') { - numRd++; - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - } - - if (!numRd) { - unreadChar(lexer, offset); - lexer->error = yajl_lex_missing_integer_after_decimal; - return yajl_tok_error; - } - tok = yajl_tok_double; - } - - /* optional exponent (indicates this is floating point) */ - if (c == 'e' || c == 'E') { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - - /* optional sign */ - if (c == '+' || c == '-') { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - } - - if (c >= '0' && c <= '9') { - do { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - } while (c >= '0' && c <= '9'); - } else { - unreadChar(lexer, offset); - lexer->error = yajl_lex_missing_integer_after_exponent; - return yajl_tok_error; - } - tok = yajl_tok_double; - } - - /* we always go "one too far" */ - unreadChar(lexer, offset); - - return tok; -} - -static yajl_tok -yajl_lex_comment(yajl_lexer lexer, const unsigned char * jsonText, - unsigned int jsonTextLen, unsigned int * offset) -{ - unsigned char c; - - yajl_tok tok = yajl_tok_comment; - - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - - /* either slash or star expected */ - if (c == '/') { - /* now we throw away until end of line */ - do { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - } while (c != '\n'); - } else if (c == '*') { - /* now we throw away until end of comment */ - for (;;) { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - if (c == '*') { - RETURN_IF_EOF; - c = readChar(lexer, jsonText, offset); - if (c == '/') { - break; - } else { - unreadChar(lexer, offset); - } - } - } - } else { - lexer->error = yajl_lex_invalid_char; - tok = yajl_tok_error; - } - - return tok; -} - -yajl_tok -yajl_lex_lex(yajl_lexer lexer, const unsigned char * jsonText, - unsigned int jsonTextLen, unsigned int * offset, - const unsigned char ** outBuf, unsigned int * outLen) -{ - yajl_tok tok = yajl_tok_error; - unsigned char c; - unsigned int startOffset = *offset; - - *outBuf = NULL; - *outLen = 0; - - for (;;) { - assert(*offset <= jsonTextLen); - - if (*offset >= jsonTextLen) { - tok = yajl_tok_eof; - goto lexed; - } - - c = readChar(lexer, jsonText, offset); - - switch (c) { - case '{': - tok = yajl_tok_left_bracket; - goto lexed; - case '}': - tok = yajl_tok_right_bracket; - goto lexed; - case '[': - tok = yajl_tok_left_brace; - goto lexed; - case ']': - tok = yajl_tok_right_brace; - goto lexed; - case ',': - tok = yajl_tok_comma; - goto lexed; - case ':': - tok = yajl_tok_colon; - goto lexed; - case '\t': case '\n': case '\v': case '\f': case '\r': case ' ': - startOffset++; - break; - case 't': { - const char * want = "rue"; - do { - if (*offset >= jsonTextLen) { - tok = yajl_tok_eof; - goto lexed; - } - c = readChar(lexer, jsonText, offset); - if (c != *want) { - unreadChar(lexer, offset); - lexer->error = yajl_lex_invalid_string; - tok = yajl_tok_error; - goto lexed; - } - } while (*(++want)); - tok = yajl_tok_bool; - goto lexed; - } - case 'f': { - const char * want = "alse"; - do { - if (*offset >= jsonTextLen) { - tok = yajl_tok_eof; - goto lexed; - } - c = readChar(lexer, jsonText, offset); - if (c != *want) { - unreadChar(lexer, offset); - lexer->error = yajl_lex_invalid_string; - tok = yajl_tok_error; - goto lexed; - } - } while (*(++want)); - tok = yajl_tok_bool; - goto lexed; - } - case 'n': { - const char * want = "ull"; - do { - if (*offset >= jsonTextLen) { - tok = yajl_tok_eof; - goto lexed; - } - c = readChar(lexer, jsonText, offset); - if (c != *want) { - unreadChar(lexer, offset); - lexer->error = yajl_lex_invalid_string; - tok = yajl_tok_error; - goto lexed; - } - } while (*(++want)); - tok = yajl_tok_null; - goto lexed; - } - case '"': { - tok = yajl_lex_string(lexer, (const unsigned char *) jsonText, - jsonTextLen, offset); - goto lexed; - } - case '-': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': { - /* integer parsing wants to start from the beginning */ - unreadChar(lexer, offset); - tok = yajl_lex_number(lexer, (const unsigned char *) jsonText, - jsonTextLen, offset); - goto lexed; - } - case '/': - /* hey, look, a probable comment! If comments are disabled - * it's an error. */ - if (!lexer->allowComments) { - unreadChar(lexer, offset); - lexer->error = yajl_lex_unallowed_comment; - tok = yajl_tok_error; - goto lexed; - } - /* if comments are enabled, then we should try to lex - * the thing. possible outcomes are - * - successful lex (tok_comment, which means continue), - * - malformed comment opening (slash not followed by - * '*' or '/') (tok_error) - * - eof hit. (tok_eof) */ - tok = yajl_lex_comment(lexer, (const unsigned char *) jsonText, - jsonTextLen, offset); - if (tok == yajl_tok_comment) { - /* "error" is silly, but that's the initial - * state of tok. guilty until proven innocent. */ - tok = yajl_tok_error; - yajl_buf_clear(lexer->buf); - lexer->bufInUse = 0; - startOffset = *offset; - break; - } - /* hit error or eof, bail */ - goto lexed; - default: - lexer->error = yajl_lex_invalid_char; - tok = yajl_tok_error; - goto lexed; - } - } - - - lexed: - /* need to append to buffer if the buffer is in use or - * if it's an EOF token */ - if (tok == yajl_tok_eof || lexer->bufInUse) { - if (!lexer->bufInUse) yajl_buf_clear(lexer->buf); - lexer->bufInUse = 1; - yajl_buf_append(lexer->buf, jsonText + startOffset, *offset - startOffset); - lexer->bufOff = 0; - - if (tok != yajl_tok_eof) { - *outBuf = yajl_buf_data(lexer->buf); - *outLen = yajl_buf_len(lexer->buf); - lexer->bufInUse = 0; - } - } else if (tok != yajl_tok_error) { - *outBuf = jsonText + startOffset; - *outLen = *offset - startOffset; - } - - /* special case for strings. skip the quotes. */ - if (tok == yajl_tok_string || tok == yajl_tok_string_with_escapes) - { - assert(*outLen >= 2); - (*outBuf)++; - *outLen -= 2; - } - - -#ifdef YAJL_LEXER_DEBUG - if (tok == yajl_tok_error) { - printf("lexical error: %s\n", - yajl_lex_error_to_string(yajl_lex_get_error(lexer))); - } else if (tok == yajl_tok_eof) { - printf("EOF hit\n"); - } else { - printf("lexed %s: '", tokToStr(tok)); - fwrite(*outBuf, 1, *outLen, stdout); - printf("'\n"); - } -#endif - - return tok; -} - -const char * -yajl_lex_error_to_string(yajl_lex_error error) -{ - switch (error) { - case yajl_lex_e_ok: - return "ok, no error"; - case yajl_lex_string_invalid_utf8: - return "invalid bytes in UTF8 string."; - case yajl_lex_string_invalid_escaped_char: - return "inside a string, '\\' occurs before a character " - "which it may not."; - case yajl_lex_string_invalid_json_char: - return "invalid character inside string."; - case yajl_lex_string_invalid_hex_char: - return "invalid (non-hex) character occurs after '\\u' inside " - "string."; - case yajl_lex_invalid_char: - return "invalid char in json text."; - case yajl_lex_invalid_string: - return "invalid string in json text."; - case yajl_lex_missing_integer_after_exponent: - return "malformed number, a digit is required after the exponent."; - case yajl_lex_missing_integer_after_decimal: - return "malformed number, a digit is required after the " - "decimal point."; - case yajl_lex_missing_integer_after_minus: - return "malformed number, a digit is required after the " - "minus sign."; - case yajl_lex_unallowed_comment: - return "probable comment found in input text, comments are " - "not enabled."; - } - return "unknown error code"; -} - - -/** allows access to more specific information about the lexical - * error when yajl_lex_lex returns yajl_tok_error. */ -yajl_lex_error -yajl_lex_get_error(yajl_lexer lexer) -{ - if (lexer == NULL) return (yajl_lex_error) -1; - return lexer->error; -} - -unsigned int yajl_lex_current_line(yajl_lexer lexer) -{ - return lexer->lineOff; -} - -unsigned int yajl_lex_current_char(yajl_lexer lexer) -{ - return lexer->charOff; -} - -yajl_tok yajl_lex_peek(yajl_lexer lexer, const unsigned char * jsonText, - unsigned int jsonTextLen, unsigned int offset) -{ - const unsigned char * outBuf; - unsigned int outLen; - unsigned int bufLen = yajl_buf_len(lexer->buf); - unsigned int bufOff = lexer->bufOff; - unsigned int bufInUse = lexer->bufInUse; - yajl_tok tok; - - tok = yajl_lex_lex(lexer, jsonText, jsonTextLen, &offset, - &outBuf, &outLen); - - lexer->bufOff = bufOff; - lexer->bufInUse = bufInUse; - yajl_buf_truncate(lexer->buf, bufLen); - - return tok; -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_lex.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_lex.h deleted file mode 100755 index 06475a29d1..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_lex.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __YAJL_LEX_H__ -#define __YAJL_LEX_H__ - -#include "extThree20JSON/yajl_common.h" - -typedef enum { - yajl_tok_bool, - yajl_tok_colon, - yajl_tok_comma, - yajl_tok_eof, - yajl_tok_error, - yajl_tok_left_brace, - yajl_tok_left_bracket, - yajl_tok_null, - yajl_tok_right_brace, - yajl_tok_right_bracket, - - /* we differentiate between integers and doubles to allow the - * parser to interpret the number without re-scanning */ - yajl_tok_integer, - yajl_tok_double, - - /* we differentiate between strings which require further processing, - * and strings that do not */ - yajl_tok_string, - yajl_tok_string_with_escapes, - - /* comment tokens are not currently returned to the parser, ever */ - yajl_tok_comment -} yajl_tok; - -typedef struct yajl_lexer_t * yajl_lexer; - -yajl_lexer yajl_lex_alloc(yajl_alloc_funcs * alloc, - unsigned int allowComments, - unsigned int validateUTF8); - -void yajl_lex_free(yajl_lexer lexer); - -/** - * run/continue a lex. "offset" is an input/output parameter. - * It should be initialized to zero for a - * new chunk of target text, and upon subsetquent calls with the same - * target text should passed with the value of the previous invocation. - * - * the client may be interested in the value of offset when an error is - * returned from the lexer. This allows the client to render useful -n * error messages. - * - * When you pass the next chunk of data, context should be reinitialized - * to zero. - * - * Finally, the output buffer is usually just a pointer into the jsonText, - * however in cases where the entity being lexed spans multiple chunks, - * the lexer will buffer the entity and the data returned will be - * a pointer into that buffer. - * - * This behavior is abstracted from client code except for the performance - * implications which require that the client choose a reasonable chunk - * size to get adequate performance. - */ -yajl_tok yajl_lex_lex(yajl_lexer lexer, const unsigned char * jsonText, - unsigned int jsonTextLen, unsigned int * offset, - const unsigned char ** outBuf, unsigned int * outLen); - -/** have a peek at the next token, but don't move the lexer forward */ -yajl_tok yajl_lex_peek(yajl_lexer lexer, const unsigned char * jsonText, - unsigned int jsonTextLen, unsigned int offset); - - -typedef enum { - yajl_lex_e_ok = 0, - yajl_lex_string_invalid_utf8, - yajl_lex_string_invalid_escaped_char, - yajl_lex_string_invalid_json_char, - yajl_lex_string_invalid_hex_char, - yajl_lex_invalid_char, - yajl_lex_invalid_string, - yajl_lex_missing_integer_after_decimal, - yajl_lex_missing_integer_after_exponent, - yajl_lex_missing_integer_after_minus, - yajl_lex_unallowed_comment -} yajl_lex_error; - -const char * yajl_lex_error_to_string(yajl_lex_error error); - -/** allows access to more specific information about the lexical - * error when yajl_lex_lex returns yajl_tok_error. */ -yajl_lex_error yajl_lex_get_error(yajl_lexer lexer); - -/** get the current offset into the most recently lexed json string. */ -unsigned int yajl_lex_current_offset(yajl_lexer lexer); - -/** get the number of lines lexed by this lexer instance */ -unsigned int yajl_lex_current_line(yajl_lexer lexer); - -/** get the number of chars lexed by this lexer instance since the last - * \n or \r */ -unsigned int yajl_lex_current_char(yajl_lexer lexer); - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_parser.c b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_parser.c deleted file mode 100755 index 8c77d4a68c..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_parser.c +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "extThree20JSON/private/yajl_lex.h" -#include "extThree20JSON/private/yajl_parser.h" -#include "extThree20JSON/private/yajl_encode.h" -#include "extThree20JSON/private/yajl_bytestack.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -unsigned char * -yajl_render_error_string(yajl_handle hand, const unsigned char * jsonText, - unsigned int jsonTextLen, int verbose) -{ - unsigned int offset = hand->bytesConsumed; - unsigned char * str; - const char * errorType = NULL; - const char * errorText = NULL; - char text[72]; - const char * arrow = " (right here) ------^\n"; - - if (yajl_bs_current(hand->stateStack) == yajl_state_parse_error) { - errorType = "parse"; - errorText = hand->parseError; - } else if (yajl_bs_current(hand->stateStack) == yajl_state_lexical_error) { - errorType = "lexical"; - errorText = yajl_lex_error_to_string(yajl_lex_get_error(hand->lexer)); - } else { - errorType = "unknown"; - } - - { - unsigned int memneeded = 0; - memneeded += strlen(errorType); - memneeded += strlen(" error"); - if (errorText != NULL) { - memneeded += strlen(": "); - memneeded += strlen(errorText); - } - str = (unsigned char *) YA_MALLOC(&(hand->alloc), memneeded + 2); - str[0] = 0; - strcat((char *) str, errorType); - strcat((char *) str, " error"); - if (errorText != NULL) { - strcat((char *) str, ": "); - strcat((char *) str, errorText); - } - strcat((char *) str, "\n"); - } - - /* now we append as many spaces as needed to make sure the error - * falls at char 41, if verbose was specified */ - if (verbose) { - unsigned int start, end, i; - unsigned int spacesNeeded; - - spacesNeeded = (offset < 30 ? 40 - offset : 10); - start = (offset >= 30 ? offset - 30 : 0); - end = (offset + 30 > jsonTextLen ? jsonTextLen : offset + 30); - - for (i=0;ialloc), (strlen((char *) str) + - strlen((char *) text) + - strlen(arrow) + 1)); - newStr[0] = 0; - strcat((char *) newStr, (char *) str); - strcat((char *) newStr, text); - strcat((char *) newStr, arrow); - YA_FREE(&(hand->alloc), str); - str = (unsigned char *) newStr; - } - } - return str; -} - -/* check for client cancelation */ -#define _CC_CHK(x) \ - if (!(x)) { \ - yajl_bs_set(hand->stateStack, yajl_state_parse_error); \ - hand->parseError = \ - "client cancelled parse via callback return value"; \ - return yajl_status_client_canceled; \ - } - - -yajl_status -yajl_do_parse(yajl_handle hand, const unsigned char * jsonText, - unsigned int jsonTextLen) -{ - yajl_tok tok; - const unsigned char * buf; - unsigned int bufLen; - unsigned int * offset = &(hand->bytesConsumed); - - *offset = 0; - - - around_again: - switch (yajl_bs_current(hand->stateStack)) { - case yajl_state_parse_complete: - return yajl_status_ok; - case yajl_state_lexical_error: - case yajl_state_parse_error: - return yajl_status_error; - case yajl_state_start: - case yajl_state_map_need_val: - case yajl_state_array_need_val: - case yajl_state_array_start: { - /* for arrays and maps, we advance the state for this - * depth, then push the state of the next depth. - * If an error occurs during the parsing of the nesting - * enitity, the state at this level will not matter. - * a state that needs pushing will be anything other - * than state_start */ - yajl_state stateToPush = yajl_state_start; - - tok = yajl_lex_lex(hand->lexer, jsonText, jsonTextLen, - offset, &buf, &bufLen); - - switch (tok) { - case yajl_tok_eof: - return yajl_status_insufficient_data; - case yajl_tok_error: - yajl_bs_set(hand->stateStack, yajl_state_lexical_error); - goto around_again; - case yajl_tok_string: - if (hand->callbacks && hand->callbacks->yajl_string) { - _CC_CHK(hand->callbacks->yajl_string(hand->ctx, - buf, bufLen)); - } - break; - case yajl_tok_string_with_escapes: - if (hand->callbacks && hand->callbacks->yajl_string) { - yajl_buf_clear(hand->decodeBuf); - yajl_string_decode(hand->decodeBuf, buf, bufLen); - _CC_CHK(hand->callbacks->yajl_string( - hand->ctx, yajl_buf_data(hand->decodeBuf), - yajl_buf_len(hand->decodeBuf))); - } - break; - case yajl_tok_bool: - if (hand->callbacks && hand->callbacks->yajl_boolean) { - _CC_CHK(hand->callbacks->yajl_boolean(hand->ctx, - *buf == 't')); - } - break; - case yajl_tok_null: - if (hand->callbacks && hand->callbacks->yajl_null) { - _CC_CHK(hand->callbacks->yajl_null(hand->ctx)); - } - break; - case yajl_tok_left_bracket: - if (hand->callbacks && hand->callbacks->yajl_start_map) { - _CC_CHK(hand->callbacks->yajl_start_map(hand->ctx)); - } - stateToPush = yajl_state_map_start; - break; - case yajl_tok_left_brace: - if (hand->callbacks && hand->callbacks->yajl_start_array) { - _CC_CHK(hand->callbacks->yajl_start_array(hand->ctx)); - } - stateToPush = yajl_state_array_start; - break; - case yajl_tok_integer: - /* - * note. strtol does not respect the length of - * the lexical token. in a corner case where the - * lexed number is a integer with a trailing zero, - * immediately followed by the end of buffer, - * sscanf could run off into oblivion and cause a - * crash. for this reason we copy the integer - * (and doubles), into our parse buffer (the same - * one used for unescaping strings), before - * calling strtol. yajl_buf ensures null padding, - * so we're safe. - */ - if (hand->callbacks) { - if (hand->callbacks->yajl_number) { - _CC_CHK(hand->callbacks->yajl_number( - hand->ctx,(const char *) buf, bufLen)); - } else if (hand->callbacks->yajl_integer) { - long int i = 0; - yajl_buf_clear(hand->decodeBuf); - yajl_buf_append(hand->decodeBuf, buf, bufLen); - buf = yajl_buf_data(hand->decodeBuf); - i = strtol((const char *) buf, NULL, 10); - if ((i == LONG_MIN || i == LONG_MAX) && - errno == ERANGE) - { - yajl_bs_set(hand->stateStack, - yajl_state_parse_error); - hand->parseError = "integer overflow" ; - /* try to restore error offset */ - if (*offset >= bufLen) *offset -= bufLen; - else *offset = 0; - goto around_again; - } - _CC_CHK(hand->callbacks->yajl_integer(hand->ctx, - i)); - } - } - break; - case yajl_tok_double: - if (hand->callbacks) { - if (hand->callbacks->yajl_number) { - _CC_CHK(hand->callbacks->yajl_number( - hand->ctx, (const char *) buf, bufLen)); - } else if (hand->callbacks->yajl_double) { - double d = 0.0; - yajl_buf_clear(hand->decodeBuf); - yajl_buf_append(hand->decodeBuf, buf, bufLen); - buf = yajl_buf_data(hand->decodeBuf); - d = strtod((char *) buf, NULL); - if ((d == HUGE_VAL || d == -HUGE_VAL) && - errno == ERANGE) - { - yajl_bs_set(hand->stateStack, - yajl_state_parse_error); - hand->parseError = "numeric (floating point) " - "overflow"; - /* try to restore error offset */ - if (*offset >= bufLen) *offset -= bufLen; - else *offset = 0; - goto around_again; - } - _CC_CHK(hand->callbacks->yajl_double(hand->ctx, - d)); - } - } - break; - case yajl_tok_right_brace: { - if (yajl_bs_current(hand->stateStack) == - yajl_state_array_start) - { - if (hand->callbacks && - hand->callbacks->yajl_end_array) - { - _CC_CHK(hand->callbacks->yajl_end_array(hand->ctx)); - } - yajl_bs_pop(hand->stateStack); - goto around_again; - } - /* intentional fall-through */ - } - case yajl_tok_colon: - case yajl_tok_comma: - case yajl_tok_right_bracket: - yajl_bs_set(hand->stateStack, yajl_state_parse_error); - hand->parseError = - "unallowed token at this point in JSON text"; - goto around_again; - default: - yajl_bs_set(hand->stateStack, yajl_state_parse_error); - hand->parseError = "invalid token, internal error"; - goto around_again; - } - /* got a value. transition depends on the state we're in. */ - { - yajl_state s = yajl_bs_current(hand->stateStack); - if (s == yajl_state_start) { - yajl_bs_set(hand->stateStack, yajl_state_parse_complete); - } else if (s == yajl_state_map_need_val) { - yajl_bs_set(hand->stateStack, yajl_state_map_got_val); - } else { - yajl_bs_set(hand->stateStack, yajl_state_array_got_val); - } - } - if (stateToPush != yajl_state_start) { - yajl_bs_push(hand->stateStack, stateToPush); - } - - goto around_again; - } - case yajl_state_map_start: - case yajl_state_map_need_key: { - /* only difference between these two states is that in - * start '}' is valid, whereas in need_key, we've parsed - * a comma, and a string key _must_ follow */ - tok = yajl_lex_lex(hand->lexer, jsonText, jsonTextLen, - offset, &buf, &bufLen); - switch (tok) { - case yajl_tok_eof: - return yajl_status_insufficient_data; - case yajl_tok_error: - yajl_bs_set(hand->stateStack, yajl_state_lexical_error); - goto around_again; - case yajl_tok_string_with_escapes: - if (hand->callbacks && hand->callbacks->yajl_map_key) { - yajl_buf_clear(hand->decodeBuf); - yajl_string_decode(hand->decodeBuf, buf, bufLen); - buf = yajl_buf_data(hand->decodeBuf); - bufLen = yajl_buf_len(hand->decodeBuf); - } - /* intentional fall-through */ - case yajl_tok_string: - if (hand->callbacks && hand->callbacks->yajl_map_key) { - _CC_CHK(hand->callbacks->yajl_map_key(hand->ctx, buf, - bufLen)); - } - yajl_bs_set(hand->stateStack, yajl_state_map_sep); - goto around_again; - case yajl_tok_right_bracket: - if (yajl_bs_current(hand->stateStack) == - yajl_state_map_start) - { - if (hand->callbacks && hand->callbacks->yajl_end_map) { - _CC_CHK(hand->callbacks->yajl_end_map(hand->ctx)); - } - yajl_bs_pop(hand->stateStack); - goto around_again; - } - default: - yajl_bs_set(hand->stateStack, yajl_state_parse_error); - hand->parseError = - "invalid object key (must be a string)"; - goto around_again; - } - } - case yajl_state_map_sep: { - tok = yajl_lex_lex(hand->lexer, jsonText, jsonTextLen, - offset, &buf, &bufLen); - switch (tok) { - case yajl_tok_colon: - yajl_bs_set(hand->stateStack, yajl_state_map_need_val); - goto around_again; - case yajl_tok_eof: - return yajl_status_insufficient_data; - case yajl_tok_error: - yajl_bs_set(hand->stateStack, yajl_state_lexical_error); - goto around_again; - default: - yajl_bs_set(hand->stateStack, yajl_state_parse_error); - hand->parseError = "object key and value must " - "be separated by a colon (':')"; - goto around_again; - } - } - case yajl_state_map_got_val: { - tok = yajl_lex_lex(hand->lexer, jsonText, jsonTextLen, - offset, &buf, &bufLen); - switch (tok) { - case yajl_tok_right_bracket: - if (hand->callbacks && hand->callbacks->yajl_end_map) { - _CC_CHK(hand->callbacks->yajl_end_map(hand->ctx)); - } - yajl_bs_pop(hand->stateStack); - goto around_again; - case yajl_tok_comma: - yajl_bs_set(hand->stateStack, yajl_state_map_need_key); - goto around_again; - case yajl_tok_eof: - return yajl_status_insufficient_data; - case yajl_tok_error: - yajl_bs_set(hand->stateStack, yajl_state_lexical_error); - goto around_again; - default: - yajl_bs_set(hand->stateStack, yajl_state_parse_error); - hand->parseError = "after key and value, inside map, " - "I expect ',' or '}'"; - /* try to restore error offset */ - if (*offset >= bufLen) *offset -= bufLen; - else *offset = 0; - goto around_again; - } - } - case yajl_state_array_got_val: { - tok = yajl_lex_lex(hand->lexer, jsonText, jsonTextLen, - offset, &buf, &bufLen); - switch (tok) { - case yajl_tok_right_brace: - if (hand->callbacks && hand->callbacks->yajl_end_array) { - _CC_CHK(hand->callbacks->yajl_end_array(hand->ctx)); - } - yajl_bs_pop(hand->stateStack); - goto around_again; - case yajl_tok_comma: - yajl_bs_set(hand->stateStack, yajl_state_array_need_val); - goto around_again; - case yajl_tok_eof: - return yajl_status_insufficient_data; - case yajl_tok_error: - yajl_bs_set(hand->stateStack, yajl_state_lexical_error); - goto around_again; - default: - yajl_bs_set(hand->stateStack, yajl_state_parse_error); - hand->parseError = - "after array element, I expect ',' or ']'"; - goto around_again; - } - } - } - - abort(); - return yajl_status_error; -} - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_parser.h b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_parser.h deleted file mode 100755 index a30a19c85c..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_parser.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __YAJL_PARSER_H__ -#define __YAJL_PARSER_H__ - -#include "extThree20JSON/yajl_parse.h" -#include "extThree20JSON/private/yajl_bytestack.h" -#include "extThree20JSON/private/yajl_buf.h" - - -typedef enum { - yajl_state_start = 0, - yajl_state_parse_complete, - yajl_state_parse_error, - yajl_state_lexical_error, - yajl_state_map_start, - yajl_state_map_sep, - yajl_state_map_need_val, - yajl_state_map_got_val, - yajl_state_map_need_key, - yajl_state_array_start, - yajl_state_array_got_val, - yajl_state_array_need_val -} yajl_state; - -struct yajl_handle_t { - const yajl_callbacks * callbacks; - void * ctx; - yajl_lexer lexer; - const char * parseError; - /* the number of bytes consumed from the last client buffer, - * in the case of an error this will be an error offset, in the - * case of an error this can be used as the error offset */ - unsigned int bytesConsumed; - /* temporary storage for decoded strings */ - yajl_buf decodeBuf; - /* a stack of states. access with yajl_state_XXX routines */ - yajl_bytestack stateStack; - /* memory allocation routines */ - yajl_alloc_funcs alloc; -}; - -yajl_status -yajl_do_parse(yajl_handle handle, const unsigned char * jsonText, - unsigned int jsonTextLen); - -unsigned char * -yajl_render_error_string(yajl_handle hand, const unsigned char * jsonText, - unsigned int jsonTextLen, int verbose); - - -#endif diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_version.c b/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_version.c deleted file mode 100755 index d57433af72..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/src/yajl_version.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int yajl_version(void) -{ - return YAJL_VERSION; -} - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/CMakeLists.txt b/src/extThree20JSON/Vendors/YAJL/yajl/test/CMakeLists.txt deleted file mode 100755 index e179b2bcf6..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2010, Lloyd Hilaiel. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# 3. Neither the name of Lloyd Hilaiel nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -SET (SRCS yajl_test.c) - -# use the library we build, duh. -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include) -LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) - -ADD_EXECUTABLE(yajl_test ${SRCS}) - -TARGET_LINK_LIBRARIES(yajl_test yajl_s) diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array.json deleted file mode 100755 index f76058d52e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array.json +++ /dev/null @@ -1,6 +0,0 @@ -["foo", - "bar", "baz", - true,false,null,{"key":"value"}, - [null,null,null,[]], - "\n\r\\" -] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array.json.gold deleted file mode 100755 index 477559decd..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array.json.gold +++ /dev/null @@ -1,22 +0,0 @@ -array open '[' -string: 'foo' -string: 'bar' -string: 'baz' -bool: true -bool: false -null -map open '{' -key: 'key' -string: 'value' -map close '}' -array open '[' -null -null -null -array open '[' -array close ']' -array close ']' -string: ' - \' -array close ']' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_close.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_close.json deleted file mode 100755 index 079b5796ef..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_close.json +++ /dev/null @@ -1 +0,0 @@ -] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_close.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_close.json.gold deleted file mode 100755 index 972fd39064..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_close.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -parse error: unallowed token at this point in JSON text -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_open.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_open.json deleted file mode 100755 index 558ed37d93..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_open.json +++ /dev/null @@ -1 +0,0 @@ -[ diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_open.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_open.json.gold deleted file mode 100755 index 478b6b9adf..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/array_open.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -array open '[' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/bogus_char.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/bogus_char.json deleted file mode 100755 index 8163bd8a3a..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/bogus_char.json +++ /dev/null @@ -1,4 +0,0 @@ -["this","is","what","should","be", - "a happy bit of json", - "but someone, misspelled \"true\"", ture, - "who says JSON is easy for humans to generate?"] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/bogus_char.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/bogus_char.json.gold deleted file mode 100755 index 0c68a49591..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/bogus_char.json.gold +++ /dev/null @@ -1,10 +0,0 @@ -array open '[' -string: 'this' -string: 'is' -string: 'what' -string: 'should' -string: 'be' -string: 'a happy bit of json' -string: 'but someone, misspelled "true"' -lexical error: invalid string in json text. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/codepoints_from_unicode_org.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/codepoints_from_unicode_org.json deleted file mode 100755 index f91f3be7ff..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/codepoints_from_unicode_org.json +++ /dev/null @@ -1 +0,0 @@ -"\u004d\u0430\u4e8c\ud800\udf02" diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/codepoints_from_unicode_org.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/codepoints_from_unicode_org.json.gold deleted file mode 100755 index f359a1b306..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/codepoints_from_unicode_org.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -string: 'Mа二𐌂' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/dc_simple_with_comments.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/dc_simple_with_comments.json deleted file mode 100755 index 3b79bba974..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/dc_simple_with_comments.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "this": "is", // ignore this - "really": "simple", - /* ignore -this -too * / -** // -(/ -******/ - "json": "right?" -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/dc_simple_with_comments.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/dc_simple_with_comments.json.gold deleted file mode 100755 index d222e9b68d..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/dc_simple_with_comments.json.gold +++ /dev/null @@ -1,5 +0,0 @@ -map open '{' -key: 'this' -string: 'is' -lexical error: probable comment found in input text, comments are not enabled. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/deep_arrays.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/deep_arrays.json deleted file mode 100755 index 82d1b0dd80..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/deep_arrays.json +++ /dev/null @@ -1 +0,0 @@ -[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] \ No newline at end of file diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/deep_arrays.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/deep_arrays.json.gold deleted file mode 100755 index 4d5cd9999a..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/deep_arrays.json.gold +++ /dev/null @@ -1,2049 +0,0 @@ -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array open '[' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -array close ']' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case.json deleted file mode 100755 index 6998f55963..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case.json +++ /dev/null @@ -1 +0,0 @@ -{ "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": [ { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986", "GlossDef": "A meta-markup language, used to create markup languages such as DocBook.", "GlossSeeAlso": ["GML", "XML", "markup"] } ] } } } diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case.json.gold deleted file mode 100755 index c3adc117a0..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case.json.gold +++ /dev/null @@ -1,36 +0,0 @@ -map open '{' -key: 'glossary' -map open '{' -key: 'title' -string: 'example glossary' -key: 'GlossDiv' -map open '{' -key: 'title' -string: 'S' -key: 'GlossList' -array open '[' -map open '{' -key: 'ID' -string: 'SGML' -key: 'SortAs' -string: 'SGML' -key: 'GlossTerm' -string: 'Standard Generalized Markup Language' -key: 'Acronym' -string: 'SGML' -key: 'Abbrev' -string: 'ISO 8879:1986' -key: 'GlossDef' -string: 'A meta-markup language, used to create markup languages such as DocBook.' -key: 'GlossSeeAlso' -array open '[' -string: 'GML' -string: 'XML' -string: 'markup' -array close ']' -map close '}' -array close ']' -map close '}' -map close '}' -map close '}' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case_with_comments.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case_with_comments.json deleted file mode 100755 index 2463c71e32..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case_with_comments.json +++ /dev/null @@ -1 +0,0 @@ -{ "glossary": { /* you */ "title": /**/ "example glossary", /*should*/"GlossDiv": { "title": /*never*/"S", /*ever*/"GlossList": [ { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986", "GlossDef": "A meta-markup language, used to create markup languages such as DocBook.", /*see*/"GlossSeeAlso"/*this*/:/*coming*/[/*out*/"GML"/*of*/,/*the*/"XML"/*parser!*/, "markup"] /*hey*/}/*ho*/]/*hey*/}/*ho*/} } // and the parser won't even get this far, so chill. /* hah! diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case_with_comments.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case_with_comments.json.gold deleted file mode 100755 index c3adc117a0..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/difficult_json_c_test_case_with_comments.json.gold +++ /dev/null @@ -1,36 +0,0 @@ -map open '{' -key: 'glossary' -map open '{' -key: 'title' -string: 'example glossary' -key: 'GlossDiv' -map open '{' -key: 'title' -string: 'S' -key: 'GlossList' -array open '[' -map open '{' -key: 'ID' -string: 'SGML' -key: 'SortAs' -string: 'SGML' -key: 'GlossTerm' -string: 'Standard Generalized Markup Language' -key: 'Acronym' -string: 'SGML' -key: 'Abbrev' -string: 'ISO 8879:1986' -key: 'GlossDef' -string: 'A meta-markup language, used to create markup languages such as DocBook.' -key: 'GlossSeeAlso' -array open '[' -string: 'GML' -string: 'XML' -string: 'markup' -array close ']' -map close '}' -array close ']' -map close '}' -map close '}' -map close '}' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/doubles.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/doubles.json deleted file mode 100755 index 626f21cea3..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/doubles.json +++ /dev/null @@ -1 +0,0 @@ -[ 0.1e2, 1e1, 3.141569, 10000000000000e-10] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/doubles.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/doubles.json.gold deleted file mode 100755 index c0ea7265ed..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/doubles.json.gold +++ /dev/null @@ -1,7 +0,0 @@ -array open '[' -double: 10 -double: 10 -double: 3.14157 -double: 1000 -array close ']' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_array.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_array.json deleted file mode 100755 index 0637a088a0..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_array.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_array.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_array.json.gold deleted file mode 100755 index f069c8f19e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_array.json.gold +++ /dev/null @@ -1,3 +0,0 @@ -array open '[' -array close ']' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_string.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_string.json deleted file mode 100755 index e16c76dff8..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_string.json +++ /dev/null @@ -1 +0,0 @@ -"" diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_string.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_string.json.gold deleted file mode 100755 index c197bbaa91..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/empty_string.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -string: '' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_bulgarian.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_bulgarian.json deleted file mode 100755 index 9ce1d1ceaa..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_bulgarian.json +++ /dev/null @@ -1,4 +0,0 @@ -["\u0414\u0430", - "\u041c\u0443", - "\u0415\u0431\u0430", - "\u041c\u0430\u0439\u043a\u0430\u0442\u0430"] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_bulgarian.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_bulgarian.json.gold deleted file mode 100755 index a0c9ae99c9..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_bulgarian.json.gold +++ /dev/null @@ -1,7 +0,0 @@ -array open '[' -string: 'Да' -string: 'Му' -string: 'Еба' -string: 'Майката' -array close ']' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_foobar.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_foobar.json deleted file mode 100755 index 2c0e25f0a8..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_foobar.json +++ /dev/null @@ -1 +0,0 @@ -"\u0066\u006f\u006f\u0062\u0061\u0072" diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_foobar.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_foobar.json.gold deleted file mode 100755 index 5753c642fd..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/escaped_foobar.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -string: 'foobar' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false.json deleted file mode 100755 index c508d5366f..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false.json +++ /dev/null @@ -1 +0,0 @@ -false diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false.json.gold deleted file mode 100755 index e55fa1f891..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -bool: false -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false_then_garbage.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false_then_garbage.json deleted file mode 100755 index 78f4e96f12..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false_then_garbage.json +++ /dev/null @@ -1 +0,0 @@ -falsex \ No newline at end of file diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false_then_garbage.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false_then_garbage.json.gold deleted file mode 100755 index e55fa1f891..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/false_then_garbage.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -bool: false -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/four_byte_utf8.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/four_byte_utf8.json deleted file mode 100755 index 582c5752fb..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/four_byte_utf8.json +++ /dev/null @@ -1,2 +0,0 @@ -{ "U+10ABCD": "􊯍" } - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/four_byte_utf8.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/four_byte_utf8.json.gold deleted file mode 100755 index f6260f2099..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/four_byte_utf8.json.gold +++ /dev/null @@ -1,5 +0,0 @@ -map open '{' -key: 'U+10ABCD' -string: '􊯍' -map close '}' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/integers.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/integers.json deleted file mode 100755 index c50e4c9e8e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/integers.json +++ /dev/null @@ -1,3 +0,0 @@ -[ 1,2,3,4,5,6,7, - 123456789 , -123456789, - 2147483647, -2147483647 ] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/integers.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/integers.json.gold deleted file mode 100755 index 7ac4bee177..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/integers.json.gold +++ /dev/null @@ -1,14 +0,0 @@ -array open '[' -integer: 1 -integer: 2 -integer: 3 -integer: 4 -integer: 5 -integer: 6 -integer: 7 -integer: 123456789 -integer: -123456789 -integer: 2147483647 -integer: -2147483647 -array close ']' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/invalid_utf8.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/invalid_utf8.json deleted file mode 100755 index 12f1718aeb..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/invalid_utf8.json +++ /dev/null @@ -1 +0,0 @@ -["Да М Еба Майката"] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/invalid_utf8.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/invalid_utf8.json.gold deleted file mode 100755 index c0dec77000..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/invalid_utf8.json.gold +++ /dev/null @@ -1,3 +0,0 @@ -array open '[' -lexical error: invalid bytes in UTF8 string. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/isolated_surrogate_marker.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/isolated_surrogate_marker.json deleted file mode 100755 index 36959f434e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/isolated_surrogate_marker.json +++ /dev/null @@ -1 +0,0 @@ -"\ud800" diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/isolated_surrogate_marker.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/isolated_surrogate_marker.json.gold deleted file mode 100755 index cca172eeff..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/isolated_surrogate_marker.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -string: '?' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/leading_zero_in_number.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/leading_zero_in_number.json deleted file mode 100755 index 959f5ba5b1..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/leading_zero_in_number.json +++ /dev/null @@ -1 +0,0 @@ -{ "bad thing": 01 } diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/leading_zero_in_number.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/leading_zero_in_number.json.gold deleted file mode 100755 index 1a1580d0e4..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/leading_zero_in_number.json.gold +++ /dev/null @@ -1,5 +0,0 @@ -map open '{' -key: 'bad thing' -integer: 0 -parse error: after key and value, inside map, I expect ',' or '}' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_minus_sign.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_minus_sign.json deleted file mode 100755 index 85f69bda4a..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_minus_sign.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - "foo", true, - true, "blue", - "baby where are you?", "oh boo hoo!", - - -] - diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_minus_sign.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_minus_sign.json.gold deleted file mode 100755 index d15ede9be8..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_minus_sign.json.gold +++ /dev/null @@ -1,9 +0,0 @@ -array open '[' -string: 'foo' -bool: true -bool: true -string: 'blue' -string: 'baby where are you?' -string: 'oh boo hoo!' -lexical error: malformed number, a digit is required after the minus sign. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_number.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_number.json deleted file mode 100755 index e2e107ac61..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_number.json +++ /dev/null @@ -1 +0,0 @@ -123456789 \ No newline at end of file diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_number.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_number.json.gold deleted file mode 100755 index 181fdfa674..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/lonely_number.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -integer: 123456789 -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_close.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_close.json deleted file mode 100755 index 5c34318c21..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_close.json +++ /dev/null @@ -1 +0,0 @@ -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_close.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_close.json.gold deleted file mode 100755 index 972fd39064..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_close.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -parse error: unallowed token at this point in JSON text -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_open.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_open.json deleted file mode 100755 index 98232c64fc..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_open.json +++ /dev/null @@ -1 +0,0 @@ -{ diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_open.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_open.json.gold deleted file mode 100755 index ab1f33d43b..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/map_open.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -map open '{' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_decimal_point.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_decimal_point.json deleted file mode 100755 index 2369f4bffe..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_decimal_point.json +++ /dev/null @@ -1 +0,0 @@ -10.e2 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_decimal_point.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_decimal_point.json.gold deleted file mode 100755 index c2e7e2e482..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_decimal_point.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -lexical error: malformed number, a digit is required after the decimal point. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_exponent.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_exponent.json deleted file mode 100755 index a62b45d3e0..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_exponent.json +++ /dev/null @@ -1 +0,0 @@ -10e diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_exponent.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_exponent.json.gold deleted file mode 100755 index 5089681d77..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/missing_integer_after_exponent.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -lexical error: malformed number, a digit is required after the exponent. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/non_utf8_char_in_string.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/non_utf8_char_in_string.json deleted file mode 100755 index 253a664bf9..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/non_utf8_char_in_string.json +++ /dev/null @@ -1 +0,0 @@ -{"CoreletAPIVersion":2,"CoreletType":"standalone","documentation":"A corelet that provides the capability to upload a folders contents into a users locker.","functions":[{"documentation":"Displays a dialog box that allows user to select a folder on the local system.","name":"ShowBrowseDialog","parameters":[{"documentation":"The callback function for results.","name":"callback","required":true,"type":"callback"}]},{"documentation":"Uploads all mp3 files in the folder provided.","name":"UploadFolder","parameters":[{"documentation":"The path to upload mp3 files from.","name":"path","required":true,"type":"string"},{"documentation":"The callback function for progress.","name":"callback","required":true,"type":"callback"}]},{"documentation":"Returns the server name to the current locker service.","name":"GetLockerService","parameters":[]},{"documentation":"Changes the name of the locker service.","name":"SetLockerService","parameters":[{"documentation":"The value of the locker service to set active.","name":"LockerService","required":true,"type":"string"}]},{"documentation":"Downloads locker files to the suggested folder.","name":"DownloadFile","parameters":[{"documentation":"The origin path of the locker file.","name":"path","required":true,"type":"string"},{"documentation":"The Window destination path of the locker file.","name":"destination","required":true,"type":"integer"},{"documentation":"The callback function for progress.","name":"callback","required":true,"type":"callback"}]}],"name":"LockerUploader","version":{"major":0,"micro":1,"minor":0},"versionString":"0.0.1"} \ No newline at end of file diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/non_utf8_char_in_string.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/non_utf8_char_in_string.json.gold deleted file mode 100755 index 5e3c580750..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/non_utf8_char_in_string.json.gold +++ /dev/null @@ -1,8 +0,0 @@ -map open '{' -key: 'CoreletAPIVersion' -integer: 2 -key: 'CoreletType' -string: 'standalone' -key: 'documentation' -lexical error: invalid bytes in UTF8 string. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null.json deleted file mode 100755 index 19765bd501..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null.json +++ /dev/null @@ -1 +0,0 @@ -null diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null.json.gold deleted file mode 100755 index 94ad0fabe1..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -null -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null_then_garbage.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null_then_garbage.json deleted file mode 100755 index 7b65b3567e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null_then_garbage.json +++ /dev/null @@ -1 +0,0 @@ -nullx diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null_then_garbage.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null_then_garbage.json.gold deleted file mode 100755 index 94ad0fabe1..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/null_then_garbage.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -null -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/nulls_and_bools.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/nulls_and_bools.json deleted file mode 100755 index 65eb01f16f..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/nulls_and_bools.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "boolean, true": true, - "boolean, false": false, - "null": null -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/nulls_and_bools.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/nulls_and_bools.json.gold deleted file mode 100755 index 51f990ba8e..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/nulls_and_bools.json.gold +++ /dev/null @@ -1,9 +0,0 @@ -map open '{' -key: 'boolean, true' -bool: true -key: 'boolean, false' -bool: false -key: 'null' -null -map close '}' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple.json deleted file mode 100755 index 9ed80c9ae6..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "this": "is", - "really": "simple", - "json": "right?" -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple.json.gold deleted file mode 100755 index 80fcad2f84..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple.json.gold +++ /dev/null @@ -1,9 +0,0 @@ -map open '{' -key: 'this' -string: 'is' -key: 'really' -string: 'simple' -key: 'json' -string: 'right?' -map close '}' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple_with_comments.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple_with_comments.json deleted file mode 100755 index 3b79bba974..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple_with_comments.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "this": "is", // ignore this - "really": "simple", - /* ignore -this -too * / -** // -(/ -******/ - "json": "right?" -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple_with_comments.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple_with_comments.json.gold deleted file mode 100755 index 80fcad2f84..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/simple_with_comments.json.gold +++ /dev/null @@ -1,9 +0,0 @@ -map open '{' -key: 'this' -string: 'is' -key: 'really' -string: 'simple' -key: 'json' -string: 'right?' -map close '}' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_escape.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_escape.json deleted file mode 100755 index c5541820d5..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_escape.json +++ /dev/null @@ -1 +0,0 @@ -["\n foo \/ bar \r\f\\\uffff\t\b\"\\ and you can't escape thi\s"] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_escape.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_escape.json.gold deleted file mode 100755 index 439df432f5..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_escape.json.gold +++ /dev/null @@ -1,3 +0,0 @@ -array open '[' -lexical error: inside a string, '\' occurs before a character which it may not. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_hex_char.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_hex_char.json deleted file mode 100755 index bde7ee97d7..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_hex_char.json +++ /dev/null @@ -1 +0,0 @@ -"foo foo, blah blah \u0123 \u4567 \u89ab \uc/ef \uABCD \uEFFE bar baz bing" diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_hex_char.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_hex_char.json.gold deleted file mode 100755 index 84987920c6..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_invalid_hex_char.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -lexical error: invalid (non-hex) character occurs after '\u' inside string. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_escapes.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_escapes.json deleted file mode 100755 index 59cc94013b..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_escapes.json +++ /dev/null @@ -1,3 +0,0 @@ -["\n foo \/ bar \r\f\\\uffff\t\b\"\\", - "\"and this string has an escape at the beginning", - "and this string has no escapes" ] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_escapes.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_escapes.json.gold deleted file mode 100755 index 086a9dcc55..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_escapes.json.gold +++ /dev/null @@ -1,7 +0,0 @@ -array open '[' -string: ' - foo / bar \￿ "\' -string: '"and this string has an escape at the beginning' -string: 'and this string has no escapes' -array close ']' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_invalid_newline.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_invalid_newline.json deleted file mode 100755 index 0e3ea0d545..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_invalid_newline.json +++ /dev/null @@ -1,2 +0,0 @@ -"la di dah. this is a string, and I can do this, \n, but not this -" diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_invalid_newline.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_invalid_newline.json.gold deleted file mode 100755 index c38bdef069..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/string_with_invalid_newline.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -lexical error: invalid character inside string. -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/three_byte_utf8.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/three_byte_utf8.json deleted file mode 100755 index 9c9e656b82..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/three_byte_utf8.json +++ /dev/null @@ -1 +0,0 @@ -{"matzue": "松江", "asakusa": "浅草"} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/three_byte_utf8.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/three_byte_utf8.json.gold deleted file mode 100755 index 7d95faea86..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/three_byte_utf8.json.gold +++ /dev/null @@ -1,7 +0,0 @@ -map open '{' -key: 'matzue' -string: '松江' -key: 'asakusa' -string: '浅草' -map close '}' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true.json deleted file mode 100755 index 27ba77ddaf..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true.json +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true.json.gold deleted file mode 100755 index 0858bf74e4..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -bool: true -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true_then_garbage.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true_then_garbage.json deleted file mode 100755 index 9151612501..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true_then_garbage.json +++ /dev/null @@ -1 +0,0 @@ -truex \ No newline at end of file diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true_then_garbage.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true_then_garbage.json.gold deleted file mode 100755 index 0858bf74e4..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/true_then_garbage.json.gold +++ /dev/null @@ -1,2 +0,0 @@ -bool: true -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/unescaped_bulgarian.json b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/unescaped_bulgarian.json deleted file mode 100755 index f9a70a60a7..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/unescaped_bulgarian.json +++ /dev/null @@ -1 +0,0 @@ -["Да Му Еба Майката"] diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/unescaped_bulgarian.json.gold b/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/unescaped_bulgarian.json.gold deleted file mode 100755 index 8db076e3e2..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/cases/unescaped_bulgarian.json.gold +++ /dev/null @@ -1,4 +0,0 @@ -array open '[' -string: 'Да Му Еба Майката' -array close ']' -memory leaks: 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/run_tests.sh b/src/extThree20JSON/Vendors/YAJL/yajl/test/run_tests.sh deleted file mode 100755 index f5063edec5..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/run_tests.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash - -DIFF_FLAGS="-u" -if [[ `uname` == *W32* ]] ; then - DIFF_FLAGS="-wu" -fi - -if [ -z "$testBin" ]; then - testBin="$1" -fi - -# find test binary on both platforms. allow the caller to force a -# particular test binary (useful for non-cmake build systems). -if [ -z "$testBin" ]; then - testBin="../build/test/Debug/yajl_test.exe" - if [[ ! -x $testBin ]] ; then - testBin="../build/test/yajl_test" - if [[ ! -x $testBin ]] ; then - echo "cannot execute test binary: '$testBin'" - exit 1; - fi - fi -fi - -echo "using test binary: $testBin" - -let testsSucceeded=0 -let testsTotal=0 - -for file in cases/*.json ; do - allowComments="-c" - - # if the filename starts with dc_, we disallow comments for this test - if [[ $(basename $file) == dc_* ]] ; then - allowComments="" - fi - echo -n " test case: '$file': " - let iter=1 - success="success" - - # parse with a read buffer size ranging from 1-31 to stress stream parsing - while (( $iter < 32 )) && [ $success == "success" ] ; do - $testBin $allowComments -b $iter < $file > ${file}.test 2>&1 - diff ${DIFF_FLAGS} ${file}.gold ${file}.test - if [[ $? == 0 ]] ; then - if (( $iter == 31 )) ; then let testsSucceeded+=1 ; fi - else - success="FAILURE" - let iter=32 - fi - let iter+=1 - rm ${file}.test - done - - echo $success - let testsTotal+=1 -done - -echo $testsSucceeded/$testsTotal tests successful - -if [[ $testsSucceeded != $testsTotal ]] ; then - exit 1 -fi - -exit 0 diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/test/yajl_test.c b/src/extThree20JSON/Vendors/YAJL/yajl/test/yajl_test.c deleted file mode 100755 index 0f07a9483c..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/test/yajl_test.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -#include -#include -#include - -#include - -/* memory debugging routines */ -typedef struct -{ - unsigned int numFrees; - unsigned int numMallocs; - /* XXX: we really need a hash table here with per-allocation - * information */ -} yajlTestMemoryContext; - -/* cast void * into context */ -#define TEST_CTX(vptr) ((yajlTestMemoryContext *) (vptr)) - -static void yajlTestFree(void * ctx, void * ptr) -{ - assert(ptr != NULL); - TEST_CTX(ctx)->numFrees++; - free(ptr); -} - -static void * yajlTestMalloc(void * ctx, unsigned int sz) -{ - assert(sz != 0); - TEST_CTX(ctx)->numMallocs++; - return malloc(sz); -} - -static void * yajlTestRealloc(void * ctx, void * ptr, unsigned int sz) -{ - if (ptr == NULL) { - assert(sz != 0); - TEST_CTX(ctx)->numMallocs++; - } else if (sz == 0) { - TEST_CTX(ctx)->numFrees++; - } - - return realloc(ptr, sz); -} - - -/* begin parsing callback routines */ -#define BUF_SIZE 2048 - -static int test_yajl_null(void *ctx) -{ - printf("null\n"); - return 1; -} - -static int test_yajl_boolean(void * ctx, int boolVal) -{ - printf("bool: %s\n", boolVal ? "true" : "false"); - return 1; -} - -static int test_yajl_integer(void *ctx, long integerVal) -{ - printf("integer: %ld\n", integerVal); - return 1; -} - -static int test_yajl_double(void *ctx, double doubleVal) -{ - printf("double: %g\n", doubleVal); - return 1; -} - -static int test_yajl_string(void *ctx, const unsigned char * stringVal, - unsigned int stringLen) -{ - printf("string: '"); - fwrite(stringVal, 1, stringLen, stdout); - printf("'\n"); - return 1; -} - -static int test_yajl_map_key(void *ctx, const unsigned char * stringVal, - unsigned int stringLen) -{ - char * str = (char *) malloc(stringLen + 1); - str[stringLen] = 0; - memcpy(str, stringVal, stringLen); - printf("key: '%s'\n", str); - free(str); - return 1; -} - -static int test_yajl_start_map(void *ctx) -{ - printf("map open '{'\n"); - return 1; -} - - -static int test_yajl_end_map(void *ctx) -{ - printf("map close '}'\n"); - return 1; -} - -static int test_yajl_start_array(void *ctx) -{ - printf("array open '['\n"); - return 1; -} - -static int test_yajl_end_array(void *ctx) -{ - printf("array close ']'\n"); - return 1; -} - -static yajl_callbacks callbacks = { - test_yajl_null, - test_yajl_boolean, - test_yajl_integer, - test_yajl_double, - NULL, - test_yajl_string, - test_yajl_start_map, - test_yajl_map_key, - test_yajl_end_map, - test_yajl_start_array, - test_yajl_end_array -}; - -static void usage(const char * progname) -{ - fprintf(stderr, - "usage: %s [options] \n" - " -c allow comments\n" - " -b set the read buffer size\n", - progname); - exit(1); -} - -int -main(int argc, char ** argv) -{ - yajl_handle hand; - const char * fileName; - static unsigned char * fileData = NULL; - unsigned int bufSize = BUF_SIZE; - yajl_status stat; - size_t rd; - yajl_parser_config cfg = { 0, 1 }; - int i, j, done; - - /* memory allocation debugging: allocate a structure which collects - * statistics */ - yajlTestMemoryContext memCtx = { 0,0 }; - - /* memory allocation debugging: allocate a structure which holds - * allocation routines */ - yajl_alloc_funcs allocFuncs = { - yajlTestMalloc, - yajlTestRealloc, - yajlTestFree, - (void *) NULL - }; - - allocFuncs.ctx = (void *) &memCtx; - - /* check arguments. We expect exactly one! */ - for (i=1;i= argc) usage(argv[0]); - - /* validate integer */ - for (j=0;j<(int)strlen(argv[i]);j++) { - if (argv[i][j] <= '9' && argv[i][j] >= '0') continue; - fprintf(stderr, "-b requires an integer argument. '%s' " - "is invalid\n", argv[i]); - usage(argv[0]); - } - - bufSize = atoi(argv[i]); - if (!bufSize) { - fprintf(stderr, "%d is an invalid buffer size\n", - bufSize); - } - } else { - fprintf(stderr, "invalid command line option: '%s'\n", - argv[i]); - usage(argv[0]); - } - } - - fileData = (unsigned char *) malloc(bufSize); - - if (fileData == NULL) { - fprintf(stderr, - "failed to allocate read buffer of %u bytes, exiting.", - bufSize); - exit(2); - } - - fileName = argv[argc-1]; - - /* ok. open file. let's read and parse */ - hand = yajl_alloc(&callbacks, &cfg, &allocFuncs, NULL); - - done = 0; - while (!done) { - rd = fread((void *) fileData, 1, bufSize, stdin); - - if (rd == 0) { - if (!feof(stdin)) { - fprintf(stderr, "error reading from '%s'\n", fileName); - break; - } - done = 1; - } - - if (done) - /* parse any remaining buffered data */ - stat = yajl_parse_complete(hand); - else - /* read file data, pass to parser */ - stat = yajl_parse(hand, fileData, rd); - - if (stat != yajl_status_insufficient_data && - stat != yajl_status_ok) - { - unsigned char * str = yajl_get_error(hand, 0, fileData, rd); - fflush(stdout); - fprintf(stderr, "%s", (char *) str); - yajl_free_error(hand, str); - break; - } - } - - yajl_free(hand); - free(fileData); - - /* finally, print out some memory statistics */ - -/* (lth) only print leaks here, as allocations and frees may vary depending - * on read buffer size, causing false failures. - * - * printf("allocations:\t%u\n", memCtx.numMallocs); - * printf("frees:\t\t%u\n", memCtx.numFrees); -*/ - fflush(stderr); - fflush(stdout); - printf("memory leaks:\t%u\n", memCtx.numMallocs - memCtx.numFrees); - - return 0; -} diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/verify/CMakeLists.txt b/src/extThree20JSON/Vendors/YAJL/yajl/verify/CMakeLists.txt deleted file mode 100755 index 34f9f2e419..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/verify/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2010, Lloyd Hilaiel. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# 3. Neither the name of Lloyd Hilaiel nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# set up some paths -SET (binDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/bin) - -# create some directories -FILE(MAKE_DIRECTORY ${binDir}) - -SET (SRCS json_verify.c) - -# use the library we build, duh. -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include) -LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) - -ADD_EXECUTABLE(json_verify ${SRCS}) - -TARGET_LINK_LIBRARIES(json_verify yajl_s) - -# copy in the binary -GET_TARGET_PROPERTY(binPath json_verify LOCATION) - -ADD_CUSTOM_COMMAND(TARGET json_verify POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir}) - -IF (NOT WIN32) - INSTALL(TARGETS json_verify RUNTIME DESTINATION bin) -ENDIF () diff --git a/src/extThree20JSON/Vendors/YAJL/yajl/verify/json_verify.c b/src/extThree20JSON/Vendors/YAJL/yajl/verify/json_verify.c deleted file mode 100755 index 9281a4c5ba..0000000000 --- a/src/extThree20JSON/Vendors/YAJL/yajl/verify/json_verify.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2010, Lloyd Hilaiel. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. Neither the name of Lloyd Hilaiel nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include - -#include -#include -#include - -static void -usage(const char * progname) -{ - fprintf(stderr, "%s: validate json from stdin\n" - "usage: json_verify [options]\n" - " -q quiet mode\n" - " -c allow comments\n" - " -u allow invalid utf8 inside strings\n", - progname); - exit(1); -} - -int -main(int argc, char ** argv) -{ - yajl_status stat; - size_t rd; - yajl_handle hand; - static unsigned char fileData[65536]; - int quiet = 0; - int retval = 0, done = 0; - yajl_parser_config cfg = { 0, 1 }; - - /* check arguments.*/ - int a = 1; - while ((a < argc) && (argv[a][0] == '-') && (strlen(argv[a]) > 1)) { - unsigned int i; - for ( i=1; i < strlen(argv[a]); i++) { - switch (argv[a][i]) { - case 'q': - quiet = 1; - break; - case 'c': - cfg.allowComments = 1; - break; - case 'u': - cfg.checkUTF8 = 0; - break; - default: - fprintf(stderr, "unrecognized option: '%c'\n\n", argv[a][i]); - usage(argv[0]); - } - } - ++a; - } - if (a < argc) { - usage(argv[0]); - } - - /* allocate a parser */ - hand = yajl_alloc(NULL, &cfg, NULL, NULL); - - while (!done) { - rd = fread((void *) fileData, 1, sizeof(fileData) - 1, stdin); - - retval = 0; - - if (rd == 0) { - if (!feof(stdin)) { - if (!quiet) { - fprintf(stderr, "error encountered on file read\n"); - } - retval = 1; - break; - } - done = 1; - } - fileData[rd] = 0; - - if (done) - /* parse any remaining buffered data */ - stat = yajl_parse_complete(hand); - else - /* read file data, pass to parser */ - stat = yajl_parse(hand, fileData, rd); - - if (stat != yajl_status_ok && - stat != yajl_status_insufficient_data) - { - if (!quiet) { - unsigned char * str = yajl_get_error(hand, 1, fileData, rd); - fprintf(stderr, "%s", (const char *) str); - yajl_free_error(hand, str); - } - retval = 1; - break; - } - } - - yajl_free(hand); - - if (!quiet) { - printf("JSON is %s\n", retval ? "invalid" : "valid"); - } - - return retval; -} diff --git a/src/extThree20JSON/extThree20JSON.xcodeproj/project.pbxproj b/src/extThree20JSON/extThree20JSON.xcodeproj/project.pbxproj deleted file mode 100755 index d0082d7d27..0000000000 --- a/src/extThree20JSON/extThree20JSON.xcodeproj/project.pbxproj +++ /dev/null @@ -1,996 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 6609981B129397F5007B1E07 /* TTExtensionLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 66099817129397F5007B1E07 /* TTExtensionLoader.m */; }; - 6609981F129397F5007B1E07 /* TTExtensionLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 66099817129397F5007B1E07 /* TTExtensionLoader.m */; }; - 6609982212939800007B1E07 /* TTExtensionLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 6609982012939800007B1E07 /* TTExtensionLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6609982412939800007B1E07 /* TTExtensionLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 6609982012939800007B1E07 /* TTExtensionLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6609987112939B06007B1E07 /* GTMBase64.h in Headers */ = {isa = PBXBuildFile; fileRef = 6609986D12939B06007B1E07 /* GTMBase64.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6609987212939B06007B1E07 /* GTMBase64.m in Sources */ = {isa = PBXBuildFile; fileRef = 6609986E12939B06007B1E07 /* GTMBase64.m */; }; - 664B29E912848B1A0008D569 /* TTErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 664B29E812848B1A0008D569 /* TTErrorCodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 664B29EC12848B1A0008D569 /* TTErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 664B29E812848B1A0008D569 /* TTErrorCodes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 664B29F012848B270008D569 /* TTErrorCodes.m in Sources */ = {isa = PBXBuildFile; fileRef = 664B29EF12848B270008D569 /* TTErrorCodes.m */; }; - 664B29F312848B270008D569 /* TTErrorCodes.m in Sources */ = {isa = PBXBuildFile; fileRef = 664B29EF12848B270008D569 /* TTErrorCodes.m */; }; - 66E71B9112938CE3007134B0 /* yajl_common.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B5A12938CE3007134B0 /* yajl_common.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66E71B9212938CE3007134B0 /* yajl_gen.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B5B12938CE3007134B0 /* yajl_gen.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66E71B9312938CE3007134B0 /* yajl_parse.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B5C12938CE3007134B0 /* yajl_parse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 66E71B9412938CE3007134B0 /* yajl.c in Sources */ = {isa = PBXBuildFile; fileRef = 66E71B6012938CE3007134B0 /* yajl.c */; }; - 66E71B9512938CE3007134B0 /* yajl_alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 66E71B6212938CE3007134B0 /* yajl_alloc.c */; }; - 66E71B9612938CE3007134B0 /* yajl_alloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B6312938CE3007134B0 /* yajl_alloc.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 66E71B9712938CE3007134B0 /* yajl_buf.c in Sources */ = {isa = PBXBuildFile; fileRef = 66E71B6412938CE3007134B0 /* yajl_buf.c */; }; - 66E71B9812938CE3007134B0 /* yajl_buf.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B6512938CE3007134B0 /* yajl_buf.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 66E71B9912938CE3007134B0 /* yajl_bytestack.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B6612938CE3007134B0 /* yajl_bytestack.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 66E71B9A12938CE3007134B0 /* yajl_encode.c in Sources */ = {isa = PBXBuildFile; fileRef = 66E71B6712938CE3007134B0 /* yajl_encode.c */; }; - 66E71B9B12938CE3007134B0 /* yajl_encode.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B6812938CE3007134B0 /* yajl_encode.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 66E71B9C12938CE3007134B0 /* yajl_gen.c in Sources */ = {isa = PBXBuildFile; fileRef = 66E71B6912938CE3007134B0 /* yajl_gen.c */; }; - 66E71B9D12938CE3007134B0 /* yajl_lex.c in Sources */ = {isa = PBXBuildFile; fileRef = 66E71B6A12938CE3007134B0 /* yajl_lex.c */; }; - 66E71B9E12938CE3007134B0 /* yajl_lex.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B6B12938CE3007134B0 /* yajl_lex.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 66E71B9F12938CE3007134B0 /* yajl_parser.c in Sources */ = {isa = PBXBuildFile; fileRef = 66E71B6C12938CE3007134B0 /* yajl_parser.c */; }; - 66E71BA012938CE3007134B0 /* yajl_parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71B6D12938CE3007134B0 /* yajl_parser.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 66E71BA112938CE3007134B0 /* yajl_version.c in Sources */ = {isa = PBXBuildFile; fileRef = 66E71B6E12938CE3007134B0 /* yajl_version.c */; }; - 66E71BA812938CF8007134B0 /* yajl_version.h in Headers */ = {isa = PBXBuildFile; fileRef = 66E71BA512938CF8007134B0 /* yajl_version.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645A1D11876C9800F08CB1 /* TTURLJSONResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645A1A11876C9800F08CB1 /* TTURLJSONResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645A1E11876C9800F08CB1 /* TTURLJSONResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645A1C11876C9800F08CB1 /* TTURLJSONResponse.m */; }; - 6E645A3011876CA800F08CB1 /* JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645A2211876CA800F08CB1 /* JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645A3111876CA800F08CB1 /* NSObject+SBJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645A2311876CA800F08CB1 /* NSObject+SBJSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645A3211876CA800F08CB1 /* NSObject+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645A2411876CA800F08CB1 /* NSObject+SBJSON.m */; }; - 6E645A3311876CA800F08CB1 /* NSString+SBJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645A2511876CA800F08CB1 /* NSString+SBJSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645A3411876CA800F08CB1 /* NSString+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645A2611876CA800F08CB1 /* NSString+SBJSON.m */; }; - 6E645A3711876CA800F08CB1 /* SBJsonBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645A2A11876CA800F08CB1 /* SBJsonBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 6E645A3811876CA800F08CB1 /* SBJsonBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645A2B11876CA800F08CB1 /* SBJsonBase.m */; }; - 6E645A3911876CA800F08CB1 /* SBJsonParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645A2C11876CA800F08CB1 /* SBJsonParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645A3A11876CA800F08CB1 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645A2D11876CA800F08CB1 /* SBJsonParser.m */; }; - 6E645A3B11876CA800F08CB1 /* SBJsonWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645A2E11876CA800F08CB1 /* SBJsonWriter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645A3C11876CA800F08CB1 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645A2F11876CA800F08CB1 /* SBJsonWriter.m */; }; - 6E645A9A11876E0400F08CB1 /* extJSONTests+SBJSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645A6511876D2900F08CB1 /* extJSONTests+SBJSON.m */; }; - 6E645AA111876E2B00F08CB1 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E645A7011876D3F00F08CB1 /* libThree20Core.a */; }; - 6E645AA211876E2D00F08CB1 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E645A7911876D4600F08CB1 /* libThree20Network.a */; }; - 6E645BA91187751200F08CB1 /* TTURLJSONResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645A1A11876C9800F08CB1 /* TTURLJSONResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645BB21187751200F08CB1 /* NSObject+YAJL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645AFD1187744C00F08CB1 /* NSObject+YAJL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645BBC1187751200F08CB1 /* YAJL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645B7C1187744D00F08CB1 /* YAJL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645BBD1187751200F08CB1 /* YAJLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645B7D1187744D00F08CB1 /* YAJLDocument.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645BBE1187751200F08CB1 /* YAJLGen.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645B7F1187744D00F08CB1 /* YAJLGen.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645BBF1187751200F08CB1 /* YAJLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E645B811187744D00F08CB1 /* YAJLParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E645BC11187751200F08CB1 /* TTURLJSONResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645A1C11876C9800F08CB1 /* TTURLJSONResponse.m */; }; - 6E645BC91187751200F08CB1 /* NSObject+YAJL.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645AFE1187744C00F08CB1 /* NSObject+YAJL.m */; }; - 6E645BD11187751200F08CB1 /* YAJLDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645B7E1187744D00F08CB1 /* YAJLDocument.m */; }; - 6E645BD21187751200F08CB1 /* YAJLGen.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645B801187744D00F08CB1 /* YAJLGen.m */; }; - 6E645BD31187751200F08CB1 /* YAJLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E645B821187744D00F08CB1 /* YAJLParser.m */; }; - 6E6462121187DD2F00F08CB1 /* extThree20JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6462111187DD2A00F08CB1 /* extThree20JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E6462131187DD3300F08CB1 /* extThree20JSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E6462111187DD2A00F08CB1 /* extThree20JSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EB460DA1183D8CB00685649 /* libextThree20JSON+SBJSON.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libextThree20JSON+SBJSON.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E645A6F11876D3F00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645A7111876D3F00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645A7811876D4600F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E645A7A11876D4600F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645A7C11876D5800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645A7E11876D5800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E645AA511876E3500F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645AA711876E3500F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645BA51187751200F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645BA71187751200F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6EB460DD1183D8D400685649 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = extThree20JSON; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 66099817129397F5007B1E07 /* TTExtensionLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTExtensionLoader.m; path = Source/TTExtensionLoader.m; sourceTree = ""; }; - 6609982012939800007B1E07 /* TTExtensionLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionLoader.h; path = Headers/TTExtensionLoader.h; sourceTree = ""; }; - 6609986D12939B06007B1E07 /* GTMBase64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMBase64.h; sourceTree = ""; }; - 6609986E12939B06007B1E07 /* GTMBase64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMBase64.m; sourceTree = ""; }; - 663DB06D12661EE900CF8CEA /* Library+YAJL.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "Library+YAJL.xcconfig"; path = "Configurations/Library+YAJL.xcconfig"; sourceTree = ""; }; - 664B29E812848B1A0008D569 /* TTErrorCodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTErrorCodes.h; path = Headers/TTErrorCodes.h; sourceTree = ""; }; - 664B29EF12848B270008D569 /* TTErrorCodes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTErrorCodes.m; path = Source/TTErrorCodes.m; sourceTree = ""; }; - 66E71A0312938B22007134B0 /* Changes.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Changes.markdown; sourceTree = ""; }; - 66E71A0412938B22007134B0 /* Credits.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Credits.markdown; sourceTree = ""; }; - 66E71A0512938B22007134B0 /* Readme.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Readme.markdown; sourceTree = ""; }; - 66E71B5A12938CE3007134B0 /* yajl_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_common.h; sourceTree = ""; }; - 66E71B5B12938CE3007134B0 /* yajl_gen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_gen.h; sourceTree = ""; }; - 66E71B5C12938CE3007134B0 /* yajl_parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_parse.h; sourceTree = ""; }; - 66E71B5D12938CE3007134B0 /* yajl_version.h.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = yajl_version.h.cmake; sourceTree = ""; }; - 66E71B5E12938CE3007134B0 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = ""; }; - 66E71B5F12938CE3007134B0 /* yajl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = yajl; sourceTree = ""; }; - 66E71B6012938CE3007134B0 /* yajl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yajl.c; sourceTree = ""; }; - 66E71B6112938CE3007134B0 /* YAJL.dxy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = YAJL.dxy; sourceTree = ""; }; - 66E71B6212938CE3007134B0 /* yajl_alloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yajl_alloc.c; sourceTree = ""; }; - 66E71B6312938CE3007134B0 /* yajl_alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_alloc.h; sourceTree = ""; }; - 66E71B6412938CE3007134B0 /* yajl_buf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yajl_buf.c; sourceTree = ""; }; - 66E71B6512938CE3007134B0 /* yajl_buf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_buf.h; sourceTree = ""; }; - 66E71B6612938CE3007134B0 /* yajl_bytestack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_bytestack.h; sourceTree = ""; }; - 66E71B6712938CE3007134B0 /* yajl_encode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yajl_encode.c; sourceTree = ""; }; - 66E71B6812938CE3007134B0 /* yajl_encode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_encode.h; sourceTree = ""; }; - 66E71B6912938CE3007134B0 /* yajl_gen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yajl_gen.c; sourceTree = ""; }; - 66E71B6A12938CE3007134B0 /* yajl_lex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yajl_lex.c; sourceTree = ""; }; - 66E71B6B12938CE3007134B0 /* yajl_lex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_lex.h; sourceTree = ""; }; - 66E71B6C12938CE3007134B0 /* yajl_parser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yajl_parser.c; sourceTree = ""; }; - 66E71B6D12938CE3007134B0 /* yajl_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_parser.h; sourceTree = ""; }; - 66E71B6E12938CE3007134B0 /* yajl_version.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = yajl_version.c; sourceTree = ""; }; - 66E71BA512938CF8007134B0 /* yajl_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = yajl_version.h; sourceTree = ""; }; - 6E55A4B31183CA80002768DE /* Library+SBJSON.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "Library+SBJSON.xcconfig"; path = "Configurations/Library+SBJSON.xcconfig"; sourceTree = ""; }; - 6E6454021184BDD500F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E645A1A11876C9800F08CB1 /* TTURLJSONResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLJSONResponse.h; path = Headers/TTURLJSONResponse.h; sourceTree = ""; }; - 6E645A1C11876C9800F08CB1 /* TTURLJSONResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLJSONResponse.m; path = Source/TTURLJSONResponse.m; sourceTree = ""; }; - 6E645A2211876CA800F08CB1 /* JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSON.h; sourceTree = ""; }; - 6E645A2311876CA800F08CB1 /* NSObject+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+SBJSON.h"; sourceTree = ""; }; - 6E645A2411876CA800F08CB1 /* NSObject+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SBJSON.m"; sourceTree = ""; }; - 6E645A2511876CA800F08CB1 /* NSString+SBJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+SBJSON.h"; sourceTree = ""; }; - 6E645A2611876CA800F08CB1 /* NSString+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+SBJSON.m"; sourceTree = ""; }; - 6E645A2A11876CA800F08CB1 /* SBJsonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonBase.h; sourceTree = ""; }; - 6E645A2B11876CA800F08CB1 /* SBJsonBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonBase.m; sourceTree = ""; }; - 6E645A2C11876CA800F08CB1 /* SBJsonParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonParser.h; sourceTree = ""; }; - 6E645A2D11876CA800F08CB1 /* SBJsonParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonParser.m; sourceTree = ""; }; - 6E645A2E11876CA800F08CB1 /* SBJsonWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SBJsonWriter.h; sourceTree = ""; }; - 6E645A2F11876CA800F08CB1 /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonWriter.m; sourceTree = ""; }; - 6E645A6511876D2900F08CB1 /* extJSONTests+SBJSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "extJSONTests+SBJSON.m"; path = "UnitTests/extJSONTests+SBJSON.m"; sourceTree = ""; }; - 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E645AFC1187744C00F08CB1 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 6E645AFD1187744C00F08CB1 /* NSObject+YAJL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+YAJL.h"; sourceTree = ""; }; - 6E645AFE1187744C00F08CB1 /* NSObject+YAJL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+YAJL.m"; sourceTree = ""; }; - 6E645AFF1187744C00F08CB1 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; - 6E645B7C1187744D00F08CB1 /* YAJL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YAJL.h; sourceTree = ""; }; - 6E645B7D1187744D00F08CB1 /* YAJLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YAJLDocument.h; sourceTree = ""; }; - 6E645B7E1187744D00F08CB1 /* YAJLDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YAJLDocument.m; sourceTree = ""; }; - 6E645B7F1187744D00F08CB1 /* YAJLGen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YAJLGen.h; sourceTree = ""; }; - 6E645B801187744D00F08CB1 /* YAJLGen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YAJLGen.m; sourceTree = ""; }; - 6E645B811187744D00F08CB1 /* YAJLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YAJLParser.h; sourceTree = ""; }; - 6E645B821187744D00F08CB1 /* YAJLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YAJLParser.m; sourceTree = ""; }; - 6E645BD91187751200F08CB1 /* libextThree20JSON+YAJL.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libextThree20JSON+YAJL.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 6E645BF71187771D00F08CB1 /* extThree20JSON+SBJSON_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "extThree20JSON+SBJSON_Prefix.pch"; path = "Headers/extThree20JSON+SBJSON_Prefix.pch"; sourceTree = ""; }; - 6E645BF81187771D00F08CB1 /* extThree20JSON+YAJL_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "extThree20JSON+YAJL_Prefix.pch"; path = "Headers/extThree20JSON+YAJL_Prefix.pch"; sourceTree = ""; }; - 6E6462111187DD2A00F08CB1 /* extThree20JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extThree20JSON.h; path = Headers/extThree20JSON.h; sourceTree = ""; }; - 6EB460921183D16000685649 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EB460A61183D2AC00685649 /* UnitTests+SBJSON.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "UnitTests+SBJSON.xcconfig"; path = "Configurations/UnitTests+SBJSON.xcconfig"; sourceTree = ""; }; - BEF31F3A0F352DF5000DE5D2 /* libextThree20JSON+SBJSON.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libextThree20JSON+SBJSON.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* extJSONUnitTests+SBJSON.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "extJSONUnitTests+SBJSON.octest"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 6E645BD41187751200F08CB1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6EB460DA1183D8CB00685649 /* libextThree20JSON+SBJSON.a in Frameworks */, - 6E645AA111876E2B00F08CB1 /* libThree20Core.a in Frameworks */, - 6E645AA211876E2D00F08CB1 /* libThree20Network.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libextThree20JSON+SBJSON.a */, - 6E645BD91187751200F08CB1 /* libextThree20JSON+YAJL.a */, - EB9E6C6210B6A8F800DE563C /* extJSONUnitTests+SBJSON.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6E6462111187DD2A00F08CB1 /* extThree20JSON.h */, - 6E645BF71187771D00F08CB1 /* extThree20JSON+SBJSON_Prefix.pch */, - 6E645BF81187771D00F08CB1 /* extThree20JSON+YAJL_Prefix.pch */, - 6609982012939800007B1E07 /* TTExtensionLoader.h */, - 66099817129397F5007B1E07 /* TTExtensionLoader.m */, - 6EB4609C1183D1E000685649 /* Source */, - 6E645A4311876CFE00F08CB1 /* Dependencies */, - 6ED118E41183C38A0096AEBF /* Configurations */, - 6ED117ED1183BE770096AEBF /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 66E71B5812938CE3007134B0 /* src */ = { - isa = PBXGroup; - children = ( - 66E71B5912938CE3007134B0 /* api */, - 66E71B5E12938CE3007134B0 /* CMakeLists.txt */, - 66E71B5F12938CE3007134B0 /* yajl */, - 66E71B6012938CE3007134B0 /* yajl.c */, - 66E71B6112938CE3007134B0 /* YAJL.dxy */, - 66E71B6212938CE3007134B0 /* yajl_alloc.c */, - 66E71B6312938CE3007134B0 /* yajl_alloc.h */, - 66E71B6412938CE3007134B0 /* yajl_buf.c */, - 66E71B6512938CE3007134B0 /* yajl_buf.h */, - 66E71B6612938CE3007134B0 /* yajl_bytestack.h */, - 66E71B6712938CE3007134B0 /* yajl_encode.c */, - 66E71B6812938CE3007134B0 /* yajl_encode.h */, - 66E71B6912938CE3007134B0 /* yajl_gen.c */, - 66E71B6A12938CE3007134B0 /* yajl_lex.c */, - 66E71B6B12938CE3007134B0 /* yajl_lex.h */, - 66E71B6C12938CE3007134B0 /* yajl_parser.c */, - 66E71B6D12938CE3007134B0 /* yajl_parser.h */, - 66E71B6E12938CE3007134B0 /* yajl_version.c */, - ); - name = src; - path = yajl/src; - sourceTree = ""; - }; - 66E71B5912938CE3007134B0 /* api */ = { - isa = PBXGroup; - children = ( - 66E71B5A12938CE3007134B0 /* yajl_common.h */, - 66E71B5B12938CE3007134B0 /* yajl_gen.h */, - 66E71B5C12938CE3007134B0 /* yajl_parse.h */, - 66E71BA512938CF8007134B0 /* yajl_version.h */, - 66E71B5D12938CE3007134B0 /* yajl_version.h.cmake */, - ); - path = api; - sourceTree = ""; - }; - 6E645A1F11876CA800F08CB1 /* Vendors */ = { - isa = PBXGroup; - children = ( - 6E645A2011876CA800F08CB1 /* SBJSON */, - 6E645AF71187744C00F08CB1 /* YAJL */, - ); - path = Vendors; - sourceTree = ""; - }; - 6E645A2011876CA800F08CB1 /* SBJSON */ = { - isa = PBXGroup; - children = ( - 66E71A0312938B22007134B0 /* Changes.markdown */, - 66E71A0412938B22007134B0 /* Credits.markdown */, - 66E71A0512938B22007134B0 /* Readme.markdown */, - 6E645A2211876CA800F08CB1 /* JSON.h */, - 6E645A2311876CA800F08CB1 /* NSObject+SBJSON.h */, - 6E645A2411876CA800F08CB1 /* NSObject+SBJSON.m */, - 6E645A2511876CA800F08CB1 /* NSString+SBJSON.h */, - 6E645A2611876CA800F08CB1 /* NSString+SBJSON.m */, - 6E645A2A11876CA800F08CB1 /* SBJsonBase.h */, - 6E645A2B11876CA800F08CB1 /* SBJsonBase.m */, - 6E645A2C11876CA800F08CB1 /* SBJsonParser.h */, - 6E645A2D11876CA800F08CB1 /* SBJsonParser.m */, - 6E645A2E11876CA800F08CB1 /* SBJsonWriter.h */, - 6E645A2F11876CA800F08CB1 /* SBJsonWriter.m */, - ); - name = SBJSON; - path = JSON; - sourceTree = ""; - }; - 6E645A4311876CFE00F08CB1 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */, - 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E645A6B11876D3F00F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E645A7011876D3F00F08CB1 /* libThree20Core.a */, - 6E645A7211876D3F00F08CB1 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E645A7411876D4600F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E645A7911876D4600F08CB1 /* libThree20Network.a */, - 6E645A7B11876D4600F08CB1 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E645AF71187744C00F08CB1 /* YAJL */ = { - isa = PBXGroup; - children = ( - 6E645AFF1187744C00F08CB1 /* README.md */, - 6E645AFC1187744C00F08CB1 /* LICENSE */, - 6E645AF91187744C00F08CB1 /* GTM */, - 66E71B5812938CE3007134B0 /* src */, - 6E645AFD1187744C00F08CB1 /* NSObject+YAJL.h */, - 6E645AFE1187744C00F08CB1 /* NSObject+YAJL.m */, - 6E645B7C1187744D00F08CB1 /* YAJL.h */, - 6E645B7D1187744D00F08CB1 /* YAJLDocument.h */, - 6E645B7E1187744D00F08CB1 /* YAJLDocument.m */, - 6E645B7F1187744D00F08CB1 /* YAJLGen.h */, - 6E645B801187744D00F08CB1 /* YAJLGen.m */, - 6E645B811187744D00F08CB1 /* YAJLParser.h */, - 6E645B821187744D00F08CB1 /* YAJLParser.m */, - ); - path = YAJL; - sourceTree = ""; - }; - 6E645AF91187744C00F08CB1 /* GTM */ = { - isa = PBXGroup; - children = ( - 6609986D12939B06007B1E07 /* GTMBase64.h */, - 6609986E12939B06007B1E07 /* GTMBase64.m */, - ); - path = GTM; - sourceTree = ""; - }; - 6EB4609C1183D1E000685649 /* Source */ = { - isa = PBXGroup; - children = ( - 6E645A1A11876C9800F08CB1 /* TTURLJSONResponse.h */, - 6E645A1C11876C9800F08CB1 /* TTURLJSONResponse.m */, - 664B29E812848B1A0008D569 /* TTErrorCodes.h */, - 664B29EF12848B270008D569 /* TTErrorCodes.m */, - 6E645A1F11876CA800F08CB1 /* Vendors */, - ); - name = Source; - sourceTree = ""; - }; - 6ED117E51183BE2A0096AEBF /* Resources */ = { - isa = PBXGroup; - children = ( - 6EB460921183D16000685649 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6ED117ED1183BE770096AEBF /* Tests */ = { - isa = PBXGroup; - children = ( - 6ED117E51183BE2A0096AEBF /* Resources */, - 6E645A6511876D2900F08CB1 /* extJSONTests+SBJSON.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6ED118E41183C38A0096AEBF /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E55A4B31183CA80002768DE /* Library+SBJSON.xcconfig */, - 663DB06D12661EE900CF8CEA /* Library+YAJL.xcconfig */, - 6E6454021184BDD500F08CB1 /* Project.xcconfig */, - 6EB460A61183D2AC00685649 /* UnitTests+SBJSON.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 6E645BA81187751200F08CB1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E645BA91187751200F08CB1 /* TTURLJSONResponse.h in Headers */, - 6E645BB21187751200F08CB1 /* NSObject+YAJL.h in Headers */, - 6E645BBC1187751200F08CB1 /* YAJL.h in Headers */, - 6E645BBD1187751200F08CB1 /* YAJLDocument.h in Headers */, - 6E645BBE1187751200F08CB1 /* YAJLGen.h in Headers */, - 6E645BBF1187751200F08CB1 /* YAJLParser.h in Headers */, - 6E6462131187DD3300F08CB1 /* extThree20JSON.h in Headers */, - 664B29EC12848B1A0008D569 /* TTErrorCodes.h in Headers */, - 66E71B9112938CE3007134B0 /* yajl_common.h in Headers */, - 66E71B9212938CE3007134B0 /* yajl_gen.h in Headers */, - 66E71B9312938CE3007134B0 /* yajl_parse.h in Headers */, - 66E71B9612938CE3007134B0 /* yajl_alloc.h in Headers */, - 66E71B9812938CE3007134B0 /* yajl_buf.h in Headers */, - 66E71B9912938CE3007134B0 /* yajl_bytestack.h in Headers */, - 66E71B9B12938CE3007134B0 /* yajl_encode.h in Headers */, - 66E71B9E12938CE3007134B0 /* yajl_lex.h in Headers */, - 66E71BA012938CE3007134B0 /* yajl_parser.h in Headers */, - 66E71BA812938CF8007134B0 /* yajl_version.h in Headers */, - 6609982212939800007B1E07 /* TTExtensionLoader.h in Headers */, - 6609987112939B06007B1E07 /* GTMBase64.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E645A1D11876C9800F08CB1 /* TTURLJSONResponse.h in Headers */, - 6E645A3011876CA800F08CB1 /* JSON.h in Headers */, - 6E645A3111876CA800F08CB1 /* NSObject+SBJSON.h in Headers */, - 6E645A3311876CA800F08CB1 /* NSString+SBJSON.h in Headers */, - 6E645A3711876CA800F08CB1 /* SBJsonBase.h in Headers */, - 6E645A3911876CA800F08CB1 /* SBJsonParser.h in Headers */, - 6E645A3B11876CA800F08CB1 /* SBJsonWriter.h in Headers */, - 6E6462121187DD2F00F08CB1 /* extThree20JSON.h in Headers */, - 664B29E912848B1A0008D569 /* TTErrorCodes.h in Headers */, - 6609982412939800007B1E07 /* TTExtensionLoader.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 6E645BA31187751200F08CB1 /* extThree20JSON+YAJL */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6E645BD51187751200F08CB1 /* Build configuration list for PBXNativeTarget "extThree20JSON+YAJL" */; - buildPhases = ( - 6E645BA81187751200F08CB1 /* Headers */, - 6E7F9372118E0EEB00443B46 /* Protect Copied Headers */, - 6E645BC01187751200F08CB1 /* Sources */, - 6E645BD41187751200F08CB1 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E645BA41187751200F08CB1 /* PBXTargetDependency */, - 6E645BA61187751200F08CB1 /* PBXTargetDependency */, - ); - name = "extThree20JSON+YAJL"; - productName = Three20; - productReference = 6E645BD91187751200F08CB1 /* libextThree20JSON+YAJL.a */; - productType = "com.apple.product-type.library.static"; - }; - BEF31F390F352DF5000DE5D2 /* extThree20JSON+SBJSON */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "extThree20JSON+SBJSON" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E3C34C3118807EF0079637E /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E645A7D11876D5800F08CB1 /* PBXTargetDependency */, - 6E645A7F11876D5800F08CB1 /* PBXTargetDependency */, - ); - name = "extThree20JSON+SBJSON"; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libextThree20JSON+SBJSON.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* extThree20JSONUnitTests+SBJSON */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "extThree20JSONUnitTests+SBJSON" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6E645AA611876E3500F08CB1 /* PBXTargetDependency */, - 6E645AA811876E3500F08CB1 /* PBXTargetDependency */, - 6EB460DE1183D8D400685649 /* PBXTargetDependency */, - ); - name = "extThree20JSONUnitTests+SBJSON"; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* extJSONUnitTests+SBJSON.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "extThree20JSON" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E645A6B11876D3F00F08CB1 /* Products */; - ProjectRef = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E645A7411876D4600F08CB1 /* Products */; - ProjectRef = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* extThree20JSON+SBJSON */, - 6E645BA31187751200F08CB1 /* extThree20JSON+YAJL */, - EB9E6C6110B6A8F800DE563C /* extThree20JSONUnitTests+SBJSON */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E645A7011876D3F00F08CB1 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E645A6F11876D3F00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645A7211876D3F00F08CB1 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E645A7111876D3F00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645A7911876D4600F08CB1 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E645A7811876D4600F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645A7B11876D4600F08CB1 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E645A7A11876D4600F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 6E3C34C3118807EF0079637E /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - 6E7F9372118E0EEB00443B46 /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 6E645BC01187751200F08CB1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E645BC11187751200F08CB1 /* TTURLJSONResponse.m in Sources */, - 6E645BC91187751200F08CB1 /* NSObject+YAJL.m in Sources */, - 6E645BD11187751200F08CB1 /* YAJLDocument.m in Sources */, - 6E645BD21187751200F08CB1 /* YAJLGen.m in Sources */, - 6E645BD31187751200F08CB1 /* YAJLParser.m in Sources */, - 664B29F312848B270008D569 /* TTErrorCodes.m in Sources */, - 66E71B9412938CE3007134B0 /* yajl.c in Sources */, - 66E71B9512938CE3007134B0 /* yajl_alloc.c in Sources */, - 66E71B9712938CE3007134B0 /* yajl_buf.c in Sources */, - 66E71B9A12938CE3007134B0 /* yajl_encode.c in Sources */, - 66E71B9C12938CE3007134B0 /* yajl_gen.c in Sources */, - 66E71B9D12938CE3007134B0 /* yajl_lex.c in Sources */, - 66E71B9F12938CE3007134B0 /* yajl_parser.c in Sources */, - 66E71BA112938CE3007134B0 /* yajl_version.c in Sources */, - 6609981B129397F5007B1E07 /* TTExtensionLoader.m in Sources */, - 6609987212939B06007B1E07 /* GTMBase64.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E645A1E11876C9800F08CB1 /* TTURLJSONResponse.m in Sources */, - 6E645A3211876CA800F08CB1 /* NSObject+SBJSON.m in Sources */, - 6E645A3411876CA800F08CB1 /* NSString+SBJSON.m in Sources */, - 6E645A3811876CA800F08CB1 /* SBJsonBase.m in Sources */, - 6E645A3A11876CA800F08CB1 /* SBJsonParser.m in Sources */, - 6E645A3C11876CA800F08CB1 /* SBJsonWriter.m in Sources */, - 664B29F012848B270008D569 /* TTErrorCodes.m in Sources */, - 6609981F129397F5007B1E07 /* TTExtensionLoader.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E645A9A11876E0400F08CB1 /* extJSONTests+SBJSON.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E645A7D11876D5800F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E645A7C11876D5800F08CB1 /* PBXContainerItemProxy */; - }; - 6E645A7F11876D5800F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E645A7E11876D5800F08CB1 /* PBXContainerItemProxy */; - }; - 6E645AA611876E3500F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6E645AA511876E3500F08CB1 /* PBXContainerItemProxy */; - }; - 6E645AA811876E3500F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6E645AA711876E3500F08CB1 /* PBXContainerItemProxy */; - }; - 6E645BA41187751200F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E645BA51187751200F08CB1 /* PBXContainerItemProxy */; - }; - 6E645BA61187751200F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E645BA71187751200F08CB1 /* PBXContainerItemProxy */; - }; - 6EB460DE1183D8D400685649 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* extThree20JSON+SBJSON */; - targetProxy = 6EB460DD1183D8D400685649 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E645BD61187751200F08CB1 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 663DB06D12661EE900CF8CEA /* Library+YAJL.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - DEBUG, - EXTJSON_YAJL, - ); - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 6E645BD71187751200F08CB1 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 663DB06D12661EE900CF8CEA /* Library+YAJL.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( - EXTJSON_YAJL, - DEBUG, - ); - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E645BD81187751200F08CB1 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 663DB06D12661EE900CF8CEA /* Library+YAJL.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_PREPROCESSOR_DEFINITIONS = EXTJSON_YAJL; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library+SBJSON.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( - EXTJSON_SBJSON, - DEBUG, - ); - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests+SBJSON.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library+SBJSON.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - EXTJSON_SBJSON, - DEBUG, - ); - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library+SBJSON.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_PREPROCESSOR_DEFINITIONS = EXTJSON_SBJSON; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests+SBJSON.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests+SBJSON.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SRCROOT)/../common/Xcode324iOS41Fix.pch"; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6E645BD51187751200F08CB1 /* Build configuration list for PBXNativeTarget "extThree20JSON+YAJL" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6E645BD61187751200F08CB1 /* Debug */, - 6E645BD71187751200F08CB1 /* Internal */, - 6E645BD81187751200F08CB1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "extThree20JSON+SBJSON" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "extThree20JSON" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "extThree20JSONUnitTests+SBJSON" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/extThree20XML/Configurations/Library.xcconfig b/src/extThree20XML/Configurations/Library.xcconfig deleted file mode 100644 index 908d91d6f3..0000000000 --- a/src/extThree20XML/Configurations/Library.xcconfig +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Library.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = extThree20XML -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_LIBRARY_VERSION = 1.0 - -PRIVATE_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)/private -PUBLIC_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME) diff --git a/src/extThree20XML/Configurations/Project.xcconfig b/src/extThree20XML/Configurations/Project.xcconfig deleted file mode 100644 index 12ab00bb9b..0000000000 --- a/src/extThree20XML/Configurations/Project.xcconfig +++ /dev/null @@ -1,17 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/Project.xcconfig" diff --git a/src/extThree20XML/Configurations/UnitTests.xcconfig b/src/extThree20XML/Configurations/UnitTests.xcconfig deleted file mode 100644 index 2abad0f270..0000000000 --- a/src/extThree20XML/Configurations/UnitTests.xcconfig +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#include "../common/Configurations/UnitTests.xcconfig" -#include "../common/Configurations/Libraries.xcconfig" - -BASE_PRODUCT_NAME = extJSONUnitTests -PRODUCT_NAME = $(BASE_PRODUCT_NAME) -BUILD_BUNDLE_VERSION = 1.0 - -OTHER_LDFLAGS = $(COMMON_LDFLAGS) $(UIKIT_FX) diff --git a/src/extThree20XML/Headers/TTExtensionLoader.h b/src/extThree20XML/Headers/TTExtensionLoader.h deleted file mode 100644 index b47caa1716..0000000000 --- a/src/extThree20XML/Headers/TTExtensionLoader.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20Core/TTExtensionLoader.h" - -@interface TTExtensionLoader (TTXMLExtension) - -@end diff --git a/src/extThree20XML/Headers/TTURLXMLResponse.h b/src/extThree20XML/Headers/TTURLXMLResponse.h deleted file mode 100644 index 58eaa0deb9..0000000000 --- a/src/extThree20XML/Headers/TTURLXMLResponse.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Network -#import "Three20Network/TTURLResponse.h" - -/** - * An implementation of the TTURLResponse protocal for turning XML responses into NSObjects. - * - * This particular implementation uses a strict XML parser (NSXMLParser). It is not designed to - * parse HTML pages that are likely to have invalid markup. - */ -@interface TTURLXMLResponse : NSObject { - id _rootObject; - BOOL _isRssFeed; -} - -@property (nonatomic, retain, readonly) id rootObject; - -/** - * Is this XML response an RSS feed? This distinction is necessary in order to allow duplicate - * keys in the XML objects. - * - * @default NO - */ -@property (nonatomic, assign) BOOL isRssFeed; - -@end diff --git a/src/extThree20XML/Headers/TTXMLParser.h b/src/extThree20XML/Headers/TTXMLParser.h deleted file mode 100644 index 521e4e2bce..0000000000 --- a/src/extThree20XML/Headers/TTXMLParser.h +++ /dev/null @@ -1,120 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -extern NSString* kCommonXMLType_Unknown; - -/** - * An implementation of the NSXMLParser object that turns XML into NSObjects. - * - * Uses a simple stack-based traversal of the XML document to recursively create the objects - * at each level. Upon successful completion, rootObject will be an NSDictionary object. - * - * To traverse the resulting NSObject hierarchy, use the NSDictionary additions provided at the end - * of this file to access the XML entity name, type, and object. For example: - * - * - * - * - * 3 - * - * - * 10 - * - * - * - * Logic to parse the above XML as an NSData* object: - * - * TTXMLParser* parser = [[TTXMLParser alloc] initWithData:xmlData]; - * [parser parse]; - * - * parser.rootObject will become the following NSObject: - * - * rootObject => NSDictionary* (root) - * - * - ___Entity_Name___: "issues" - * - ___Entity_Type___: "array" - * - ___Entity_Value___: NSArray of NSDictionaries, accessed with [rootObject objectForXMLNode] - * - * [rootObject objectForXMLNode] => NSArray* of NSDictionaries - * Each item of the NSArray is an NSDictionary*: - * foreach item in array: - * - ___Entity_Name___: "issue" - * - ___Entity_Type___: kCommonXMLType_Unknown - * - ___Entity_Value___: NSDictionary* - * etc... - * - * Implementation note: This class is designed as a simple means of parsing XML documents. It has - * not been optimized for speed or memory usage, and has only been tested with documents less than - * one MB (megabyte) in size. - */ -@interface TTXMLParser : NSXMLParser { -@private - id _rootObject; - - BOOL _treatDuplicateKeysAsArrayItems; - - NSMutableArray* _objectStack; -} - -/** - * Only valid after [parser parse] has been called. - * - * Will return an NSDictionary* after successful parsing. - */ -@property (nonatomic, readonly) id rootObject; - -/** - * When a duplicate key is encountered, the key's value is turned into an array and both - * the original item and the new duplicate item are added to the array. Any subsequent duplicates - * are also added to this array. - * This is useful for RSS feeds, where feed items are presented inline (and not as array items). - * - * @default NO - */ -@property (nonatomic, assign) BOOL treatDuplicateKeysAsArrayItems; - -@end - - -/** - * Additions for accessing TTXMLParser results. - */ -@interface NSDictionary (TTXMLAdditions) - -/** - * @return The XML entity name. - */ -- (NSString*)nameForXMLNode; - -/** - * @return The XML entity type. - */ -- (NSString*)typeForXMLNode; - -/** - * @return The XML processed value for this object. - */ -- (id)objectForXMLNode; - -/** - * @return Performs an "objectForKey", then puts the object into an array. If the - * object is already an array, that array is returned. - */ -- (NSArray*)arrayForKey:(id)key; - -@end diff --git a/src/extThree20XML/Headers/extThree20XML.h b/src/extThree20XML/Headers/extThree20XML.h deleted file mode 100644 index 3e112f1627..0000000000 --- a/src/extThree20XML/Headers/extThree20XML.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20XML/TTURLXMLResponse.h" - -// Vendors -#import "extThree20XML/TTXMLParser.h" diff --git a/src/extThree20XML/Headers/extThree20XML_Prefix.pch b/src/extThree20XML/Headers/extThree20XML_Prefix.pch deleted file mode 100644 index 28f5d8f8f2..0000000000 --- a/src/extThree20XML/Headers/extThree20XML_Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Three20Core' target in the 'Three20Core' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/src/extThree20XML/README.mdown b/src/extThree20XML/README.mdown deleted file mode 100644 index 51434446b3..0000000000 --- a/src/extThree20XML/README.mdown +++ /dev/null @@ -1,28 +0,0 @@ - -extXML -====== - -This extension provides XML support. - -Dependencies ------------- - -* Core -* Network - -Using it in your App --------------------- - -Add the `extThree20XML.xcodeproj` file to your project. Add `libextThree20XML.a` to your -"Link Binary With Libraries" phase, and add `extThree20XML` as a dependency. - -Import the following into your precompiled header or wherever you need access to -`TTURLXMLResponse`. - - #import "extThree20XML/extThree20XML.h" - -Breakdown ---------- - -Use `TTURLXMLResponse` to handle XML responses. You can also use the provided `TTXMLParser` to -do on-the-fly XML parsing. Please read the `TTXMLParser` before using it for anything large. diff --git a/src/extThree20XML/Source/TTExtensionLoader.m b/src/extThree20XML/Source/TTExtensionLoader.m deleted file mode 100644 index d234f0479d..0000000000 --- a/src/extThree20XML/Source/TTExtensionLoader.m +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20XML/TTExtensionLoader.h" - -// Core -#import "Three20Core/TTExtensionAuthor.h" -#import "Three20Core/TTExtensionInfo.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTExtensionLoader (TTXMLExtension) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)loadExtensionNamedThree20XML { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (TTExtensionInfo*)extensionInfoNamedThree20XML { - TTExtensionInfo* extension = [[TTExtensionInfo alloc] init]; - - extension.name = @"Three20 XML"; - extension.description = - @"The XML extension provides support for parsing XML data and receiving XML responses."; - extension.version = @"1.0"; - extension.copyright = @"Copyright 2009-2010 Facebook"; - extension.license = @"Apache 2.0"; - extension.authors = [NSArray arrayWithObjects: - [TTExtensionAuthor authorWithName:@"Jeff Verkoeyen"], - nil]; - - return [extension autorelease]; -} - -@end - diff --git a/src/extThree20XML/Source/TTURLXMLResponse.m b/src/extThree20XML/Source/TTURLXMLResponse.m deleted file mode 100644 index 67b069c152..0000000000 --- a/src/extThree20XML/Source/TTURLXMLResponse.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20XML/TTURLXMLResponse.h" - -// extThree20XML -#import "extThree20XML/TTXMLParser.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" -#import "Three20Core/TTDebugFlags.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTURLXMLResponse - -@synthesize rootObject = _rootObject; -@synthesize isRssFeed = _isRssFeed; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_rootObject); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark TTURLResponse - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSError*)request:(TTURLRequest*)request processResponse:(NSHTTPURLResponse*)response - data:(id)data { - // This response is designed for NSData objects, so if we get anything else it's probably a - // mistake. - TTDASSERT([data isKindOfClass:[NSData class]]); - TTDASSERT(nil == _rootObject); - - if ([data isKindOfClass:[NSData class]]) { - TTDCONDITIONLOG(TTDFLAG_XMLPARSER, @"Data: %@", [[[NSString alloc] - initWithData: data - encoding: NSUTF8StringEncoding] autorelease]); - TTXMLParser* parser = [[TTXMLParser alloc] initWithData:data]; - parser.delegate = self; - parser.treatDuplicateKeysAsArrayItems = self.isRssFeed; - [parser parse]; - _rootObject = [parser.rootObject retain]; - TT_RELEASE_SAFELY(parser); - } - - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)didParseXML:(id)rootObject { - TTDASSERT(nil == _rootObject); - - [rootObject retain]; - [_rootObject release]; - _rootObject = rootObject; -} - - -@end diff --git a/src/extThree20XML/Source/TTXMLParser.m b/src/extThree20XML/Source/TTXMLParser.m deleted file mode 100644 index 1292d66704..0000000000 --- a/src/extThree20XML/Source/TTXMLParser.m +++ /dev/null @@ -1,325 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "extThree20XML/TTXMLParser.h" - -// Core -#import "Three20Core/TTGlobalCore.h" -#import "Three20Core/TTCorePreprocessorMacros.h" -#import "Three20Core/TTDebug.h" - -// XML attribute keys. -static NSString* kCommonXMLKey_Type = @"type"; - -// XML object types. -static NSString* kCommonXMLType_Array = @"array"; -static NSString* kCommonXMLType_Integer = @"integer"; -static NSString* kCommonXMLType_DateTime = @"datetime"; - NSString* kCommonXMLType_Unknown = @"unknown"; - -// Internal key names for the resulting NSDictionaries. -static NSString* kInternalKey_EntityName = @"___Entity_Name___"; -static NSString* kInternalKey_EntityType = @"___Entity_Type___"; -static NSString* kInternalKey_EntityValue = @"___Entity_Value___"; -static NSString* kInternalKey_Array = @"___Array___"; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation TTXMLParser - -@synthesize rootObject = _rootObject; -@synthesize treatDuplicateKeysAsArrayItems = _treatDuplicateKeysAsArrayItems; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_rootObject); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)parse { - _objectStack = [[NSMutableArray alloc] init]; - - self.delegate = self; - - BOOL result = [super parse]; - - TT_RELEASE_SAFELY(_objectStack); - - return result; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Create an NSDictionary from the given XML node. - * All XML attributes are added to the dictionary. - */ -- (id)allocObjectForElementName: (NSString*)elementName - attributes: (NSDictionary*)attributeDict { - static const int kNumberOfInternalKeys = 3; - - id object = [[NSMutableDictionary alloc] - initWithCapacity:kNumberOfInternalKeys + [attributeDict count]]; - if (!TTIsStringWithAnyText(elementName)) { - elementName = @""; - } - - NSString* type = [attributeDict objectForKey:kCommonXMLKey_Type]; - - if (!TTIsStringWithAnyText(type)) { - type = kCommonXMLType_Unknown; - } - - if ([type isEqualToString:kCommonXMLType_Array]) { - NSMutableArray* array = [[NSMutableArray alloc] init]; - [object setObject:array forKey:kInternalKey_Array]; - TT_RELEASE_SAFELY(array); - } - - for (id key in attributeDict) { - [object setObject:[attributeDict objectForKey:key] forKey:key]; - } - - [object setObject:elementName forKey:kInternalKey_EntityName]; - [object setObject:type forKey:kInternalKey_EntityType]; - - return object; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addChildObject:(id)childObject toObject:(id)object { - - if ([object isKindOfClass:[NSDictionary class]]) { - - // Is this an internal common "array" type? - if ([[object objectForKey:kInternalKey_EntityType] - isEqualToString:kCommonXMLType_Array]) { - - // Yes, it is. Let's add this object to the array then. - if (nil != childObject) { - [[object objectForKey:kInternalKey_Array] addObject:childObject]; - } - - // Is it an unknown dictionary type? - } else if ([[object objectForKey:kInternalKey_EntityType] - isEqualToString:kCommonXMLType_Unknown]) { - - if (self.treatDuplicateKeysAsArrayItems) { - NSString* entityName = [childObject objectForKey:kInternalKey_EntityName]; - id entityObject = [object objectForKey:entityName]; - if (nil == entityObject) { - // No collision, add it! - [object setObject:childObject forKey:entityName]; - - } else { - // Collision, check if it's already an array. - if (TTIsArrayWithItems(entityObject)) { - [entityObject addObject:childObject]; - - } else { - NSMutableArray* array = [[NSMutableArray alloc] init]; - [array addObject:entityObject]; - [array addObject:childObject]; - [object setObject:array forKey:entityName]; - TT_RELEASE_SAFELY(array); - } - } - - } else { - // Avoid overwriting existing keys. - // If this is asserting, you probably need treatDuplicateKeysAsArrayItems set to YES. - TTDASSERT(nil == [object objectForKey:[childObject objectForKey:kInternalKey_EntityName]]); - - [object setObject:childObject forKey:[childObject objectForKey:kInternalKey_EntityName]]; - } - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)addCharacters:(NSString*)characters toObject:(id)object { - if ([object isKindOfClass:[NSDictionary class]]) { - NSString* value = [object objectForKey:kInternalKey_EntityValue]; - if (nil == value) { - value = [[NSString alloc] init]; - [object setObject:value forKey:kInternalKey_EntityValue]; - [value release]; - } - [object setObject:[value stringByAppendingString:characters] forKey:kInternalKey_EntityValue]; - - } else { - // Not implemented, we're losing data here. - TTDASSERT(false); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/** - * Post-object parsing cleanup. Turns integers and dates into their respective NSObject types. - */ -- (void)didFinishParsingObject:(id)object { - if ([object isKindOfClass:[NSDictionary class]] && - [[object objectForKey:kInternalKey_EntityType] isEqualToString:kCommonXMLType_Integer]) { - NSString* buffer = [object objectForKey:kInternalKey_EntityValue]; - - NSNumber* number = [[NSNumber alloc] initWithInt:[buffer intValue]]; - TTDASSERT(nil != number); - if (nil != number) { - [object setObject:number forKey:kInternalKey_EntityValue]; - } - TT_RELEASE_SAFELY(number); - - } else if ([object isKindOfClass:[NSDictionary class]] && - [[object objectForKey:kInternalKey_EntityType] - isEqualToString:kCommonXMLType_DateTime]) { - NSString* buffer = [object objectForKey:kInternalKey_EntityValue]; - - NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setTimeStyle:NSDateFormatterFullStyle]; - [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZZZZ"]; - NSDate* date = [dateFormatter dateFromString:buffer]; - if (nil == date) { - [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss'Z'"]; - date = [dateFormatter dateFromString:buffer]; - } - - if (nil != date) { - [object setObject:date forKey:kInternalKey_EntityValue]; - - } else { - // We weren't able to parse the date properly, so the value at this node has been left as - // a string. - TTDPRINT(@"Unparseable date: %@", buffer); - TTDASSERT(false); - } - TT_RELEASE_SAFELY(dateFormatter); - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSXMLParserDelegateEventAdditions - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) parser: (NSXMLParser*) parser - didStartElement: (NSString*) elementName - namespaceURI: (NSString*) namespaceURI - qualifiedName: (NSString*) qName - attributes: (NSDictionary*)attributeDict { - id object = [self allocObjectForElementName:elementName attributes:attributeDict]; - - if (nil == object) { - object = [[NSNull null] retain]; - } - - if ([_objectStack count] > 0) { - [self addChildObject:object toObject:[_objectStack lastObject]]; - } - - [_objectStack addObject:object]; - - TT_RELEASE_SAFELY(object); -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) parser: (NSXMLParser*) parser - foundCharacters: (NSString*) string { - [self addCharacters:string toObject:[_objectStack lastObject]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void) parser: (NSXMLParser*) parser - didEndElement: (NSString*) elementName - namespaceURI: (NSString*) namespaceURI - qualifiedName: (NSString*) qName { - - [self didFinishParsingObject:[_objectStack lastObject]]; - - if ([_objectStack count] == 1) { - TT_RELEASE_SAFELY(_rootObject); - _rootObject = [[_objectStack lastObject] retain]; - } - - // Now that we've finished a node, let's step back up the tree. - [_objectStack removeLastObject]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError { - TTDERROR(@"Error parsing the XML: %@", [parseError localizedDescription]); -} - - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation NSDictionary (TTXMLAdditions) - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)nameForXMLNode { - return [self objectForKey:kInternalKey_EntityName]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)typeForXMLNode { - return [self objectForKey:kInternalKey_EntityType]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)objectForXMLNode { - if ([[self typeForXMLNode] isEqualToString:kCommonXMLType_Array]) { - return [self objectForKey:kInternalKey_Array]; - - } else { - return [self objectForKey:kInternalKey_EntityValue]; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSArray*)arrayForKey:(id)key { - id object = [self objectForKey:key]; - - // if it's not an array, then make it a 1-element array - if (![object isKindOfClass:[NSArray class]]) { - object = [NSArray arrayWithObject:object]; - } - - return object; -} - -@end - diff --git a/src/extThree20XML/UnitTests/Resources/PropertyLists/UnitTests-Info.plist b/src/extThree20XML/UnitTests/Resources/PropertyLists/UnitTests-Info.plist deleted file mode 100644 index d54082f1ee..0000000000 --- a/src/extThree20XML/UnitTests/Resources/PropertyLists/UnitTests-Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.facebook.three20.UnitTests - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/src/extThree20XML/UnitTests/Resources/XML/testcase.xml b/src/extThree20XML/UnitTests/Resources/XML/testcase.xml deleted file mode 100644 index baa6ccc666..0000000000 --- a/src/extThree20XML/UnitTests/Resources/XML/testcase.xml +++ /dev/null @@ -1,1273 +0,0 @@ - - - - 3 - 1 - 2009-04-18T08:30:22-07:00 - When adding a TTStyledTextTableField to a table view that is grouped, and the field is at the top and/or bottom of a group, the cell is rendered with squared corners instead of rounded corners like all other cells. - TTStyledTextTableField in a UITableViewStyleGrouped table view does not have rounded corners - 2009-09-25T10:55:40-07:00 - - elliotb - - - - - open - - - 5 - 0 - 2009-04-19T07:45:54-07:00 - Hi Guys, this is my first time creating some issues, so feel free to delete them if they are not appropriate or already fixed... if i can fix these myself or contribute i will do so. - -Image scaling in Landscape mode does not 'amplify' pinches as it should. because of the smaller pinch area, a UIImageView amplify's the pinch to give the user more of a chance to zoom in and out. - -Currently pinching to zoom in, in landscape mode is troublesome because of the smaller vertical area. - TTImageView - Landscape pinch amplification as per UIImageView - 2009-04-19T07:47:01-07:00 - - mdreeling - - - - - open - - - 6 - 4 - 2009-04-19T07:51:15-07:00 - When rotating an image from portrait to landscape, or vice versa, in zoomed mode, the image is rotated in such as way that what you were looking at may not still be centered when the rotation is complete. - -For instance, if you are zoomed on the face of the statue of liberty in portrait, when you rotate to landscape, you will be looking at another part of the statue. - TTImageView - Landscape to Portrait rotation - When zoomed rotates the image Off-Axis - 2009-09-24T07:04:45-07:00 - - mdreeling - - - - open - - - 15 - 0 - 2009-05-04T20:25:24-07:00 - Given style XHTML: "&lt;a href=\"#\">&lt;img class=\"absolutePositioning\">&lt;/img>&lt;/a>" - -If the class uses TTPositionAbsolute, then the link will no longer work. I noticed that TTLayout only considers TTBoxStyle's TTPositionAbsolute for image nodes, so I'm not sure how to work around this. - TTPositionAbsolute breaks link surrounding an image - 2009-12-21T18:45:17-08:00 - - searls - - - - open - - - 16 - 4 - 2009-05-05T10:55:03-07:00 - I would be very usefull to add -initWithCoder: method to TTView class and subclasses to minimally support Interface Builder XIB. Without this method, Three20 views can't be used in XIB definition, because some initialization from -initWithFrame: are missing. - -For example: I've added minimal XIB / Interface Builder support by adding this method to TTView class: - -- (id)initWithCoder:(NSCoder *)decoder { - if (self = [super initWithCoder:decoder]) { - _style = nil; - _layout = nil; - // Avoid fixing content mode here, because it will be specified in XIB - //self.contentMode = UIViewContentModeRedraw; - } - return self; -} - -And by adding this method to TTTabBar class: - -- (id)initWithCoder:(NSCoder *)decoder { - if (self = [super initWithCoder:decoder]) { - _selectedTabIndex = NSIntegerMax; - _tabItems = nil; - _tabViews = [[NSMutableArray alloc] init]; - _tabStyle = nil; - - self.style = TTSTYLE(tabBar); - self.tabStyle = @"tab:"; - } - return self; -} - -Now with these methods, I can add a view of TTTabBar to my NIB / XIB. It shows a blank view in Interface Builder, but it correctly build up at runtime. - Add -initWithCoder: method to TTView class and subclasses to minimally support Interface Builder XIB - 2009-12-08T09:05:51-08:00 - - flabrie - - - - open - - - 17 - 0 - 2009-05-05T13:35:00-07:00 - Just realized while reading TTStyledLayout.m that the CGSize minSize only looks at the height and doesn't access the width, and only does so for TTStyledBlock (meaning div only?). - -I'm going to look at modifying this for a span element with a TTBoxStyle and a minimum width. Thoughts? - TTBoxStyle.minSize only concerns height, not width. - 2009-07-23T13:17:36-07:00 - - searls - - - - - open - - - 19 - 3 - 2009-05-11T08:08:33-07:00 - The TTURLRequestQueue caches results even if the response includes a Cache-Control header indicates the data should not be cached (no-cache, for instance). - TTURLRequestQueue does not respect Cache-Control header - 2009-08-06T18:00:01-07:00 - - dougbarth - - - - open - - - 28 - 0 - 2009-05-27T09:42:30-07:00 - I'm on 3.0 beta 5 and it seems like the TTMessageController doesn't -work properly: I cannot switch the fields by tapping (only the "next" -key works). Seems like something is messed up with touches / events / responders (or whatever ;-) - TTMessageController / OS 3.0: Cannot switch fields - 2009-05-27T09:42:30-07:00 - - chrismuc - - - - open - - - 29 - 1 - 2009-05-27T12:09:40-07:00 - TTTextEditor needs to overwrite UIResponder *FirstResponder messages. - -- (BOOL)isFirstResponder { - return [_textView isFirstResponder]; -} - -- (BOOL)canBecomeFirstResponder { - return [_textView canBecomeFirstResponder]; -} - -- (BOOL)becomeFirstResponder { - return [_textView becomeFirstResponder]; -} - -- (BOOL)resignFirstResponder { - return [_textView resignFirstResponder]; -} - - TTTextEditor becomeFirstResponder - 2009-05-27T12:10:14-07:00 - - catlan - - - - open - - - 31 - 3 - 2009-05-27T15:04:26-07:00 - As it currently stands, TTMessageRecipientField will only add a recipient that's selected from TTMessageController's dataSource. If you try to arbitrarily add a contact, it will delete them from the UITextField once TTMessageRecipientField loses focus. - TTMessageController - does not allow arbitrary recipient into TTMessageRecipientField - 2009-10-21T13:57:47-07:00 - - stevef - - - - open - - - 46 - 1 - 2009-06-26T13:06:56-07:00 - The whole HSB/HSV thing is confusing enough on its own, but it's made even worse by the difference in the hue domain for Three20's HSV color factory and UIKit's HSB factory. - - // Three20 (hue is in [0, 360]) - + (UIColor*)colorWithHue:(CGFloat)h saturation:(CGFloat)s value:(CGFloat)v alpha:(CGFloat)a; - - // UIKit (hue is in [0.0, 1.0]) - + (UIColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha - -It's made even more confusing because if you look at UIColorAdditions.m in Three20, it uses HSBtoRGB macros (even though the factory method is HSV). - -Another point of confusion is Three20's -[UIColor hue] method which returns a value in the range [0.0, 360.0]. So this works with Three20's factory method but not the original UIColor HSB factory method. When 2 things are both called "hue", I would expect them to have the same domain. - -Unless there's a really good reason for this, I would rather that UIColorAdditions.m more closely follows UIKit's HSB system. - The hue in UIColorAdditions is in range [0, 360], while UIKit's hue is [0, 1] - 2009-08-13T04:19:47-07:00 - - klazuka - - - - open - - - 47 - 1 - 2009-06-26T13:32:21-07:00 - I'm sure that is not a good title, but it takes a bit to explain. - -I have a TTTableView. In the header is a TTTabBar. When tabs are selected, I invalidate the view and thus createDataSource gets called and it creates a different data source for each tab. - -The first data source is a TTListDataSource where the items are TTStyledTextTableItems. Then if you select the second tab, you get a different TTListDataSource where the items are just TTTableItems. Everything is fine at this point. But when you select the first tab again, it draws the TTStyledTextLabels incorrectly...they are about one character wide. - -After a long time in the debugger, I figured out that on return, it wasn't calling layoutSubviews on the TTStyledTextLabels. I fixed this by adding [_label layoutSubviews] in TTStyledTextTableItemCell. Here is the full method: - - - (void)layoutSubviews { - [super layoutSubviews]; - - TTStyledTextTableItem* field = self.object; - _label.frame = CGRectOffset(self.contentView.bounds, field.margin.left, field.margin.top); - [_label layoutSubviews]; - } - -If this isn't a bug, please let me know what I should be doing instead. Thanks! - (fix included): TTTableView switch from TTStyledTextTableItemCell to TTTableItemCell and back...needs layoutSubviews - 2009-06-26T13:33:14-07:00 - - patrickxb - - - - - open - - - 48 - 1 - 2009-06-27T16:10:19-07:00 - TTMessageController doesn't currently support a field where the user can choose what account or address they'd like to send the message from (similar to Mail.app if there are multiple email accounts setup). It also doesn't currently support a separate data source for those accounts/addresses. Therefore, simply adding a "From:" field doesn't easily fix this, as that field would use the same data source as the recipients (as well as having the same behavior as a recipient field, which is incorrect). - -I'd really like to see this functionality added. - Request for sender field in TTMessageController - 2009-06-27T16:11:26-07:00 - - hjon - - - - open - - - 51 - 0 - 2009-07-10T07:58:00-07:00 - TTLayout could be made more useful by changing the forView:(UIView*) part of the selector to forSize:(CGSize). - -Right now the UIView* type is too-specific. Both TTFlowLayout and TTGridLayout only depend on the "width" property of the view parameter. - -In fact, even the word "Subviews" is too specific. I would prefer if the method had the following signature: - - (CGSize)layoutViews:(NSArray *)view desiredSize:(CGSize)desiredSize; - - -[TTLayout layoutSubviews:forView:] is too specific - 2009-07-11T06:24:51-07:00 - - klazuka - - - - open - - - 55 - 0 - 2009-07-20T18:19:14-07:00 - For a TTTextEditor added to the dataSource at an offscreen index. This is done after initial load through a method in the respective TTViewController. - -[TTTextEditor.textView becomeFirstResponder] doest not bring up the keyboard. When scrolling to this location, an obj_msgSend ccrash occurs where GDB logs "Program received signal: "EXC_BAD_ACCESS". - - Offscreen TTTextEditor becomeFirstResponder crashes - 2009-12-09T15:45:13-08:00 - - grinich - - - - open - - - 57 - 0 - 2009-07-26T06:45:32-07:00 - Suppose that the default placeholder image is 70x70 and your table row height is 80px (variableHeightRows = NO, although even if you set this to YES, the bug would still exist). Next suppose that the TTTableImageItemCell is configured to display an image url for an image that is, say, 100x200 and is *not* in the image cache. - -When the TTTableImageItemCell does layoutSubviews for the first time, it will check to see if the image URL is in the cache. In this case, the image is not in the cache, so it will do the layout based on the dimensions of the placeholder image (70x70 in this example). - -Shortly thereafter the TTImageView displays the placeholder image while it sends out an HTTP request for the image resource. At this point the layout is good: the placeholder image fits nicely into the cell. Then, after the image is retrieved from the internet, the image is downsampled to fit inside the existing TTTableImageItemCell frame (70x70 because of the initial placeholder image). At this point, everything is still fine. - -Now scroll the cell off the screen a few rows and then scroll back to the cell. A new cell will be dequeued and set to display the image URL, but *this time* it finds the image in the cache, and follows a different code path through layoutSubviews. The end result is that the TTImageView's frame is now changed to match the dimensions of the cached image (100x200 in this example), and the end result is that the image overflows the cell layout. - -You can see this problem in my TTRemoteExamples table view. You can verify that the image cache code path in layoutSubviews is the root of the problem by disabling the image cache in TTRemoteExamples (AppDelegate.m sets the cache's maxPixelCount to a farily large number right now). - -As far as I can tell, the correct behavior would be for -[TTTableImageItemCell layoutSubviews] to always set the frame of its TTImageView either to the default placeholder image (if available) or to the default dimensions for the cell. Which is to say that it should *not* set the TTImageView's frame to match the downloaded image's frame because the downloaded image might be too large, and it is better to just downsample it to fit in the row). - -I would fix the bug myself but it seems more like a policy decision that you would be better equiped to decide. - - TTTableImageItemCell layout overflow - 2009-12-21T18:49:31-08:00 - - klazuka - - - - open - - - 59 - 0 - 2009-07-27T05:30:11-07:00 - After these changes: -http://github.com/joehewitt/three20/commit/992ff5f9a76478c04fe2992ae7a2b092bbe3161c - -When the keyboard appears in a window which contains a tab bar, the size of the entire keyboard is subtracted from the view. In reality, the view should only shrink to clear the part of the keyboard which appears above the tabstrip. - Keyboard resizing broken with tab controller - 2009-08-19T02:15:05-07:00 - - ZoneMR - - - - open - - - 60 - 1 - 2009-07-27T13:02:44-07:00 - If i'm zoomed in on a photo in the TTPhotoViewController i've noticed -it takes quite a bit of effort to move to the next page. It seems -much more resistive than the iPhone's actual photo viewer. -Could this be tweaked a bit? -Thanks! - Resistance in TTPhotoViewController when zoomed in seems too high Options - 2009-10-06T02:13:19-07:00 - - Metasyntactic - - - - open - - - 61 - 1 - 2009-07-27T13:05:12-07:00 - Hi all, -When i use the TTPhotoViewController to look at a large image, i am -able to zoom in and pan around successfully. However, if i rotate the -device, i notice that the image rotates but i *can't* pan entirely to -the top or bottom anymore. -Is this a known issue? -I can supply a repro if that would be helpful. - TTPhotoViewController seems to have a problem zooming in *and* rotating - 2009-08-02T13:18:17-07:00 - - Metasyntactic - - - - open - - - 62 - -1 - 2009-07-27T13:06:37-07:00 - In the normal iphone photo viewer you can flick a zoomed in image and -it will fly across the screen and bounce. This doesn't seem to eb the -case with TTPhotoViewController. When i zoom in and i flick, it seems -to stop immediately after releasing my touch. -Cheers! - Flicking when zoomed in in a TTPhotoViewController doesn't seem to decelerate the image - 2009-10-28T15:53:14-07:00 - - Metasyntactic - - - - open - - - 63 - 4 - 2009-07-30T22:10:12-07:00 - if the text passed to TTStyledTextLabel contains special characters like &rsqou; &lsqou then no text is rendered in the label and it is shown as blank. - TTStyledTextLabel does not support html special characters - 2009-09-25T10:55:36-07:00 - - saurwad - - - - open - - - 65 - 0 - 2009-07-31T14:11:26-07:00 - Currently setSelectedTabIndex only calls the delegates tabSelected method if the new tab index is different from the current index. - -When explicilty setting the index it's likely the delegate is expecting to update something based on the selected index. On tab initialization, the default selected tab is 0, so if other initialization code determines the start tab to be 0, the delegate is never called. - -I'm lazy and would like to rely on the delegate.tabSelected method to tell me what content I need to load, rather than having to check to see if tab 0 is selected and needs to be loaded. - -Proposed new setSelectedTabIndex ... - -- (void)setSelectedTabIndex:(NSInteger)index { - if (index != _selectedTabIndex) { - if (_selectedTabIndex != NSIntegerMax) { - self.selectedTabView.selected = NO; - } - - _selectedTabIndex = index; - - if (_selectedTabIndex != NSIntegerMax) { - self.selectedTabView.selected = YES; - } - } - - if ([_delegate respondsToSelector:@selector(tabBar:tabSelected:)]) { - [_delegate tabBar:self tabSelected:_selectedTabIndex]; - } -} - - suggest moving TTTabBar setSelectedTabIndex delegate call out of if statement - 2009-08-03T19:10:58-07:00 - - lrx007 - - - - - open - - - 69 - 3 - 2009-08-04T20:47:18-07:00 - I'm using TTTableStyledTextItem in a TTTableViewController, initializing them with itemWithText:[TTStyledText textFromXHTML:body] like it does in the catalog. Unfortunately, with some combinations of copy the text gets wonky and doesn't display properly, taking out numbers and lines. - -For instance, try adding this to the TTCatalog's StyledTextTableTestController around lines 17-27: - [TTStyledText textFromXHTML:@"bold? If there are several lines above, then some weird stuff happens below with line breaks! Weird! Like an event.\n\nCoffeehouse and Lounge\n\n200 E Main St\n555-222-2323"], - -Now compare to this: - [TTStyledText textFromXHTML:@"<b>bold?</b> If there are several lines above, then some weird stuff happens below with line breaks! Weird! Like an event.\n\nCoffeehouse and Lounge\n\n200 E Main St\n555-222-2323"], - -The first one displays properly, but the second one displays strangely. - TTStyledText -- Trouble with newlines after bold/italic/span elements - 2009-08-21T18:46:04-07:00 - - ianterrell - - - - open - - - 71 - 0 - 2009-08-07T13:28:27-07:00 - There may be more locations that colors are wrong, but these are the locations I've found. - -In TTWebController when initializing the toolbar tintColor it should be toolbarTintColor and not navigationBarTintColor. - -In TTDefaultStyleSheet methods toolbarButton, toolbarBackButton, toolbarForwardButton, and toolbarRoundButton are using navigationBarTintColor and need to be toolbarTintColor. - navigationBarTintColor and toolbarTintColor issues for TTDefaultSheet and TTWebController - 2009-08-07T13:28:27-07:00 - - mpurland - - - - - open - - - 72 - 1 - 2009-08-11T13:49:00-07:00 - I realize that the intention of the URL loading system in Three20 is geared at network resources, but it would be nice if, for testing purposes if nothing else, it were possible to use file URLs as well. The immediate failure seems to be in `TTRequestLoader`'s method `-connection:didReceiveResponse:`, which assumes (contrary to the documentation) that the response it receives will necessarily be an `NSHTTPURLResponse`, rather than the more general `NSURLResponse`. - -Replacing a couple of methods in TTRequestLoader will allow loading of files: - - - (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLResponse*)response { - _response = [response retain]; - long long contentLength = NSURLResponseUnknownLength; - - if ([response isKindOfClass:[NSHTTPURLResponse class]]) { - NSDictionary* headers = [(NSHTTPURLResponse*)response allHeaderFields]; - contentLength = [[headers objectForKey:@"Content-Length"] intValue]; - } - else { - contentLength = [response expectedContentLength]; - } - - if (contentLength > _queue.maxContentLength && _queue.maxContentLength) { - TTLOG(@"MAX CONTENT LENGTH EXCEEDED (%d) %@", contentLength, _URL); - [self cancel]; - } - else if (contentLength == NSURLResponseUnknownLength) { - contentLength = 0; - } - - _responseData = [[NSMutableData alloc] initWithCapacity:contentLength]; - } - -and - - - (void)connectionDidFinishLoading:(NSURLConnection *)connection { - TTNetworkRequestStopped(); - - if (![_response isKindOfClass:[NSHTTPURLResponse class]] && _response.statusCode == 200) { - [_queue performSelector:@selector(loader:didLoadResponse:data:) withObject:self - withObject:_response withObject:_responseData]; - } else { - TTLOG(@" FAILED LOADING (%d) %@", _response.statusCode, _URL); - NSError* error = [NSError errorWithDomain:NSURLErrorDomain code:_response.statusCode - userInfo:nil]; - [_queue performSelector:@selector(loader:didFailLoadWithError:) withObject:self - withObject:error]; - } - - TT_RELEASE_SAFELY(_responseData); - TT_RELEASE_SAFELY(_connection); - } - - - TTURLRequest doesn't work with file URLs - 2009-08-11T15:05:03-07:00 - - sixten - - - - - open - - - 73 - 0 - 2009-08-12T14:39:47-07:00 - Currently, I don't seem to be able to style the background of a UITableViewCell, because the native UILabel of the UITableViewCell being used by TTTableViewCell and all its derivatives doesn't allow for a transparent / non-opaque background. -For example, if you want a gradient background on a cell, the background of the label portion of the content view will always be white. - -I would be happy to contribute this change, as I have the modification working here were TTTableLinkedItemCell has a new property _contentLabel who's background can be set to transparent if using a cell background. - -Let me know if I'm otherwise missing something! -Thanks - - Request: Custom UILabel for TTTableLinkedItemCell or TTTableViewCell - 2009-08-12T14:39:47-07:00 - - dshanley - - - - open - - - 74 - 3 - 2009-08-12T18:09:06-07:00 - If there are more than 5 controllers in your Tab Bar, the SDK automatically gives you a "More..." view to display your extra controllers. If your controller is in the "More..." section then additional URLs are not properly opened. - -For example, I added a food item #1 to the TTNavigatorDemo's TabBarController.m implementation: - - - (void)viewDidLoad { - [self setTabURLs:[NSArray arrayWithObjects:@"tt://menu/1", - @"tt://menu/2", - @"tt://menu/3", - @"tt://menu/4", - @"tt://menu/5", - @"tt://food/1", - nil]]; - } - -The exact behavior depends on the specific controllers used. TTWebController URLs are broken, notably. Here is a screencast of poor behavior: http://screencast.com/t/9QWyoW9u - TTNavigator is broken for "More..." controllers in Tab Bar - 2009-12-19T06:17:34-08:00 - - ianterrell - - - - - open - - - 76 - 0 - 2009-08-17T10:35:46-07:00 - In [TTPhotoViewController updateChrome], UIView.title is set to a photo-specific value. This is bad when the TTPhotoViewController is displayed within a UITabBarController, which uses UIView.title in the tabBarItem. - -Suggest use of a separate photoTitle field within TTPhotoViewController. - TTPhotoViewController shouldn't set UIView.title for each photo - 2009-08-17T10:35:47-07:00 - - eelnhoj - - - - open - - - 77 - 0 - 2009-08-25T22:15:27-07:00 - I'm trying to remove an image from memory, cached by TTImageView, and then reload it from server (as the image changes at user's choice). However, they aren't getting off the dict in memory. I tried inspecting _imageCache dictionary and the URL was never removed from it. - -A bug? Or I'm missing something? - - // Doesn't work; File is not removed from memory with this: - [[TTURLCache sharedCache] invalidateURL:picturePath]; - - - // With this one, file is removed from disk, but not from memory again. - // Data is refreshed only when app reloads. - [[TTURLCache sharedCache] removeURL:picturePath fromDisk:YES]; - Not able to remove TTURLCache from memory - 2009-09-23T07:10:43-07:00 - - Gurpartap - - - - open - - - 79 - 2 - 2009-08-31T02:09:44-07:00 - Hi, some of my frinds told me, they could not show left and right overflow view in TTTabStrip. - -So, I do some work on it, and finally, I notice some changes between the newest version and branch 96e685b1c23ca2a90a2d26a329da79c60eafaa43 (which one is support 2.x OS). - -The difference has been found at the method - (CGSize)addToSize:(CGSize)size context:(TTStyleContext*)context of TTImageStyle in TTStyle.m. - -In the old branch, the code is -<pre>else if (_contentMode != UIViewContentModeScaleToFill - && _contentMode != UIViewContentModeScaleAspectFill - && _contentMode != UIViewContentModeScaleAspectFit)</pre> - -and the newest one is -<pre>else if (_contentMode == UIViewContentModeScaleToFill)</pre> - -and the default value of contentMode is UIViewContentModeScaleToFill. So, the size of TTImageStyle is not include the size of image. - -I don't know why you change the condition here, so I add one sentence set the contentMode to another one when TTTabStrip create the overflowRight and overflowLeft objects. - -The added sentence like: -<pre>[(TTImageStyle *)_overflowRight.style setContentMode:UIViewContentModeCenter];</pre> - -That's all. Sorry for my poor English - left and right overflow view missed in TTTabStrip. - 2009-11-18T15:08:51-08:00 - - Transparentmask - - - - open - - - 80 - 0 - 2009-08-31T07:26:44-07:00 - I upgraded to latest version of three20 and found out that deviceOrientationDidChange is commented out in TTScrollView.m. -My TTScrollView stopped adjusting to landscape-view. -Uncommenting these rows made everything work again. - -Should this method be commented out or is it a bug? - - TTScrollView.m deviceOrientationDidChange commented out - 2009-08-31T07:26:44-07:00 - - jakeri - - open - - - 81 - 1 - 2009-09-04T12:05:09-07:00 - Previously I'd been using the following method to delete rows from tables. I don't see anything similar in the Three20 classes and the method below won't even get called. - - - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { - //do work - } - Unable to delete rows/cells from table - 2009-12-21T18:50:08-08:00 - - lhackett - - - - open - - - 86 - 1 - 2009-09-21T14:18:30-07:00 - The line breaks still aren't working properly for long links. The link is truncated (usually at the /), but space is still allocated for the wrapped portion of the link. If you touch down on the link, the wrapped area is highlighted, but there is no text in it. - - CGRect screenBounds = [[UIScreen mainScreen] bounds]; - [self setWindow:[[[UIWindow alloc] initWithFrame:screenBounds] autorelease]]; - - UIView *v = [UIView instantiate]; - [v setFrame:[window frame]]; - [v setBackgroundColor:[UIColor whiteColor]]; - [window addSubview:v]; - - TTStyledTextLabel *label = [[[TTStyledTextLabel alloc] initWithFrame:CGRectZero] autorelease]; - [label setBackgroundColor:[UIColor colorWithWhite:.9 alpha:1.0]]; - [label setWidth:320]; - - [label setContentInset:UIEdgeInsetsMake(4, 4, 4, 4)]; - - NSString *xhtml = @"Long links get truncated: http://foo.com/ajdsajdhasjdhasjhsdhasdhasdlkahsdkhaslkdshdklashdkashdksah"; - [label setText:[TTStyledText textFromXHTML:xhtml lineBreaks:YES URLs:YES]]; - [label sizeToFit]; - [v addSubview:label]; - - CGRect labelBounds = [label bounds]; - [label setFrame:CGRectMake(0, screenBounds.size.height / 2 - labelBounds.size.height / 2, labelBounds.size.width, labelBounds.size.height)]; - - [window makeKeyAndVisible]; - Long links don't wrap properly in TTStyledTextLabels - 2009-09-21T14:52:05-07:00 - - richcollins - - - - open - - - 87 - 1 - 2009-09-21T19:32:34-07:00 - Consider a TTStyledTextLabel containing the following XHTML snippet: `Word1 Word2 Word3 Word4 Word5 <b>Word6 Word7</b> Word8 Word9 Word10`. - -If that line wraps in such a way as to produce something like the following: - -> Word1 Word2 Word3 Word4 -> Word5 <b>Word6 Word7</b> Word8 -> Word9 Word10 - -then Word5 is raised above the baseline by the height of the descender element of the font face. - -Proposed Patch: - --- - src/TTStyledLayout.m | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) - - diff --git a/src/TTStyledLayout.m b/src/TTStyledLayout.m - index 0b42e8a..f52250b 100644 - --- a/src/TTStyledLayout.m - +++ b/src/TTStyledLayout.m - @@ -218,7 +218,13 @@ - // XXXjoe Support top, bottom, and center alignment also - if (frame.height < _lineHeight) { - UIFont* font = frame.font ? frame.font : _font; - - [self offsetFrame:frame by:(_lineHeight - (frame.height - font.descender))]; - + CGFloat adjustmentOffset = _lineHeight - frame.height; - + - + // Text frame heights already include the descender - + if (![frame isKindOfClass:[TTStyledTextFrame class]]) { - + adjustmentOffset += font.descender; - + } - + [self offsetFrame:frame by:adjustmentOffset]; - } - frame = frame.nextFrame; - } - -- - TTStyledLayout adds descender height in breakLine method to height of TTStyledTextFrames which already include descender height - 2009-09-21T19:35:55-07:00 - - eakret - - - - - - open - - - 89 - 0 - 2009-09-24T07:34:00-07:00 - The removeURL is converting the specified URL into a key and using that key to remove the cache info. The problem is that the cached images are stored by their URL and not the URL KEY. So, I added the two line of code below to address this issue. I'm not sure what uses the URL KEY, so I just added the lines, not changing anything else. - -[_imageSortedList removeObject:URL]; -[_imageCache removeObjectForKey:URL]; - TTURLCache removeURL not removing - 2009-09-24T07:34:00-07:00 - - ItaloFSS - - - - - open - - - 90 - 1 - 2009-10-01T06:40:53-07:00 - Given the asynchronous nature of (remote) image loading any TTTableMessageItemCell cells that are reused display the 'old' (reused) image until the new image loads. This is confusing (especially on a slow link where images take a while to load.) - -This resolves it here, but I think there maybe be need to do this for a number of different cells (i.e. I've not traced every one through to see if they have similar issues.) - -- (void)prepareForReuse { - [super prepareForReuse]; - - _imageView2.image = nil; -} - - Cell Re-ue Cleanup - 2009-11-17T17:32:31-08:00 - - adamjack - - - - open - - - 91 - 1 - 2009-10-04T10:02:29-07:00 - TTImageStyle return always a CGSizeZero with default UIViewContentModeScaleToFill. - -Fix this, replacing (TTStyle.m, line 786): -_contentMode != UIViewContentModeScaleToFill -by : -_contentMode == UIViewContentModeScaleToFill - TTImageStyle and default currentMode - 2009-10-04T10:04:17-07:00 - - Brindavoine - - - - - open - - - 94 - 0 - 2009-10-16T10:57:49-07:00 - assume you have a controller that derives from TTTableViewController -assume you have a datasource that derives from TTListDataSource -and assume you added a TTTableMoreButton on your datasource to add more items (at the bottom of the table) using - (id)tableView:(UITableView*)tableView objectForRowAtIndexPath:(NSIndexPath*)indexPath; - - -The goal is to catch the user selection on the controller. -According to the Three20 source code you should override this on your controller. -- (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath; - -it is impossible to catch the click on a number of situations mainly when the user clicks the TTTableMoreButton button. - -The problem is that the default delegate identifies that you clicked on the TTTableMoreButton button and calls the model to load more items. when the model loads the datasource is being populated with more items and the cell is no longer of type TTTableMoreButton. - -IMHO the call to [_controller didSelectObject:object atIndexPath:indexPath]; -in - (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath; on TTTableViewDelegate happens too late. - -what happens when you try to investigate the cell that was clicked is that you get your own content cell (depends on what you used to populate the table). -Any ideas how I can simply identify what kind of cell was clicked without implementing a custom TTTableViewDelegate ? - - - - - TTTableViewDelegate call to [_controller didSelectObject:object atIndexPath:indexPath]; creates an impossible situation to catch - (void)didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath - 2009-10-16T10:57:49-07:00 - - yosit - - - - open - - - 96 - 0 - 2009-10-29T02:19:09-07:00 - I have an iPhone app with a Tab Bar Controller as the main interface. Some tabs uses TTTableViewController. I've observed that if I receive a MEMORY WARNING, the table views disappears. I saw a closed issue of the same problem, but that was closed 3 months ago. I'm seeing this problem using the current code (dated Oct 28, 2009). - -Any suggestions? - Empty table views after memory warning (Oct 17 2009 code) - 2009-11-17T17:51:55-08:00 - - fjtdichosa - - - - open - - - 97 - 0 - 2009-11-01T09:01:36-08:00 - I have a view that displays a bunch of views in a gridlayout. 1 view is a TTImageView. - -I am having a weird issue with only the imageView appearing on first request. Once it has been cached, I never see it again? - -Other issues im experiencing: - -* GridLayout is not accounting for the size of the image (guessing since its not loaded yet but i never even see my default image) -* TTImageView is never respecting the frame i gave it. I told it to NOT autoresize to the image size. - -I'm thinking im doing something wrong so maybe someone can point me to something? - TTImageView + TTGridLayout - 2009-11-01T09:01:36-08:00 - - stevemckenzie - - - - - open - - - 101 - 0 - 2009-11-07T03:08:06-08:00 - I was just wondering if anyone had and plans to do this. It seems like it should be relatively straightforward to implement or is there some other issue i am not aware of. Cheers. - - UITextAlignment not implemented on TTStyledTextLabel - 2009-11-07T03:08:06-08:00 - - bogorman - - - - open - - - 102 - 0 - 2009-11-08T05:03:05-08:00 - TTLauncherItem.h is missing a newline from the end of the file. This causes a compiler warning if GCC_WARN_ABOUT_MISSING_NEWLINE is turned on, and a compiler error if warnings are being treated as errors. - TTLauncherItem.h needs newline at end (GCC_WARN_ABOUT_MISSING_NEWLINE) - 2009-11-08T05:03:16-08:00 - - tewha - - - - open - - - 103 - 0 - 2009-11-08T13:52:45-08:00 - When the bannerView gets added to the overlayView the overlayView's frame is set to the full size of the tableView. The frame then gets passed on to the tableBannerView making the tableBannerView be full screen when it should only be 22 pixels high. - setTableBannerView:animated: frame gets set to the overlayView's frame - 2009-11-08T13:52:45-08:00 - - uprise78 - - - - open - - - 105 - 0 - 2009-11-20T14:03:30-08:00 - Developers at RogueSheep have stated an app was rejected for calling previousViewController, even though three20's implementation does not appear to be making private calls. It just happens to have the same name as a private SDK call. I posted about this issue here: - -http://groups.google.com/group/three20/browse_thread/thread/bcae33d8108ea573 - -Here is RogueSheep's original post: - -http://blog.roguesheep.com/2009/11/19/warning-love-hurts/ - -What is the opinion on this issue? - -Thanks, -Matt - previousViewController overwriting private SDK call? - 2009-11-20T18:23:52-08:00 - - eastmedia - - - - open - - - 111 - 0 - 2009-11-30T06:35:58-08:00 - The category UIViewAdditions accesses the private API of the UIView class, causing Apple to reject apps using Three20 - Three20 accessing private variables of UIView - 2009-12-07T15:12:31-08:00 - - nduplessis - - - - open - - - 113 - 0 - 2009-12-06T16:46:10-08:00 - This creates a nasty redirect loop every time you open the app. persistState: should be changed to check for if the URL is "about:blank", which gets set just before openURL: is called on the app delegate. - -- (BOOL)persistView:(NSMutableDictionary*)state { - NSString* URL = self.URL.absoluteString; - if (URL.length && ![URL isEqualToString:@"about:blank"]) { - [state setObject:URL forKey:@"URL"]; - return YES; - } else { - return NO; - } -} - TTWebController should not persist itself when it loads an external URL - 2009-12-07T15:38:21-08:00 - - uprise78 - - - - - - open - - - 115 - 0 - 2009-12-15T07:31:21-08:00 - Creating complex custom table view cell subclasses is hard when it should be possible to insert them into regular and grouped table views, as portions of the view just seem to get cut of and the size of the frame is not correctly set. - -It would be a nice addition to Three20 if the TTTableViewDataSource, which knows if the table view is in a grouped mode, would set a flag on TTTableViewCell if it is in a grouped table view. - -We could then fetch this flag in layoutSubviews and adjust to grouped table view mode. - TTTableViewCell should have a flag if it is in a grouped table view - 2009-12-15T09:14:34-08:00 - - SaschaKonietzke - - - - open - - - 116 - 0 - 2009-12-15T23:56:13-08:00 - The document of UIViewController says "initWithNibName:bundle: is the designated initializer. - -// The designated initializer. If you subclass UIViewController, you must call the super implementation of this method, even if you aren't using a NIB. - -But TTViewController has its init and does not call super's initWithNibName:bundle:. I think this is design error. Actually I have trouble with subclassing TTViewController, which supply its Nib name on its init method. - - - TTViewController and UIViewController's designated initializer - 2009-12-15T23:56:13-08:00 - - basuke - - - - - open - - - 117 - 0 - 2009-12-16T19:44:24-08:00 - TTStyleText objects seem to ignore their parent frame when calculating where to draw the text. This causes problems when using autoresizesToFit, as the font size calculation is then incorrect. - -Reproduce this with the following TTStyleText object: - - textStyle = [TTTextStyle styleWithFont:[UIFont boldSystemFontOfSize:18] - color:[UIColor whiteColor] - minimumFontSize: 12 - shadowColor:nil - shadowOffset:CGSizeZero - textAlignment:UITextAlignmentCenter - verticalAlignment:UIControlContentVerticalAlignmentCenter - lineBreakMode:UILineBreakModeTailTruncation - numberOfLines:1 next:nil]; - Centered, autoresizesToFit TTStyleText not respecting frame bounds - 2009-12-16T19:44:24-08:00 - - jverkoey - - - - open - - - 118 - 0 - 2009-12-17T08:10:01-08:00 - A disk cache is nice, but I can't see ETag or Last-Modified mentioned in the code? - TTURLRequest doesn't appear to support conditional GET? - 2009-12-17T08:10:01-08:00 - - jabley - - - - open - - - diff --git a/src/extThree20XML/UnitTests/extXMLTests.m b/src/extThree20XML/UnitTests/extXMLTests.m deleted file mode 100644 index 59650d0431..0000000000 --- a/src/extThree20XML/UnitTests/extXMLTests.m +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright 2009-2011 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// See: http://bit.ly/hS5nNh for unit test macros. -// See Also: http://bit.ly/hgpqd2 - -#import - -// extXML -#import "extThree20XML/TTXMLParser.h" - -// Core -#import "Three20Core/TTCorePreprocessorMacros.h" - -/** - * Unit tests for the Core XML parser. These tests are a part of the comprehensive test suite - * for the Core functionality of the library. - */ -@interface extXMLTests : SenTestCase -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation extXMLTests - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)testXMLParser { - NSBundle* testBundle = [NSBundle bundleWithIdentifier:@"com.facebook.three20.UnitTests"]; - STAssertTrue(nil != testBundle, @"Unable to find the bundle %@", [NSBundle allBundles]); - - NSString* xmlDataPath = [[testBundle bundlePath] - stringByAppendingPathComponent:@"testcase.xml"]; - NSData* xmlData = [[NSData alloc] initWithContentsOfFile:xmlDataPath]; - - STAssertTrue(nil != xmlData, @"Unable to find the xml test file in %@", xmlDataPath); - - TTXMLParser* parser = [[TTXMLParser alloc] initWithData:xmlData]; - [parser parse]; - STAssertTrue([parser.rootObject isKindOfClass:[NSDictionary class]], - @"Root object should be an NSDictionary"); - - NSDictionary* rootObject = parser.rootObject; - STAssertTrue([[rootObject nameForXMLNode] isEqualToString:@"issues"], - @"Root object name should be 'issues'"); - STAssertTrue([[rootObject typeForXMLNode] isEqualToString:@"array"], - @"Root object type should be 'array'"); - STAssertTrue([[rootObject objectForXMLNode] isKindOfClass:[NSArray class]], - @"Root object type should be 'array'"); - - NSArray* issues = [rootObject objectForXMLNode]; - STAssertEquals((NSUInteger)50, [issues count], @"There should be 50 issues in the array"); - - NSDictionary* issue = [issues objectAtIndex:0]; - STAssertTrue([issue isKindOfClass:[NSDictionary class]], - @"The issue node should be an NSDictionary"); - STAssertTrue([[issue objectForKey:@"number"] isKindOfClass:[NSDictionary class]], - @"The number node should be an NSDictionary"); - - NSDictionary* number = [issue objectForKey:@"number"]; - STAssertTrue([[number objectForXMLNode] isKindOfClass:[NSNumber class]], - @"The number object should be an NSNumber"); - STAssertEquals(3, [[number objectForXMLNode] intValue], - @"The number value should be 3"); - - - TT_RELEASE_SAFELY(parser); -} - - -@end diff --git a/src/extThree20XML/extThree20XML.xcodeproj/project.pbxproj b/src/extThree20XML/extThree20XML.xcodeproj/project.pbxproj deleted file mode 100755 index c16b2b95f7..0000000000 --- a/src/extThree20XML/extThree20XML.xcodeproj/project.pbxproj +++ /dev/null @@ -1,653 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 660997C6129396F0007B1E07 /* TTExtensionLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 660997C2129396F0007B1E07 /* TTExtensionLoader.m */; }; - 660997C912939700007B1E07 /* TTExtensionLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 660997C712939700007B1E07 /* TTExtensionLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 663DB1A6126625B400CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m in Sources */ = {isa = PBXBuildFile; fileRef = 663DB1A5126625B400CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m */; }; - 6E3C3468118806430079637E /* TTURLXMLResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3466118806430079637E /* TTURLXMLResponse.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3469118806430079637E /* TTXMLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3C3467118806430079637E /* TTXMLParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C346C1188064F0079637E /* TTURLXMLResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C346A1188064F0079637E /* TTURLXMLResponse.m */; }; - 6E3C346D1188064F0079637E /* TTXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C346B1188064F0079637E /* TTXMLParser.m */; }; - 6E3C3470118806590079637E /* extThree20XML.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E646518118805EB00F08CB1 /* extThree20XML.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E3C3484118807050079637E /* extXMLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E3C3483118807050079637E /* extXMLTests.m */; }; - 6E3C34A3118807A70079637E /* testcase.xml in Resources */ = {isa = PBXBuildFile; fileRef = 6E3C34A2118807A70079637E /* testcase.xml */; }; - 6E645AA111876E2B00F08CB1 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E645A7011876D3F00F08CB1 /* libThree20Core.a */; }; - 6E645AA211876E2D00F08CB1 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E645A7911876D4600F08CB1 /* libThree20Network.a */; }; - 6EB460DA1183D8CB00685649 /* libextThree20XML.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEF31F3A0F352DF5000DE5D2 /* libextThree20XML.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E645A6F11876D3F00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645A7111876D3F00F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645A7811876D4600F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E645A7A11876D4600F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645A7C11876D5800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E645A7E11876D5800F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E645AA511876E3500F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E645AA711876E3500F08CB1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EB9E6C6110B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EB460DD1183D8D400685649 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = extThree20XML; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 660997C2129396F0007B1E07 /* TTExtensionLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTExtensionLoader.m; path = Source/TTExtensionLoader.m; sourceTree = ""; }; - 660997C712939700007B1E07 /* TTExtensionLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTExtensionLoader.h; path = Headers/TTExtensionLoader.h; sourceTree = ""; }; - 66313DC61267C0CB00C09C9F /* extThree20XML_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extThree20XML_Prefix.pch; path = Headers/extThree20XML_Prefix.pch; sourceTree = ""; }; - 663DB1A5126625B400CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Xcode324iOS41TestSuiteWorkaround.m; path = ../UnitTests/Xcode324iOS41TestSuiteWorkaround.m; sourceTree = SOURCE_ROOT; }; - 6E3C3466118806430079637E /* TTURLXMLResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTURLXMLResponse.h; path = Headers/TTURLXMLResponse.h; sourceTree = ""; }; - 6E3C3467118806430079637E /* TTXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTXMLParser.h; path = Headers/TTXMLParser.h; sourceTree = ""; }; - 6E3C346A1188064F0079637E /* TTURLXMLResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTURLXMLResponse.m; path = Source/TTURLXMLResponse.m; sourceTree = ""; }; - 6E3C346B1188064F0079637E /* TTXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTXMLParser.m; path = Source/TTXMLParser.m; sourceTree = ""; }; - 6E3C3483118807050079637E /* extXMLTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = extXMLTests.m; path = UnitTests/extXMLTests.m; sourceTree = ""; }; - 6E3C34A2118807A70079637E /* testcase.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = testcase.xml; path = UnitTests/Resources/XML/testcase.xml; sourceTree = ""; }; - 6E55A4B31183CA80002768DE /* Library.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Library.xcconfig; path = Configurations/Library.xcconfig; sourceTree = ""; }; - 6E6454021184BDD500F08CB1 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Project.xcconfig; path = Configurations/Project.xcconfig; sourceTree = ""; }; - 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E646518118805EB00F08CB1 /* extThree20XML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extThree20XML.h; path = Headers/extThree20XML.h; sourceTree = ""; }; - 6EB460921183D16000685649 /* UnitTests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "UnitTests-Info.plist"; path = "UnitTests/Resources/PropertyLists/UnitTests-Info.plist"; sourceTree = ""; }; - 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = UnitTests.xcconfig; path = Configurations/UnitTests.xcconfig; sourceTree = ""; }; - BEF31F3A0F352DF5000DE5D2 /* libextThree20XML.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libextThree20XML.a; sourceTree = BUILT_PRODUCTS_DIR; }; - EB9E6C6210B6A8F800DE563C /* extJSONUnitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = extJSONUnitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - BEF31F380F352DF5000DE5D2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5F10B6A8F800DE563C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E645AA111876E2B00F08CB1 /* libThree20Core.a in Frameworks */, - 6E645AA211876E2D00F08CB1 /* libThree20Network.a in Frameworks */, - 6EB460DA1183D8CB00685649 /* libextThree20XML.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - BEF31F3A0F352DF5000DE5D2 /* libextThree20XML.a */, - EB9E6C6210B6A8F800DE563C /* extJSONUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 6E646518118805EB00F08CB1 /* extThree20XML.h */, - 66313DC61267C0CB00C09C9F /* extThree20XML_Prefix.pch */, - 660997C712939700007B1E07 /* TTExtensionLoader.h */, - 660997C2129396F0007B1E07 /* TTExtensionLoader.m */, - 6EB4609C1183D1E000685649 /* Source */, - 6E645A4311876CFE00F08CB1 /* Dependencies */, - 6ED118E41183C38A0096AEBF /* Configurations */, - 6ED117ED1183BE770096AEBF /* Tests */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 663DB1A4126625B400CF8CEA /* Xcode 3.2.4 Workaround */ = { - isa = PBXGroup; - children = ( - 663DB1A5126625B400CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m */, - ); - name = "Xcode 3.2.4 Workaround"; - sourceTree = ""; - }; - 6E3C3472118806640079637E /* Vendors */ = { - isa = PBXGroup; - children = ( - 6E3C3473118806670079637E /* Three20 */, - ); - name = Vendors; - sourceTree = ""; - }; - 6E3C3473118806670079637E /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E3C3467118806430079637E /* TTXMLParser.h */, - 6E3C346B1188064F0079637E /* TTXMLParser.m */, - ); - name = Three20; - sourceTree = ""; - }; - 6E645A4311876CFE00F08CB1 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */, - 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6E645A6B11876D3F00F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E645A7011876D3F00F08CB1 /* libThree20Core.a */, - 6E645A7211876D3F00F08CB1 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E645A7411876D4600F08CB1 /* Products */ = { - isa = PBXGroup; - children = ( - 6E645A7911876D4600F08CB1 /* libThree20Network.a */, - 6E645A7B11876D4600F08CB1 /* NetworkUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6EB4609C1183D1E000685649 /* Source */ = { - isa = PBXGroup; - children = ( - 6E3C3466118806430079637E /* TTURLXMLResponse.h */, - 6E3C346A1188064F0079637E /* TTURLXMLResponse.m */, - 6E3C3472118806640079637E /* Vendors */, - ); - name = Source; - sourceTree = ""; - }; - 6ED117E51183BE2A0096AEBF /* Resources */ = { - isa = PBXGroup; - children = ( - 6E3C34A2118807A70079637E /* testcase.xml */, - 6EB460921183D16000685649 /* UnitTests-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 6ED117ED1183BE770096AEBF /* Tests */ = { - isa = PBXGroup; - children = ( - 6ED117E51183BE2A0096AEBF /* Resources */, - 663DB1A4126625B400CF8CEA /* Xcode 3.2.4 Workaround */, - 6E3C3483118807050079637E /* extXMLTests.m */, - ); - name = Tests; - sourceTree = ""; - }; - 6ED118E41183C38A0096AEBF /* Configurations */ = { - isa = PBXGroup; - children = ( - 6E55A4B31183CA80002768DE /* Library.xcconfig */, - 6E6454021184BDD500F08CB1 /* Project.xcconfig */, - 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */, - ); - name = Configurations; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - BEF31F360F352DF5000DE5D2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3C3468118806430079637E /* TTURLXMLResponse.h in Headers */, - 6E3C3469118806430079637E /* TTXMLParser.h in Headers */, - 6E3C3470118806590079637E /* extThree20XML.h in Headers */, - 660997C912939700007B1E07 /* TTExtensionLoader.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - BEF31F390F352DF5000DE5D2 /* extThree20XML */ = { - isa = PBXNativeTarget; - buildConfigurationList = BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "extThree20XML" */; - buildPhases = ( - BEF31F360F352DF5000DE5D2 /* Headers */, - 6E3C34AD118807DC0079637E /* Protect Copied Headers */, - BEF31F370F352DF5000DE5D2 /* Sources */, - 668E66BF131AE03600ACE4AB /* Lint */, - BEF31F380F352DF5000DE5D2 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6E645A7D11876D5800F08CB1 /* PBXTargetDependency */, - 6E645A7F11876D5800F08CB1 /* PBXTargetDependency */, - ); - name = extThree20XML; - productName = Three20; - productReference = BEF31F3A0F352DF5000DE5D2 /* libextThree20XML.a */; - productType = "com.apple.product-type.library.static"; - }; - EB9E6C6110B6A8F800DE563C /* extThree20XMLUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "extThree20XMLUnitTests" */; - buildPhases = ( - EB9E6C5D10B6A8F800DE563C /* Resources */, - EB9E6C5E10B6A8F800DE563C /* Sources */, - EB9E6C5F10B6A8F800DE563C /* Frameworks */, - EB9E6C6010B6A8F800DE563C /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 6E645AA611876E3500F08CB1 /* PBXTargetDependency */, - 6E645AA811876E3500F08CB1 /* PBXTargetDependency */, - 6EB460DE1183D8D400685649 /* PBXTargetDependency */, - ); - name = extThree20XMLUnitTests; - productName = CoreUnitTests; - productReference = EB9E6C6210B6A8F800DE563C /* extJSONUnitTests.octest */; - productType = "com.apple.product-type.bundle"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "extThree20XML" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6E645A6B11876D3F00F08CB1 /* Products */; - ProjectRef = 6E645A6A11876D3F00F08CB1 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E645A7411876D4600F08CB1 /* Products */; - ProjectRef = 6E645A7311876D4600F08CB1 /* Three20Network.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - BEF31F390F352DF5000DE5D2 /* extThree20XML */, - EB9E6C6110B6A8F800DE563C /* extThree20XMLUnitTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E645A7011876D3F00F08CB1 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E645A6F11876D3F00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645A7211876D3F00F08CB1 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E645A7111876D3F00F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645A7911876D4600F08CB1 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E645A7811876D4600F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E645A7B11876D4600F08CB1 /* NetworkUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = NetworkUnitTests.octest; - remoteRef = 6E645A7A11876D4600F08CB1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - EB9E6C5D10B6A8F800DE563C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3C34A3118807A70079637E /* testcase.xml in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 668E66BF131AE03600ACE4AB /* Lint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/usr/bin/env python ../scripts/lint"; - shellScript = ""; - showEnvVarsInLog = 0; - }; - 6E3C34AD118807DC0079637E /* Protect Copied Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Protect Copied Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = "/bin/sh ../scripts/Protect.command"; - shellScript = ""; - }; - EB9E6C6010B6A8F800DE563C /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - BEF31F370F352DF5000DE5D2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3C346C1188064F0079637E /* TTURLXMLResponse.m in Sources */, - 6E3C346D1188064F0079637E /* TTXMLParser.m in Sources */, - 660997C6129396F0007B1E07 /* TTExtensionLoader.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EB9E6C5E10B6A8F800DE563C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3C3484118807050079637E /* extXMLTests.m in Sources */, - 663DB1A6126625B400CF8CEA /* Xcode324iOS41TestSuiteWorkaround.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E645A7D11876D5800F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E645A7C11876D5800F08CB1 /* PBXContainerItemProxy */; - }; - 6E645A7F11876D5800F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E645A7E11876D5800F08CB1 /* PBXContainerItemProxy */; - }; - 6E645AA611876E3500F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6E645AA511876E3500F08CB1 /* PBXContainerItemProxy */; - }; - 6E645AA811876E3500F08CB1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = UnitTests; - targetProxy = 6E645AA711876E3500F08CB1 /* PBXContainerItemProxy */; - }; - 6EB460DE1183D8D400685649 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BEF31F390F352DF5000DE5D2 /* extThree20XML */; - targetProxy = 6EB460DD1183D8D400685649 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 6E92493F112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924940112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( - EXTJSON_SBJSON, - DEBUG, - ); - PREBINDING = NO; - RUN_CLANG_STATIC_ANALYZER = YES; - SDKROOT = iphoneos; - }; - name = Internal; - }; - 6E924941112C6F4000531F03 /* Internal */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Internal; - }; - BEF31F3B0F352DF6000DE5D2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - EXTJSON_SBJSON, - DEBUG, - ); - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - BEF31F3C0F352DF6000DE5D2 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E55A4B31183CA80002768DE /* Library.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_PREPROCESSOR_DEFINITIONS = EXTJSON_SBJSON; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6E6454021184BDD500F08CB1 /* Project.xcconfig */; - buildSettings = { - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_LDFLAGS = "-ObjC"; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Release; - }; - EB9E6C6510B6A8F900DE563C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - PREBINDING = NO; - SDKROOT = iphoneos; - }; - name = Debug; - }; - EB9E6C6610B6A8F900DE563C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6EB460A61183D2AC00685649 /* UnitTests.xcconfig */; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - PREBINDING = NO; - SDKROOT = iphoneos; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - BEF31F410F352E14000DE5D2 /* Build configuration list for PBXNativeTarget "extThree20XML" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BEF31F3B0F352DF6000DE5D2 /* Debug */, - 6E924940112C6F4000531F03 /* Internal */, - BEF31F3C0F352DF6000DE5D2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "extThree20XML" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - 6E92493F112C6F4000531F03 /* Internal */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EB9E6C6710B6A8F900DE563C /* Build configuration list for PBXNativeTarget "extThree20XMLUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EB9E6C6510B6A8F900DE563C /* Debug */, - 6E924941112C6F4000531F03 /* Internal */, - EB9E6C6610B6A8F900DE563C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/scripts/Build.command b/src/scripts/Build.command deleted file mode 100644 index 314cb4802a..0000000000 --- a/src/scripts/Build.command +++ /dev/null @@ -1,138 +0,0 @@ -# -# Copyright 2009-2010 Facebook -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -Usage() -{ - builtin echo "iPhone Build Script, version 1.0" - builtin echo "Usage: Build.command " - builtin echo " = A SDK Version" - builtin echo " Available = [3.0, for example]" - builtin echo " = A Build Configuration" - builtin echo " Available = [Debug | Internal | Release]" - builtin echo "" -} - -set -e - -# process arguments -if [ $# -eq 1 ]; then - SELECTED_SDK_VERSION="$1" - Usage - exit 1 -elif [ $# -eq 2 ]; then - SELECTED_SDK_VERSION="$1" - SELECTED_BUILD_CONFIGURATION="$2" -else - Usage - exit 1 -fi - -echo $TARGET_SDK_VERSION -echo $TARGET_SDK_TYPE - -# ================================================================================ -# Debug | Profile | Release | Adhoc | Distribution -# ================================================================================ - -export BUILD_CONFIGURATION=$SELECTED_BUILD_CONFIGURATION -export BUILD_SDK_VERSION=$SELECTED_SDK_VERSION - - -# ================================================================================ -# iphoneos[*] | iphonesimulator[*] -# ================================================================================ - -export BUILD_DEVICE_SDK_NAME=iphoneos -export BUILD_SIMULATOR_SDK_NAME=iphonesimulator - -export BUILD_DEVICE_SDK=$BUILD_DEVICE_SDK_NAME$BUILD_SDK_VERSION -export BUILD_SIMULATOR_SDK=$BUILD_SIMULATOR_SDK_NAME$BUILD_SDK_VERSION - - -# ================================================================================ -# Current working directory. -# ================================================================================ - -export BUILD_ROOT=$PWD/.. -export LIBRARIES_ROOT=$PWD/.. - - -# ================================================================================ -# Location of Shared Build Directory -# ================================================================================ - -export BUILD_DIR=../../Build - -# ================================================================================ -# Location of Shared Build Libraries -# ================================================================================ - -export BUILD_SDK_DIR=$BUILD_DIR - -echo "Xcode Version" -echo "________________________________________________________________________________" -xcodebuild -version -echo "" - -echo "Available SDKs" -echo "________________________________________________________________________________" -xcodebuild -showsdks -echo "" - -echo "SDK Versions" -echo "________________________________________________________________________________" -xcodebuild -version -sdk $BUILD_DEVICE_SDK -xcodebuild -version -sdk $BUILD_SIMULATOR_SDK -echo "" - - -echo "Build Configuration" -echo "________________________________________________________________________________" - -echo "Build Configuration =" $BUILD_CONFIGURATION -echo "Build SDK Version =" $BUILD_SDK_VERSION -echo "Device SDK Name =" $BUILD_DEVICE_SDK -echo "Simulator SDK Name =" $BUILD_SIMULATOR_SDK -echo "Root Build Directory =" $BUILD_ROOT -echo "Deployment Directory =" $BUILD_SDK_DIR -echo "" - - -# ================================================================================ -# Clean -# ================================================================================ - -echo "Cleaning Deployed Libraries" -echo "________________________________________________________________________________" - -#rm -dRfv $BUILD_SDK_DIR - - -# ================================================================================ -# Libraries -# ================================================================================ - -Process() -{ - echo "Building " $1 - echo "________________________________________________________________________________" - cd $LIBRARIES_ROOT/$1 - - xcodebuild -sdk $BUILD_DEVICE_SDK -target $2 -configuration $BUILD_CONFIGURATION -project $1.xcodeproj build - xcodebuild -sdk $BUILD_SIMULATOR_SDK -target $2 -configuration $BUILD_CONFIGURATION -project $1.xcodeproj build -} - -Process Three20UI Three20UI diff --git a/src/scripts/Clean.command b/src/scripts/Clean.command deleted file mode 100644 index 34d4723815..0000000000 --- a/src/scripts/Clean.command +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright 2009-2010 Facebook -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Ignore whitespace characters in paths -IFS=$'\n' - -cleanAction () { - cd ${SRCROOT} - rm -f Three20Core/*.h - rm -f Three20Network/*.h - rm -f Three20Style/*.h - rm -f Three20UICommon/*.h - rm -f Three20UINavigator/*.h - rm -f Three20UI/*.h - rm -f Three20/*.h -} - -case $ACTION in - "clean") - cleanAction - ;; -esac - -exit 0 diff --git a/src/scripts/Paths.py b/src/scripts/Paths.py deleted file mode 100644 index 5308c052e5..0000000000 --- a/src/scripts/Paths.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -Paths.py - -Created by Jeff Verkoeyen on 2010-10-18. -Copyright 2009-2010 Facebook - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import os - -script_dir = os.path.dirname(os.path.realpath(__file__)) -src_dir = os.path.dirname(script_dir) diff --git a/src/scripts/Pbxproj.html b/src/scripts/Pbxproj.html deleted file mode 100644 index 6df0fb4287..0000000000 --- a/src/scripts/Pbxproj.html +++ /dev/null @@ -1,161 +0,0 @@ - - -Python: module Pbxproj - - - - -
 
- 
Pbxproj
index
/Users/featherless/workbench/ios/three20/src/scripts/Pbxproj.py
-

Pbxproj.py

-Working with the pbxproj file format is a pain in the ass.

-This object provides a couple basic features for parsing pbxproj files:

-* Getting a dependency list
-* Adding one pbxproj to another pbxproj as a dependency

-Version 1.0.

-History:
-1.0 - October 20, 2010: Initial hacked-together version finished. It is alive!

-Created by Jeff Verkoeyen on 2010-10-18.
-Copyright 2009-2010 Facebook

-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at

-   http://www.apache.org/licenses/LICENSE-2.0

-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.

-

- - - - - -
 
-Modules
       
Paths
-hashlib
-
logging
-os
-
re
-sys
-

- - - - - -
 
-Classes
       
-
__builtin__.object -
-
-
Pbxproj -
-
-
-

- - - - - -
 
-class Pbxproj(__builtin__.object)
    Methods defined here:
-
__init__(self, name)
# Valid names
-# Three20
-# Three20:Three20-Xcode3.2.5
-# /path/to/project.xcodeproj/project.pbxproj
- -
__str__(self)
- -
add_build_setting(self, configuration, setting_name, value)
- -
add_buildfile(self, name, file_ref_hash, default_guid)
# Add a line to the PBXBuildFile section.
-#
-# <default_guid> /* <name> in Frameworks */ = {isa = PBXBuildFile; fileRef = <file_ref_hash> /* <name> */; };
-#
-# Returns: <default_guid> if a line was added.
-#          Otherwise, the existing guid is returned.
- -
add_dependency(self, dep)
- -
add_file_to_frameworks(self, name, guid)
# Add a file to the Frameworks PBXGroup.
-#
-# <guid> /* <name> */,
- -
add_file_to_frameworks_phase(self, name, guid)
- -
add_filereference(self, name, file_type, default_guid, rel_path, source_tree)
# Add a line to the PBXFileReference section.
-#
-# <default_guid> /* <name> */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.<file_type>"; name = <name>; path = <rel_path>; sourceTree = <source_tree>; };
-#
-# Returns: <default_guid> if a line was added.
-#          Otherwise, the existing guid is returned.
- -
add_framework(self, framework)
- -
add_header_search_path(self, configuration)
- -
dependencies(self)
# Get and cache the dependencies for this project.
- -
get_hash_base(self, uniquename)
- -
get_project_data(self)
# Load the project data from disk.
- -
guid(self)
- -
path(self)
- -
set_project_data(self, project_data)
# Write the project data to disk.
- -
uniqueid(self)
- -
xcodeprojpath(self)
# A pbxproj file is contained within an xcodeproj file.
-# This method simply strips off the project.pbxproj part of the path.
- -
-Static methods defined here:
-
get_pbxproj_by_name(name)
- -
-Data descriptors defined here:
-
__dict__
-
dictionary for instance variables (if defined)
-
-
__weakref__
-
list of weak references to the object (if defined)
-
-

- - - - - -
 
-Functions
       
commonpath(l1, l2, common=[])
-
pathsplit(p, rest=[])
# The following relative path methods recyled from:
-# http://code.activestate.com/recipes/208993-compute-relative-path-from-one-directory-to-anothe/
-# Author: Cimarron Taylor
-# Date: July 6, 2003
-
relpath(p1, p2)
-

- - - - - -
 
-Data
       pbxproj_cache = {}
- \ No newline at end of file diff --git a/src/scripts/Pbxproj.py b/src/scripts/Pbxproj.py deleted file mode 100644 index 65c270a464..0000000000 --- a/src/scripts/Pbxproj.py +++ /dev/null @@ -1,948 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -Pbxproj.py - -Working with the pbxproj file format is a pain in the ass. - -This object provides a couple basic features for parsing pbxproj files: - -* Getting a dependency list -* Adding one pbxproj to another pbxproj as a dependency - -Version 1.1. - -History: -1.0 - October 20, 2010: Initial hacked-together version finished. It is alive! -1.1 - January 11, 2011: Add configuration settings to all configurations by default. - -Created by Jeff Verkoeyen on 2010-10-18. -Copyright 2009-2011 Facebook - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import hashlib -import logging -import os -import re -import sys -import Paths - -pbxproj_cache = {} - -# The following relative path methods recyled from: -# http://code.activestate.com/recipes/208993-compute-relative-path-from-one-directory-to-anothe/ -# Author: Cimarron Taylor -# Date: July 6, 2003 -def pathsplit(p, rest=[]): - (h,t) = os.path.split(p) - if len(h) < 1: return [t]+rest - if len(t) < 1: return [h]+rest - return pathsplit(h,[t]+rest) - -def commonpath(l1, l2, common=[]): - if len(l1) < 1: return (common, l1, l2) - if len(l2) < 1: return (common, l1, l2) - if l1[0] != l2[0]: return (common, l1, l2) - return commonpath(l1[1:], l2[1:], common+[l1[0]]) - -def relpath(p1, p2): - (common,l1,l2) = commonpath(pathsplit(p1), pathsplit(p2)) - p = [] - if len(l1) > 0: - p = [ '../' * len(l1) ] - p = p + l2 - return os.path.join( *p ) - -class Pbxproj(object): - - @staticmethod - def get_pbxproj_by_name(name, xcode_version = None): - if name not in pbxproj_cache: - pbxproj_cache[name] = Pbxproj(name, xcode_version = xcode_version) - - return pbxproj_cache[name] - - # Valid names - # Three20 - # Three20:Three20-Xcode3.2.5 - # /path/to/project.xcodeproj/project.pbxproj - def __init__(self, name, xcode_version = None): - self._project_data = None - - parts = name.split(':') - self.name = parts[0] - - if len(parts) > 1: - self.target = parts[1] - else: - valid_file_chars = '[a-zA-Z0-9\.\-:+ "\'!@#$%^&*\(\)]'; - if re.match('^'+valid_file_chars+'+$', self.name): - self.target = self.name - else: - result = re.search('('+valid_file_chars+'+)\.xcodeproj', self.name) - if not result: - self.target = self.name - else: - (self.target, ) = result.groups() - - match = re.search('([^/\\\\]+)\.xcodeproj', self.name) - if not match: - self._project_name = self.name - else: - (self._project_name, ) = match.groups() - - self._guid = None - self._deps = None - self._xcode_version = xcode_version - self._projectVersion = None - self.guid() - - def __str__(self): - return str(self.name)+" target:"+str(self.target)+" guid:"+str(self._guid)+" prodguid: "+self._product_guid+" prodname: "+self._product_name - - def uniqueid(self): - return self.name + ':' + self.target - - def path(self): - # TODO: No sense calculating this every time, just store it when we get the name. - if re.match('^[a-zA-Z0-9\.\-:+"]+$', self.name): - return os.path.join(Paths.src_dir, self.name.strip('"'), self.name.strip('"')+'.xcodeproj', 'project.pbxproj') - elif not re.match('project.pbxproj$', self.name): - return os.path.join(self.name, 'project.pbxproj') - else: - return self.name - - # A pbxproj file is contained within an xcodeproj file. - # This method simply strips off the project.pbxproj part of the path. - def xcodeprojpath(self): - return os.path.dirname(self.path()) - - def guid(self): - if not self._guid: - self.dependencies() - - return self._guid - - def version(self): - if not self._projectVersion: - self.dependencies() - - return self._projectVersion - - # Load the project data from disk. - def get_project_data(self): - if self._project_data is None: - if not os.path.exists(self.path()): - logging.info("Couldn't find the project at this path:") - logging.info(self.path()) - return None - - project_file = open(self.path(), 'r') - self._project_data = project_file.read() - - return self._project_data - - # Write the project data to disk. - def set_project_data(self, project_data): - if self._project_data != project_data: - self._project_data = project_data - project_file = open(self.path(), 'w') - project_file.write(self._project_data) - - # Get and cache the dependencies for this project. - def dependencies(self): - if self._deps is not None: - return self._deps - - project_data = self.get_project_data() - - if project_data is None: - logging.error("Unable to open the project file at this path (is it readable?): "+self.path()) - return None - - # Get project file format version - - result = re.search('\tobjectVersion = ([0-9]+);', project_data) - - if not result: - logging.error("Can't recover: unable to find the project version for your target at: "+self.path()) - return None - - (self._projectVersion,) = result.groups() - self._projectVersion = int(self._projectVersion) - - # Get configuration list guid - - result = re.search('[A-Z0-9]+ \/\* '+re.escape(self.target)+' \*\/ = {\n[ \t]+isa = PBXNativeTarget;(?:.|\n)+?buildConfigurationList = ([A-Z0-9]+) \/\* Build configuration list for PBXNativeTarget "'+re.escape(self.target)+'" \*\/;', - project_data) - - if result: - (self.configurationListGuid, ) = result.groups() - else: - self.configurationListGuid = None - - - # Get configuration list - - if self.configurationListGuid: - match = re.search(re.escape(self.configurationListGuid)+' \/\* Build configuration list for PBXNativeTarget "'+re.escape(self.target)+'" \*\/ = \{\n[ \t]+isa = XCConfigurationList;\n[ \t]+buildConfigurations = \(\n((?:.|\n)+?)\);', project_data) - if not match: - logging.error("Couldn't find the configuration list.") - return False - - (configurationList,) = match.groups() - self.configurations = re.findall('[ \t]+([A-Z0-9]+) \/\* (.+) \*\/,\n', configurationList) - - # Get build phases - - result = re.search('([A-Z0-9]+) \/\* '+re.escape(self.target)+' \*\/ = {\n[ \t]+isa = PBXNativeTarget;(?:.|\n)+?buildPhases = \(\n((?:.|\n)+?)\);', - project_data) - - if not result: - logging.error("Can't recover: Unable to find the build phases from your target at: "+self.path()) - return None - - (self._guid, buildPhases, ) = result.groups() - - # Get the build phases we care about. - - match = re.search('([A-Z0-9]+) \/\* Resources \*\/', buildPhases) - if match: - (self._resources_guid, ) = match.groups() - else: - self._resources_guid = None - - match = re.search('([A-Z0-9]+) \/\* Frameworks \*\/', buildPhases) - if not match: - logging.error("Couldn't find the Frameworks phase from: "+self.path()) - logging.error("Please add a New Link Binary With Libraries Build Phase to your target") - logging.error("Right click your target in the project, Add, New Build Phase,") - logging.error(" \"New Link Binary With Libraries Build Phase\"") - return None - - (self._frameworks_guid, ) = match.groups() - - # Get the dependencies - - result = re.search(re.escape(self._guid)+' \/\* '+re.escape(self.target)+' \*\/ = {\n[ \t]+isa = PBXNativeTarget;(?:.|\n)+?dependencies = \(\n((?:[ \t]+[A-Z0-9]+ \/\* PBXTargetDependency \*\/,\n)*)[ \t]*\);\n', - project_data) - - if not result: - logging.error("Unable to get dependencies from: "+self.path()) - return None - - (dependency_set, ) = result.groups() - dependency_guids = re.findall('[ \t]+([A-Z0-9]+) \/\* PBXTargetDependency \*\/,\n', dependency_set) - - # Parse the dependencies - - dependency_names = [] - - for guid in dependency_guids: - result = re.search(guid+' \/\* PBXTargetDependency \*\/ = \{\n[ \t]+isa = PBXTargetDependency;\n[ \t]*name = (["a-zA-Z0-9\.\-]+);', - project_data) - - if result: - (dependency_name, ) = result.groups() - dependency_names.append(dependency_name) - - self._deps = dependency_names - - - # Get the product guid and name. - - result = re.search(re.escape(self._guid)+' \/\* '+re.escape(self.target)+' \*\/ = {\n[ \t]+isa = PBXNativeTarget;(?:.|\n)+?productReference = ([A-Z0-9]+) \/\* (.+?) \*\/;', - project_data) - - if not result: - logging.error("Unable to get product guid from: "+self.path()) - return None - - (self._product_guid, self._product_name, ) = result.groups() - - return self._deps - - # Add a line to the PBXBuildFile section. - # - # /* in Frameworks */ = {isa = PBXBuildFile; fileRef = /* */; }; - # - # Returns: if a line was added. - # Otherwise, the existing guid is returned. - def add_buildfile(self, name, file_ref_hash, default_guid): - project_data = self.get_project_data() - - match = re.search('\/\* Begin PBXBuildFile section \*\/\n((?:.|\n)+?)\/\* End PBXBuildFile section \*\/', project_data) - - if not match: - logging.error("Couldn't find PBXBuildFile section.") - return None - - (subtext, ) = match.groups() - - buildfile_hash = None - - match = re.search('([A-Z0-9]+).+?fileRef = '+re.escape(file_ref_hash), subtext) - if match: - (buildfile_hash, ) = match.groups() - logging.info("This build file already exists: "+buildfile_hash) - - if buildfile_hash is None: - match = re.search('\/\* Begin PBXBuildFile section \*\/\n', project_data) - - buildfile_hash = default_guid - - libfiletext = "\t\t"+buildfile_hash+" /* "+name+" in Frameworks */ = {isa = PBXBuildFile; fileRef = "+file_ref_hash+" /* "+name+" */; };\n" - project_data = project_data[:match.end()] + libfiletext + project_data[match.end():] - - self.set_project_data(project_data) - - return buildfile_hash - - # Add a line to the PBXFileReference section. - # - # /* */ = {isa = PBXFileReference; lastKnownFileType = "wrapper."; name = ; path = ; sourceTree = ; }; - # - # Returns: if a line was added. - # Otherwise, the existing guid is returned. - def add_filereference(self, name, file_type, default_guid, rel_path, source_tree): - project_data = self.get_project_data() - - fileref_hash = None - - match = re.search('([A-Z0-9]+) \/\* '+re.escape(name)+' \*\/ = \{isa = PBXFileReference; lastKnownFileType = "wrapper.'+file_type+'"; name = '+re.escape(name)+'; path = '+re.escape(rel_path)+';', project_data) - if match: - logging.info("This file has already been added.") - (fileref_hash, ) = match.groups() - - else: - match = re.search('\/\* Begin PBXFileReference section \*\/\n', project_data) - - if not match: - logging.error("Couldn't find the PBXFileReference section.") - return False - - fileref_hash = default_guid - - pbxfileref = "\t\t"+fileref_hash+" /* "+name+" */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper."+file_type+"\"; name = "+name+"; path = "+rel_path+"; sourceTree = "+source_tree+"; };\n" - project_data = project_data[:match.end()] + pbxfileref + project_data[match.end():] - - self.set_project_data(project_data) - - return fileref_hash - - # Add a file to the given PBXGroup. - # - # /* */, - def add_file_to_group(self, name, guid, group): - project_data = self.get_project_data() - - match = re.search('\/\* '+re.escape(group)+' \*\/ = \{\n[ \t]+isa = PBXGroup;\n[ \t]+children = \(\n((?:.|\n)+?)\);', project_data) - if not match: - logging.error("Couldn't find the "+group+" children.") - return False - - (children,) = match.groups() - match = re.search(re.escape(guid), children) - if match: - logging.info("This file is already a member of the "+name+" group.") - else: - match = re.search('\/\* '+re.escape(group)+' \*\/ = \{\n[ \t]+isa = PBXGroup;\n[ \t]+children = \(\n', project_data) - - if not match: - logging.error("Couldn't find the "+group+" group.") - return False - - pbxgroup = "\t\t\t\t"+guid+" /* "+name+" */,\n" - project_data = project_data[:match.end()] + pbxgroup + project_data[match.end():] - - self.set_project_data(project_data) - - return True - - # Add a file to the Frameworks PBXGroup. - # - # /* */, - def add_file_to_frameworks(self, name, guid): - return self.add_file_to_group(name, guid, 'Frameworks') - - # Add a file to the Resources PBXGroup. - # - # /* */, - def add_file_to_resources(self, name, guid): - match = re.search('\/\* '+re.escape('Resources')+' \*\/ = \{\n[ \t]+isa = PBXGroup;\n[ \t]+children = \(\n((?:.|\n)+?)\);', self.get_project_data()) - if not match: - return self.add_file_to_group(name, guid, 'Supporting Files') - - return self.add_file_to_group(name, guid, 'Resources') - - def add_file_to_phase(self, name, guid, phase_guid, phase): - project_data = self.get_project_data() - - match = re.search(re.escape(phase_guid)+" \/\* "+re.escape(phase)+" \*\/ = {(?:.|\n)+?files = \(((?:.|\n)+?)\);", project_data) - - if not match: - logging.error("Couldn't find the "+phase+" phase.") - return False - - (files, ) = match.groups() - - match = re.search(re.escape(guid), files) - if match: - logging.info("The file has already been added.") - else: - match = re.search(re.escape(phase_guid)+" \/\* "+phase+" \*\/ = {(?:.|\n)+?files = \(\n", project_data) - if not match: - logging.error("Couldn't find the "+phase+" files") - return False - - frameworktext = "\t\t\t\t"+guid+" /* "+name+" in "+phase+" */,\n" - project_data = project_data[:match.end()] + frameworktext + project_data[match.end():] - - self.set_project_data(project_data) - - return True - - def get_rel_path_to_products_dir(self): - project_path = os.path.dirname(os.path.abspath(self.xcodeprojpath())) - build_path = os.path.join(os.path.join(os.path.dirname(Paths.src_dir), 'Build'), 'Products') - return relpath(project_path, build_path) - - def add_file_to_frameworks_phase(self, name, guid): - return self.add_file_to_phase(name, guid, self._frameworks_guid, 'Frameworks') - - def add_file_to_resources_phase(self, name, guid): - if self._resources_guid is None: - logging.error("No resources build phase found in the destination project") - logging.error("Please add a New Copy Bundle Resources Build Phase to your target") - logging.error("Right click your target in the project, Add, New Build Phase,") - logging.error(" \"New Copy Bundle Resources Build Phase\"") - return False - - return self.add_file_to_phase(name, guid, self._resources_guid, 'Resources') - - def add_header_search_path(self, configuration): - project_path = os.path.dirname(os.path.abspath(self.xcodeprojpath())) - build_path = os.path.join(os.path.join(os.path.join(os.path.dirname(Paths.src_dir), 'Build'), 'Products'), 'three20') - rel_path = relpath(project_path, build_path) - - did_add_build_setting = self.add_build_setting(configuration, 'HEADER_SEARCH_PATHS', '"'+rel_path+'"') - if not did_add_build_setting: - return did_add_build_setting - - # Version 46 is Xcode 4's file format. - try: - primary_version = int(self._xcode_version.split('.')[0]) - except ValueError, e: - primary_version = 0 - if self._projectVersion >= 46 or primary_version >= 4: - did_add_build_setting = self.add_build_setting(configuration, 'HEADER_SEARCH_PATHS', '"$(BUILT_PRODUCTS_DIR)/../../three20"') - if not did_add_build_setting: - return did_add_build_setting - - did_add_build_setting = self.add_build_setting(configuration, 'HEADER_SEARCH_PATHS', '"$(BUILT_PRODUCTS_DIR)/../three20"') - if not did_add_build_setting: - return did_add_build_setting - - return did_add_build_setting - - def add_build_setting(self, configuration, setting_name, value): - project_data = self.get_project_data() - - match = re.search('\/\* '+configuration+' \*\/ = {\n[ \t]+isa = XCBuildConfiguration;\n[ \t]+buildSettings = \{\n((?:.|\n)+?)\};', project_data) - if not match: - print "Couldn't find this configuration." - return False - - settings_start = match.start(1) - settings_end = match.end(1) - - (build_settings, ) = match.groups() - - match = re.search(re.escape(setting_name)+' = ((?:.|\n)+?);', build_settings) - - if not match: - # Add a brand new build setting. No checking for existing settings necessary. - settingtext = '\t\t\t\t'+setting_name+' = '+value+';\n' - - project_data = project_data[:settings_start] + settingtext + project_data[settings_start:] - else: - # Build settings already exist. Is there one or many? - (search_paths,) = match.groups() - if re.search('\(\n', search_paths): - # Many - match = re.search(re.escape(value), search_paths) - if not match: - # If value has any spaces in it, Xcode will split it up into - # multiple entries. - escaped_value = re.escape(value).replace(' ', '",\n[ \t]+"') - match = re.search(escaped_value, search_paths) - if not match and not re.search(re.escape(value.strip('"')), search_paths): - match = re.search(re.escape(setting_name)+' = \(\n', build_settings) - - build_settings = build_settings[:match.end()] + '\t\t\t\t\t'+value+',\n' + build_settings[match.end():] - project_data = project_data[:settings_start] + build_settings + project_data[settings_end:] - else: - # One - if search_paths.strip('"') != value.strip('"'): - existing_path = search_paths - path_set = '(\n\t\t\t\t\t'+value+',\n\t\t\t\t\t'+existing_path+'\n\t\t\t\t)' - build_settings = build_settings[:match.start(1)] + path_set + build_settings[match.end(1):] - project_data = project_data[:settings_start] + build_settings + project_data[settings_end:] - - self.set_project_data(project_data) - - return True - - def get_hash_base(self, uniquename): - examplehash = '320FFFEEEDDDCCCBBBAAA000' - uniquehash = hashlib.sha224(uniquename).hexdigest().upper() - uniquehash = uniquehash[:len(examplehash) - 4] - return '320'+uniquehash - - def add_framework(self, framework): - tthash_base = self.get_hash_base(framework) - - fileref_hash = self.add_filereference(framework, 'frameworks', tthash_base+'0', 'System/Library/Frameworks/'+framework, 'SDKROOT') - libfile_hash = self.add_buildfile(framework, fileref_hash, tthash_base+'1') - if not self.add_file_to_frameworks(framework, fileref_hash): - return False - - if not self.add_file_to_frameworks_phase(framework, libfile_hash): - return False - - return True - - def add_bundle(self): - tthash_base = self.get_hash_base('Three20.bundle') - - project_path = os.path.dirname(os.path.abspath(self.xcodeprojpath())) - build_path = os.path.join(Paths.src_dir, 'Three20.bundle') - rel_path = relpath(project_path, build_path) - - fileref_hash = self.add_filereference('Three20.bundle', 'plug-in', tthash_base+'0', rel_path, 'SOURCE_ROOT') - - libfile_hash = self.add_buildfile('Three20.bundle', fileref_hash, tthash_base+'1') - - if not self.add_file_to_resources('Three20.bundle', fileref_hash): - return False - - if not self.add_file_to_resources_phase('Three20.bundle', libfile_hash): - return False - - return True - - # Get the PBXFileReference from the given PBXBuildFile guid. - def get_filerefguid_from_buildfileguid(self, buildfileguid): - project_data = self.get_project_data() - match = re.search(buildfileguid+' \/\* .+ \*\/ = {isa = PBXBuildFile; fileRef = ([A-Z0-9]+) \/\* .+ \*\/;', project_data) - - if not match: - logging.error("Couldn't find PBXBuildFile row.") - return None - - (filerefguid, ) = match.groups() - - return filerefguid - - def get_filepath_from_filerefguid(self, filerefguid): - project_data = self.get_project_data() - match = re.search(filerefguid+' \/\* .+ \*\/ = {isa = PBXFileReference; .+ path = (.+); .+ };', project_data) - - if not match: - logging.error("Couldn't find PBXFileReference row.") - return None - - (path, ) = match.groups() - - return path - - - # Get all source files that are "built" in this project. This includes files built for - # libraries, executables, and unit testing. - def get_built_sources(self): - project_data = self.get_project_data() - match = re.search('\/\* Begin PBXSourcesBuildPhase section \*\/\n((?:.|\n)+?)\/\* End PBXSourcesBuildPhase section \*\/', project_data) - - if not match: - logging.error("Couldn't find PBXSourcesBuildPhase section.") - return None - - (buildphasedata, ) = match.groups() - - buildfileguids = re.findall('[ \t]+([A-Z0-9]+) \/\* .+ \*\/,\n', buildphasedata) - - project_path = os.path.dirname(os.path.abspath(self.xcodeprojpath())) - - filenames = [] - - for buildfileguid in buildfileguids: - filerefguid = self.get_filerefguid_from_buildfileguid(buildfileguid) - filepath = self.get_filepath_from_filerefguid(filerefguid) - - filenames.append(os.path.join(project_path, filepath.strip('"'))) - - return filenames - - - # Get all header files that are "built" in this project. This includes files built for - # libraries, executables, and unit testing. - def get_built_headers(self): - project_data = self.get_project_data() - match = re.search('\/\* Begin PBXHeadersBuildPhase section \*\/\n((?:.|\n)+?)\/\* End PBXHeadersBuildPhase section \*\/', project_data) - - if not match: - logging.error("Couldn't find PBXHeadersBuildPhase section.") - return None - - (buildphasedata, ) = match.groups() - - buildfileguids = re.findall('[ \t]+([A-Z0-9]+) \/\* .+ \*\/,\n', buildphasedata) - - project_path = os.path.dirname(os.path.abspath(self.xcodeprojpath())) - - filenames = [] - - for buildfileguid in buildfileguids: - filerefguid = self.get_filerefguid_from_buildfileguid(buildfileguid) - filepath = self.get_filepath_from_filerefguid(filerefguid) - - filenames.append(os.path.join(project_path, filepath.strip('"'))) - - return filenames - - - def add_dependency(self, dep): - project_data = self.get_project_data() - dep_data = dep.get_project_data() - - if project_data is None or dep_data is None: - return False - - logging.info("\nAdding "+str(dep)+" to "+str(self)) - - project_path = os.path.dirname(os.path.abspath(self.xcodeprojpath())) - dep_path = os.path.abspath(dep.xcodeprojpath()) - rel_path = relpath(project_path, dep_path) - - logging.info("") - logging.info("Project path: "+project_path) - logging.info("Dependency path: "+dep_path) - logging.info("Relative path: "+rel_path) - - tthash_base = self.get_hash_base(dep.uniqueid()) - - ############################################### - logging.info("") - logging.info("Step 1: Add file reference to the dependency...") - - self.set_project_data(project_data) - pbxfileref_hash = self.add_filereference(dep._project_name+'.xcodeproj', 'pb-project', tthash_base+'0', rel_path, 'SOURCE_ROOT') - project_data = self.get_project_data() - - logging.info("Done: Added file reference: "+pbxfileref_hash) - - ############################################### - logging.info("") - logging.info("Step 2: Add file to Frameworks group...") - - self.set_project_data(project_data) - if not self.add_file_to_frameworks(dep._project_name+".xcodeproj", pbxfileref_hash): - return False - project_data = self.get_project_data() - - logging.info("Done: Added file to Frameworks group.") - - ############################################### - logging.info("") - logging.info("Step 3: Add dependencies...") - - pbxtargetdependency_hash = None - pbxcontaineritemproxy_hash = None - - match = re.search('\/\* Begin PBXTargetDependency section \*\/\n((?:.|\n)+?)\/\* End PBXTargetDependency section \*\/', project_data) - if not match: - logging.info("\tAdding a PBXTargetDependency section...") - match = re.search('\/\* End PBXSourcesBuildPhase section \*\/\n', project_data) - - if not match: - logging.error("Couldn't find the PBXSourcesBuildPhase section.") - return False - - project_data = project_data[:match.end()] + "\n/* Begin PBXTargetDependency section */\n\n/* End PBXTargetDependency section */\n" + project_data[match.end():] - else: - (subtext, ) = match.groups() - match = re.search('([A-Z0-9]+) \/\* PBXTargetDependency \*\/ = {\n[ \t]+isa = PBXTargetDependency;\n[ \t]+name = '+re.escape(dep._project_name)+';\n[ \t]+targetProxy = ([A-Z0-9]+) \/\* PBXContainerItemProxy \*\/;', project_data) - if match: - (pbxtargetdependency_hash, pbxcontaineritemproxy_hash,) = match.groups() - logging.info("This dependency already exists.") - - if pbxtargetdependency_hash is None or pbxcontaineritemproxy_hash is None: - match = re.search('\/\* Begin PBXTargetDependency section \*\/\n', project_data) - - pbxtargetdependency_hash = tthash_base+'1' - pbxcontaineritemproxy_hash = tthash_base+'2' - - pbxtargetdependency = "\t\t"+pbxtargetdependency_hash+" /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = "+dep._project_name+";\n\t\t\ttargetProxy = "+pbxcontaineritemproxy_hash+" /* PBXContainerItemProxy */;\n\t\t};\n" - project_data = project_data[:match.end()] + pbxtargetdependency + project_data[match.end():] - - logging.info("Done: Added dependency.") - - - ############################################### - logging.info("") - logging.info("Step 3.1: Add container proxy for dependencies...") - - containerExists = False - - match = re.search('\/\* Begin PBXContainerItemProxy section \*\/\n((?:.|\n)+?)\/\* End PBXContainerItemProxy section \*\/', project_data) - if not match: - logging.info("\tAdding a PBXContainerItemProxy section...") - match = re.search('\/\* End PBXBuildFile section \*\/\n', project_data) - - if not match: - logging.error("Couldn't find the PBXBuildFile section.") - return False - - project_data = project_data[:match.end()] + "\n/* Begin PBXContainerItemProxy section */\n\n/* End PBXContainerItemProxy section */\n" + project_data[match.end():] - else: - (subtext, ) = match.groups() - match = re.search(re.escape(pbxcontaineritemproxy_hash), subtext) - if match: - logging.info("This container proxy already exists.") - containerExists = True - - if not containerExists: - match = re.search('\/\* Begin PBXContainerItemProxy section \*\/\n', project_data) - - pbxcontaineritemproxy = "\t\t"+pbxcontaineritemproxy_hash+" /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = "+pbxfileref_hash+" /* "+dep._project_name+".xcodeproj */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = "+dep.guid()+";\n\t\t\tremoteInfo = "+dep._project_name+";\n\t\t};\n" - project_data = project_data[:match.end()] + pbxcontaineritemproxy + project_data[match.end():] - - logging.info("Done: Added container proxy.") - - - ############################################### - logging.info("") - logging.info("Step 3.2: Add module to the dependency list...") - - match = re.search(self.guid()+' \/\* .+? \*\/ = {\n[ \t]+(?:.|\n)+?[ \t]+dependencies = \(\n((?:.|\n)+?)\);', project_data) - - dependency_exists = False - - if not match: - logging.error("Couldn't find the dependency list.") - return False - else: - (dependencylist, ) = match.groups() - match = re.search(re.escape(pbxtargetdependency_hash), dependencylist) - if match: - logging.info("This dependency has already been added.") - dependency_exists = True - - if not dependency_exists: - match = re.search(self.guid()+' \/\* .+? \*\/ = {\n[ \t]+(?:.|\n)+?[ \t]+dependencies = \(\n', project_data) - - if not match: - logging.error("Couldn't find the dependency list.") - return False - - dependency_item = '\t\t\t\t'+pbxtargetdependency_hash+' /* PBXTargetDependency */,\n' - project_data = project_data[:match.end()] + dependency_item + project_data[match.end():] - - logging.info("Done: Added module to the dependency list.") - - - ############################################### - logging.info("") - logging.info("Step 4: Create project references...") - - match = re.search('\/\* Begin PBXProject section \*\/\n((?:.|\n)+?)\/\* End PBXProject section \*\/', project_data) - if not match: - logging.error("Couldn't find the project section.") - return False - - project_start = match.start(1) - project_end = match.end(1) - - (project_section, ) = match.groups() - - reference_exists = False - did_change = False - - productgroup_hash = None - - match = re.search('projectReferences = \(\n((?:.|\n)+?)\n[ \t]+\);', project_section) - if not match: - logging.info("Creating project references...") - match = re.search('projectDirPath = ".*?";\n', project_section) - if not match: - logging.error("Couldn't find project references anchor.") - return False - - did_change = True - project_section = project_section[:match.end()] + '\t\t\tprojectReferences = (\n\t\t\t);\n' + project_section[match.end():] - - else: - (refs, ) = match.groups() - - match = re.search('\{\n[ \t]+ProductGroup = ([A-Z0-9]+) \/\* Products \*\/;\n[ \t]+ProjectRef = '+re.escape(pbxfileref_hash), refs) - if match: - (productgroup_hash, ) = match.groups() - logging.info("This product group already exists: "+productgroup_hash) - reference_exists = True - - - if not reference_exists: - match = re.search('projectReferences = \(\n', project_section) - - if not match: - logging.error("Missing the project references item.") - return False - - productgroup_hash = tthash_base+'3' - - reference_text = '\t\t\t\t{\n\t\t\t\t\tProductGroup = '+productgroup_hash+' /* Products */;\n\t\t\t\t\tProjectRef = '+pbxfileref_hash+' /* '+dep._project_name+'.xcodeproj */;\n\t\t\t\t},\n' - project_section = project_section[:match.end()] + reference_text + project_section[match.end():] - did_change = True - - if did_change: - project_data = project_data[:project_start] + project_section + project_data[project_end:] - - logging.info("Done: Created project reference.") - - ############################################### - logging.info("") - logging.info("Step 4.1: Create product group...") - - match = re.search('\/\* Begin PBXGroup section \*\/\n', project_data) - if not match: - logging.error("Couldn't find the group section.") - return False - - group_start = match.end() - - lib_hash = None - - match = re.search(re.escape(productgroup_hash)+" \/\* Products \*\/ = \{\n[ \t]+isa = PBXGroup;\n[ \t]+children = \(\n((?:.|\n)+?)\);", project_data) - if match: - logging.info("This product group already exists.") - (children, ) = match.groups() - match = re.search('([A-Z0-9]+) \/\* '+re.escape(dep._product_name)+' \*\/', children) - if not match: - logging.error("No product found") - return False - # TODO: Add this product. - else: - (lib_hash, ) = match.groups() - - else: - lib_hash = tthash_base+'4' - - productgrouptext = "\t\t"+productgroup_hash+" /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t"+lib_hash+" /* "+dep._product_name+" */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"\";\n\t\t};\n" - project_data = project_data[:group_start] + productgrouptext + project_data[group_start:] - - logging.info("Done: Created product group: "+lib_hash) - - - - ############################################### - logging.info("") - logging.info("Step 4.2: Add container proxy for target product...") - - containerExists = False - - targetproduct_hash = tthash_base+'6' - - match = re.search('\/\* Begin PBXContainerItemProxy section \*\/\n((?:.|\n)+?)\/\* End PBXContainerItemProxy section \*\/', project_data) - if not match: - logging.info("\tAdding a PBXContainerItemProxy section...") - match = re.search('\/\* End PBXBuildFile section \*\/\n', project_data) - - if not match: - logging.error("Couldn't find the PBXBuildFile section.") - return False - - project_data = project_data[:match.end()] + "\n/* Begin PBXContainerItemProxy section */\n\n/* End PBXContainerItemProxy section */\n" + project_data[match.end():] - else: - (subtext, ) = match.groups() - match = re.search(re.escape(targetproduct_hash), subtext) - if match: - logging.info("This container proxy already exists.") - containerExists = True - - if not containerExists: - match = re.search('\/\* Begin PBXContainerItemProxy section \*\/\n', project_data) - - pbxcontaineritemproxy = "\t\t"+targetproduct_hash+" /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = "+pbxfileref_hash+" /* "+dep._project_name+".xcodeproj */;\n\t\t\tproxyType = 2;\n\t\t\tremoteGlobalIDString = "+dep._product_guid+";\n\t\t\tremoteInfo = "+dep._project_name+";\n\t\t};\n" - project_data = project_data[:match.end()] + pbxcontaineritemproxy + project_data[match.end():] - - logging.info("Done: Added target container proxy.") - - - ############################################### - logging.info("") - logging.info("Step 4.3: Create reference proxy...") - - referenceExists = False - - match = re.search('\/\* Begin PBXReferenceProxy section \*\/\n((?:.|\n)+?)\/\* End PBXReferenceProxy section \*\/', project_data) - if not match: - logging.info("\tAdding a PBXReferenceProxy section...") - match = re.search('\/\* End PBXProject section \*\/\n', project_data) - - if not match: - logging.error("Couldn't find the PBXProject section.") - return False - - project_data = project_data[:match.end()] + "\n/* Begin PBXReferenceProxy section */\n\n/* End PBXReferenceProxy section */\n" + project_data[match.end():] - else: - (subtext, ) = match.groups() - match = re.search(re.escape(lib_hash), subtext) - if match: - logging.info("This reference proxy already exists.") - referenceExists = True - - if not referenceExists: - match = re.search('\/\* Begin PBXReferenceProxy section \*\/\n', project_data) - - referenceproxytext = "\t\t"+lib_hash+" /* "+dep._product_name+" */ = {\n\t\t\tisa = PBXReferenceProxy;\n\t\t\tfileType = archive.ar;\n\t\t\tpath = \""+dep._product_name+"\";\n\t\t\tremoteRef = "+targetproduct_hash+" /* PBXContainerItemProxy */;\n\t\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t\t};\n" - project_data = project_data[:match.end()] + referenceproxytext + project_data[match.end():] - - logging.info("Done: Created reference proxy.") - - - ############################################### - logging.info("") - logging.info("Step 5: Add target file...") - - self.set_project_data(project_data) - libfile_hash = self.add_buildfile(dep._product_name, lib_hash, tthash_base+'5') - project_data = self.get_project_data() - - logging.info("Done: Added target file.") - - - ############################################### - logging.info("") - logging.info("Step 6: Add frameworks...") - - self.set_project_data(project_data) - self.add_file_to_frameworks_phase(dep._product_name, libfile_hash) - project_data = self.get_project_data() - - logging.info("Done: Adding module.") - - self.set_project_data(project_data) - - return True diff --git a/src/scripts/Protect.command b/src/scripts/Protect.command deleted file mode 100644 index e6d4ce25f5..0000000000 --- a/src/scripts/Protect.command +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2009-2010 Facebook -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Protect the copied header files from being modified. This is done in an attempt to avoid -# accidentally editing the copied headers. - -# Ignore whitespace characters in paths -IFS=$'\n' - -# In Xcode 4 Archive builds, there is one extra folder placed between the configuration build -# dir and the public headers path titled "ArchiveIntermediates". -if [[ "$DEPLOYMENT_LOCATION" == "YES" && "$XCODE_VERSION_MAJOR" -ge "0400" ]]; then - cd ${CONFIGURATION_BUILD_DIR}/..${PUBLIC_HEADERS_FOLDER_PATH} -else - cd ${CONFIGURATION_BUILD_DIR}${PUBLIC_HEADERS_FOLDER_PATH} -fi - -chmod a-w *.h 2>> /dev/null -chmod a-w private/*.h 2>> /dev/null - -exit 0 diff --git a/src/scripts/lint b/src/scripts/lint deleted file mode 100644 index 345cbdbf19..0000000000 --- a/src/scripts/lint +++ /dev/null @@ -1,341 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -lint - -Validate style guidelines for a given source file. - -When run from Xcode, the linter will automatically lint all of the built source files -and headers. - -Version 1.0 - -History: -1.0 - February 27, 2011: Includes a set of simple linters and a delinter for most lints. - -Created by Jeff Verkoeyen on 2011-02-27. -Copyright 2009-2011 Facebook - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import ConfigParser -import logging -import os -import Paths -import pickle -import re -import string -import sys -from optparse import OptionParser - -from Pbxproj import Pbxproj -from Pbxproj import relpath - -gcopyrightyears = '2009-2011' -gdivider = '///////////////////////////////////////////////////////////////////////////////////////////////////' -maxlinelength = 100 - -# Program entry. The meat of this script happens in the lint() method below. -def main(): - usage = '''%prog filename - -The Three20 Linter. -Verify Three20 style guidelines for source code.''' - - parser = OptionParser(usage = usage) - parser.add_option("-d", "--delint", dest="delint", - help="Delint the source", - action="store_true") - parser.add_option("-l", "--maxline", dest="maxlinelength", - help="Maximum permissible length of a line",type="int", - action="store") - - (options, args) = parser.parse_args() - - global maxlinelength - if options.maxlinelength: - maxlinelength = options.maxlinelength - - if len(args) == 0: - parser.print_help() - - enabled_for_projects = True - - # Allow third-party developers to disable the linter entirely. See config.template for - # more information in the "lint" section. - configpath = os.path.join(os.path.dirname(Paths.src_dir), 'config') - if os.path.exists(configpath): - config = ConfigParser.ConfigParser() - config.read(configpath) - enabled_for_projects = config.getboolean('lint', 'enabled_for_projects') - - # If we're running the linter from Xcode, let's just process the project. - if 'PROJECT_FILE_PATH' in os.environ: - if enabled_for_projects: - lint_project(os.environ['PROJECT_FILE_PATH'], options) - else: - for filename in args: - lint(filename, options) - - -# This filter makes it possible to set the line number on logging.error calls. -class FilenameFilter(logging.Filter): - def __init__(self): - self.lineno = -1 - - def filter(self, record): - record.linenumber = self.lineno - return True - - -def lint_project(project_path, options): - project = Pbxproj.get_pbxproj_by_name(project_path) - - tempdir = None - if os.environ['TEMP_FILES_DIR']: - tempdir = os.environ['TEMP_FILES_DIR'] - - # We avoid relinting the same file over and over again by maintaining a mapping of filenames - # to modified times on disk. We store this information in the project's build directory and - # load it each time we run the linter for this project. - # Because we store the mtimes on a per project basis, we shouldn't run into any performance - # issues with a lint.dat file that's becoming completely massive. - mtimes = {} - - # Read the lint.dat file and unpickle it if we find it. - if tempdir: - lintdatpath = os.path.join(os.path.abspath(tempdir), 'lint.dat') - if os.path.exists(lintdatpath): - lintdatfile = open(lintdatpath, 'rb') - mtimes = pickle.load(lintdatfile) - - # The linter script may have changed since we last ran this project, so we might have to - # force lint every file to update them because there may be new linters. - - # Assume that the linter hasn't been run for this project. - forcelint = True - - # Get this script's path - lintfilename = os.path.realpath(__file__) - - # Check the mtime. - mtime = os.path.getmtime(lintfilename) - if lintfilename in mtimes: - if mtime <= mtimes[lintfilename]: - # The lint script hasn't changed since we last ran this, so we don't have to force - # lint. - forcelint = False - - # Store the linter's mtime for future runs. - mtimes[lintfilename] = mtime - - # - # Get all of the "built" filenames in this project. - - # The "Compile sources" phase files - filenames = project.get_built_sources() - - # The "Copy headers" phase files if they exist - if project.get_built_headers(): - filenames = filenames + project.get_built_headers() - - # Iterate through and lint each of the files that have been modified since we last ran - # the linter, unless we're forcelinting, in which case we lint everything. - for filename in filenames: - mtime = os.path.getmtime(filename) - - # If the filename isn't in the lint data, we have no idea when it was last modified so - # we'll run the linter anyway. - if not forcelint and filename in mtimes: - # Is it older or unchanged? - if mtime <= mtimes[filename]: - # Yeah, let's skip it then. - continue - - # The beef. - if lint(filename, options): - # Only update the last known modification time if there weren't any errors. - mtimes[filename] = mtime - else: - print "If you would like to disable the lint tool, please read the instructions in config.template in the root of the Three20 project" - if filename in mtimes: - del mtimes[filename] - - # Write out the lint data once we're done with this project. Thanks, pickle! - if tempdir: - lintdatfile = open(lintdatpath, 'wb') - pickle.dump(mtimes, lintdatfile) - - -# Lint the given filename. -def lint(filename, options): - logger = logging.getLogger() - - f = FilenameFilter() - logger.addFilter(f) - - # Set up the warning logger format. - ch = logging.StreamHandler() - if 'PROJECT_FILE_PATH' in os.environ: - formatter = logging.Formatter(filename+":%(linenumber)s: warning: "+relpath(os.getcwd(), filename)+":%(linenumber)s: %(message)s") - else: - formatter = logging.Formatter(filename+":%(linenumber)s: %(message)s") - ch.setFormatter(formatter) - logger.addHandler(ch) - - file = open(filename, 'r') - filedata = file.read() - - did_lint_cleanly = True - - # Everything is set up now, let's run through the linters! - if not lint_basics(filedata, filename, f, options.delint): - did_lint_cleanly = False - - logger.removeFilter(f) - logger.removeHandler(ch) - - return did_lint_cleanly - - -# Basic lint tests that only look at one line's information. -# If isdelinting is True, this method will try to fix as many lint issues as it can and then -# write the results out to disk. -def lint_basics(filedata, filename, linenofilter, isdelinting = False): - - logger = logging.getLogger() - - lines = string.split(filedata, "\n") - linenofilter.lineno = 1 - - prevline = None - - did_lint_cleanly = True - - nwarningsfixed = 0 - nwarnings = 0 - if isdelinting: - newfilelines = [] - - for line in lines: - # Check line lengths. - if len(line) > maxlinelength: - did_lint_cleanly = False - nwarnings = nwarnings + 1 - - # This is not something we can fix with the delinter. - if isdelinting: - logger.error('I don\'t know how to split this line up.') - else: - logger.error('Line length > %d'% maxlinelength) - - # Check method dividers. - if not re.search(r'.h$', filename) and re.search(r'^[-+][ ]*\([\w\s*]+\)', line): - if prevline != gdivider and prevline != ' */': - did_lint_cleanly = False - nwarnings = nwarnings + 1 - - # This is not something we can fix with the delinter. - if isdelinting: - if re.match(r'/+', prevline): - newfilelines.pop() - newfilelines.append(gdivider) - nwarningsfixed = nwarningsfixed + 1 - else: - logger.error('This method is missing a correct divider before it') - - # Properties - if re.search(r'^@property', line): - if re.search(r'(NSString|NSArray|NSDictionary|NSSet)[ ]*\*', line) and not re.search(r'copy|readonly', line): - nwarnings = nwarnings + 1 - if isdelinting: - line = re.sub(r'\bretain\b', r'copy', line) - nwarningsfixed = nwarningsfixed + 1 - else: - did_lint_cleanly = False - logger.error('Objects that have mutable subclasses, such as NSString, should be copied, not retained') - - if re.search(r'^@property\(', line): - nwarnings = nwarnings + 1 - if isdelinting: - line = line.rstrip(' \t') - nwarningsfixed = nwarningsfixed + 1 - else: - did_lint_cleanly = False - logger.error('Must be a space after the @property declarator') - - # Trailing whitespace - if re.search('[ \t]+$', line): - nwarnings = nwarnings + 1 - if isdelinting: - line = line.rstrip(' \t') - nwarningsfixed = nwarningsfixed + 1 - else: - did_lint_cleanly = False - logger.error('Trailing whitespace') - - # Spaces after logical constructs - if re.search('(if|while|for)\(', line, re.IGNORECASE): - nwarnings = nwarnings + 1 - if isdelinting: - line = re.sub(r'(if|while|for)\(', r'\1 (', line) - nwarningsfixed = nwarningsfixed + 1 - else: - did_lint_cleanly = False - logger.error('Missing space after logical construct') - - # Boolean checks against non-boolean objects - # This test is really hard to do without knowing the type of the object. - #if re.search('[^!]!(?!TTIs|[a-z0-9_.]*\.is|is|_is|has|_has|\[|self\.is|[a-z0-9_]+\.)[a-z0-9_]+', line, re.IGNORECASE): - # did_lint_cleanly = False - # logger.error('Use if (nil == value) instead of boolean checks for pointers') - - # Else statements must have one empty line before them - if re.search('}[ ]+else', line, re.IGNORECASE) and prevline != '' and not re.search(r'^[ ]*//', prevline): - nwarnings = nwarnings + 1 - if isdelinting: - newfilelines.append('') - nwarningsfixed = nwarningsfixed + 1 - else: - did_lint_cleanly = False - logger.error('There must be one empty line before an else statement') - - # Copyright statement for Facebook - match = re.match('\/\/ Copyright ([0-9]+-[0-9]+) Facebook', line, re.IGNORECASE) - if match: - (copyrightyears, ) = match.groups() - if copyrightyears != gcopyrightyears: - nwarnings = nwarnings + 1 - if isdelinting: - line = re.sub(r'([0-9]+-[0-9]+)', gcopyrightyears, line) - nwarningsfixed = nwarningsfixed + 1 - else: - did_lint_cleanly = False - logger.error('The copyright statement on this file is outdated. Should be 2009-2011') - - if isdelinting: - newfilelines.append(line) - - prevline = line - linenofilter.lineno = linenofilter.lineno + 1 - - if isdelinting and nwarnings > 0: - newfiledata = '\n'.join(newfilelines) - file = open(filename, 'w') - file.write(newfiledata) - - return did_lint_cleanly - -if __name__ == "__main__": - sys.exit(main()) diff --git a/src/scripts/ttmodule.py b/src/scripts/ttmodule.py deleted file mode 100644 index d99e8b2e4d..0000000000 --- a/src/scripts/ttmodule.py +++ /dev/null @@ -1,194 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -""" -ttmodule.py - -Most of the documentation is found in Pbxproj.py. - -Created by Jeff Verkoeyen on 2010-10-18. -Copyright 2009-2010 Facebook - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" - -import logging -import re -import os -import sys -from optparse import OptionParser - -# Three20 Python Objects -import Paths -from Pbxproj import Pbxproj - -# Print the given project's dependencies to stdout. -def print_dependencies(name): - pbxproj = Pbxproj.get_pbxproj_by_name(name) - print str(pbxproj)+"..." - if pbxproj.dependencies(): - [sys.stdout.write("\t"+x+"\n") for x in pbxproj.dependencies()] - -def get_dependency_modules(dependency_names): - dependency_modules = {} - if not dependency_names: - return dependency_modules - - for name in dependency_names: - project = Pbxproj.get_pbxproj_by_name(name) - dependency_modules[project.uniqueid()] = project - - dependencies = project.dependencies() - if dependencies is None: - print "Failed to get dependencies; it's possible that the given target doesn't exist." - sys.exit(0) - - submodules = get_dependency_modules(dependencies) - for guid, submodule in submodules.items(): - dependency_modules[guid] = submodule - - return dependency_modules - -def add_modules_to_project(module_names, project, configs): - logging.info(project) - logging.info("Checking dependencies...") - if project.dependencies() is None: - logging.error("Failed to get dependencies. Check the error logs for more details.") - sys.exit(0) - if len(project.dependencies()) == 0: - logging.info("\tNo dependencies.") - else: - logging.info("Existing dependencies:") - [logging.info("\t"+x) for x in project.dependencies()] - - modules = get_dependency_modules(module_names) - - logging.info("Requested dependency list:") - [logging.info("\t"+str(x)) for k,x in modules.items()] - - logging.info("Adding dependencies...") - failed = [] - for k,v in modules.items(): - if v.name == 'Three20UI': - project.add_framework('QuartzCore.framework') - if v.name == 'Three20Core': - project.add_bundle() - - if not project.add_dependency(v): - failed.append(k) - - if configs: - for config in configs: - project.add_header_search_path(config) - - project.add_build_setting(config, 'OTHER_LDFLAGS', '-ObjC') - else: - for configuration in project.configurations: - project.add_header_search_path(configuration[1]) - - for k,v in modules.items(): - project.add_build_setting(configuration[1], 'OTHER_LDFLAGS', '-ObjC') - - if len(failed) > 0: - logging.error("Some dependencies failed to be added:") - [logging.error("\t"+str(x)+"\n") for x in failed] - -def main(): - usage = '''%prog [options] module(s) - -The Three20 Module Script. -Easily add Three20 modules to your projects. - -MODULES: - - Modules may take the form (:) - defaults to if it is not specified - may be a path to a .pbxproj file. - -EXAMPLES: - - Most common use case: - > %prog -p path/to/myApp/myApp.xcodeproj Three20 - - For adding Xcode 4 support to an Xcode 3.2.# project: - > %prog -p path/to/myApp/myApp.xcodeproj Three20 --xcode-version=4 - - Print all dependencies for the Three20UI module - > %prog -d Three20UI - - Print all dependencies for the extThree20JSON module's extThree20JSON+SBJSON target. - > %prog -d extThree20JSON:extThree20JSON+SBJSON - - Add the Three20 project settings specifically to the Debug and Release configurations. - By default, all Three20 settings are added to all project configurations. - This includes adding the header search path and linker flags. - > %prog -p path/to/myApp.xcodeproj -c Debug -c Release - - Add the extThree20XML module and all of its dependencies to the myApp project. - > %prog -p path/to/myApp.xcodeproj extThree20XML - - Add a specific target of a module to a project. - > %prog -p path/to/myApp.xcodeproj extThree20JSON:extThree20JSON+SBJSON''' - parser = OptionParser(usage = usage) - - parser.add_option("-d", "--dependencies", dest="print_dependencies", - help="Print dependencies for the given modules", - action="store_true") - - parser.add_option("-v", "--verbose", dest="verbose", - help="Display verbose output", - action="store_true") - - parser.add_option("-p", "--project", dest="projects", - help="Add the given modules to this project", action="append") - - parser.add_option("--xcode-version", dest="xcode_version", - help="Set the xcode version you plan to open this project in. By default uses xcodebuild to determine your latest Xcode version.") - - parser.add_option("-c", "--config", dest="configs", - help="Explicit configurations to add Three20 settings to (example: Debug). By default, ttmodule will add configuration settings to every configuration for the given target", action="append") - - (options, args) = parser.parse_args() - - if options.verbose: - log_level = logging.INFO - else: - log_level = logging.WARNING - - logging.basicConfig(level=log_level) - - did_anything = False - - if options.print_dependencies: - [print_dependencies(x) for x in args] - did_anything = True - - if options.projects is not None: - did_anything = True - - if not options.xcode_version: - f=os.popen("xcodebuild -version") - xcodebuild_version = f.readlines()[0] - match = re.search('Xcode ([a-zA-Z0-9.]+)', xcodebuild_version) - if match: - (options.xcode_version, ) = match.groups() - - for name in options.projects: - project = Pbxproj.get_pbxproj_by_name(name, xcode_version = options.xcode_version) - add_modules_to_project(args, project, options.configs) - - if not did_anything: - parser.print_help() - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/templates/InstallTemplates3.2.2.Command b/templates/InstallTemplates3.2.2.Command deleted file mode 100644 index 7a6b372604..0000000000 --- a/templates/InstallTemplates3.2.2.Command +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2009-2010 Facebook -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Installs the project and source file templates. Overwrites any existing files. - -mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Three20\ Application -cp -r projects3.2.2/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Three20\ Application - -mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/File\ Templates -cp -r source/ ~/Library/Application\ Support/Developer/Shared/Xcode/File\ Templates - diff --git a/templates/InstallTemplates3.2.4.Command b/templates/InstallTemplates3.2.4.Command deleted file mode 100644 index ccebc3eae0..0000000000 --- a/templates/InstallTemplates3.2.4.Command +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2009-2010 Facebook -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Installs the project and source file templates. Overwrites any existing files. - -mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Three20\ Application -cp -r projects3.2.4/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Three20\ Application - -mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/File\ Templates -cp -r source/ ~/Library/Application\ Support/Developer/Shared/Xcode/File\ Templates - diff --git a/templates/InstallTemplates3.2.5.Command b/templates/InstallTemplates3.2.5.Command deleted file mode 100644 index 288e09ba68..0000000000 --- a/templates/InstallTemplates3.2.5.Command +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2009-2010 Facebook -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Installs the project and source file templates. Overwrites any existing files. - -mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Three20\ Application -cp -r projects3.2.5/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/Three20\ Application - -mkdir -p ~/Library/Application\ Support/Developer/Shared/Xcode/File\ Templates -cp -r source/ ~/Library/Application\ Support/Developer/Shared/Xcode/File\ Templates - diff --git a/templates/projects3.2.2/Simple Application/Simple Application/Classes/AppDelegate.h b/templates/projects3.2.2/Simple Application/Simple Application/Classes/AppDelegate.h deleted file mode 100644 index 7cfb6b5468..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Application/Classes/AppDelegate.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -@interface AppDelegate : NSObject { -} - -@end - diff --git a/templates/projects3.2.2/Simple Application/Simple Application/Classes/AppDelegate.m b/templates/projects3.2.2/Simple Application/Simple Application/Classes/AppDelegate.m deleted file mode 100644 index 7e3c63c5f5..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Application/Classes/AppDelegate.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index b4a8da089d..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 7110fc90d3..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for any application using the three20 framework. It provides just an application delegate and a basic TTNavigator. - - diff --git a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index 2a6567f15b..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,701 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 6E3796DA11B9BD740011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796B611B9BD630011C497 /* libThree20Core.a */; }; - 6E3796DB11B9BD750011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796BC11B9BD630011C497 /* libThree20Network.a */; }; - 6E3796DC11B9BD750011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796C211B9BD630011C497 /* libThree20Style.a */; }; - 6E3796DD11B9BD750011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796D411B9BD630011C497 /* libThree20UI.a */; }; - 6E3796DE11B9BD760011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796C811B9BD630011C497 /* libThree20UICommon.a */; }; - 6E3796DF11B9BD760011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */; }; - 6EF962BA118E955A003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF962B7118E9553003902E7 /* libThree20.a */; }; - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */; }; - EB383B6D10BBF6360000B2D2 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EB383B6C10BBF6360000B2D2 /* Three20.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E3796B511B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3796B711B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796BB11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3796BD11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796C111B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3796C311B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796C711B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3796C911B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796CD11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3796CF11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796D311B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3796D511B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796E811B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3796EA11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3796EC11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3796EE11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3796F011B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3796F211B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF962B6118E9553003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF962B8118E9553003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF962BB118E955F003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF9628B118E9552003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - EB383B6C10BBF6360000B2D2 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */, - 6EF962BA118E955A003902E7 /* libThree20.a in Frameworks */, - 6E3796DA11B9BD740011C497 /* libThree20Core.a in Frameworks */, - 6E3796DB11B9BD750011C497 /* libThree20Network.a in Frameworks */, - 6E3796DC11B9BD750011C497 /* libThree20Style.a in Frameworks */, - 6E3796DD11B9BD750011C497 /* libThree20UI.a in Frameworks */, - 6E3796DE11B9BD760011C497 /* libThree20UICommon.a in Frameworks */, - 6E3796DF11B9BD760011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 6EF96274118E9502003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - EB383B6C10BBF6360000B2D2 /* Three20.bundle */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E3796A211B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796B611B9BD630011C497 /* libThree20Core.a */, - 6E3796B811B9BD630011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796A511B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796BC11B9BD630011C497 /* libThree20Network.a */, - 6E3796BE11B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796A811B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796C211B9BD630011C497 /* libThree20Style.a */, - 6E3796C411B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796AB11B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796C811B9BD630011C497 /* libThree20UICommon.a */, - 6E3796CA11B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796AE11B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */, - 6E3796D011B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796B111B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796D411B9BD630011C497 /* libThree20UI.a */, - 6E3796D611B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796D811B9BD650011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */, - 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */, - 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */, - 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */, - 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */, - 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */, - 6EF9628B118E9552003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E3796D911B9BD6C0011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF96274118E9502003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E3796D811B9BD650011C497 /* Three20 */, - 6E3796D911B9BD6C0011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF9628C118E9552003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF962B7118E9553003902E7 /* libThree20.a */, - 6EF962B9118E9553003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF962BC118E955F003902E7 /* PBXTargetDependency */, - 6E3796E911B9BD800011C497 /* PBXTargetDependency */, - 6E3796EB11B9BD800011C497 /* PBXTargetDependency */, - 6E3796ED11B9BD800011C497 /* PBXTargetDependency */, - 6E3796EF11B9BD800011C497 /* PBXTargetDependency */, - 6E3796F111B9BD800011C497 /* PBXTargetDependency */, - 6E3796F311B9BD800011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.1"; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF9628C118E9552003902E7 /* Products */; - ProjectRef = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E3796A211B9BD630011C497 /* Products */; - ProjectRef = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E3796A511B9BD630011C497 /* Products */; - ProjectRef = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E3796A811B9BD630011C497 /* Products */; - ProjectRef = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E3796B111B9BD630011C497 /* Products */; - ProjectRef = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E3796AB11B9BD630011C497 /* Products */; - ProjectRef = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E3796AE11B9BD630011C497 /* Products */; - ProjectRef = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E3796B611B9BD630011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E3796B511B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796B811B9BD630011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E3796B711B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796BC11B9BD630011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E3796BB11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796BE11B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796BD11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C211B9BD630011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E3796C111B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C411B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796C311B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C811B9BD630011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3796C711B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796CA11B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796C911B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E3796CD11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D011B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796CF11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D411B9BD630011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E3796D311B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D611B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796D511B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF962B7118E9553003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF962B6118E9553003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF962B9118E9553003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF962B8118E9553003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EB383B6D10BBF6360000B2D2 /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E3796E911B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E3796E811B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796EB11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E3796EA11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796ED11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E3796EC11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796EF11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E3796EE11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796F111B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E3796F011B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796F311B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3796F211B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6EF962BC118E955F003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF962BB118E955F003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos3.1.3; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos3.1.3; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.2/Simple Application/Simple Application/main.m b/templates/projects3.2.2/Simple Application/Simple Application/main.m deleted file mode 100644 index 8023e88258..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/Classes/AppDelegate.h b/templates/projects3.2.2/Simple Application/Simple Core Data Application/Classes/AppDelegate.h deleted file mode 100644 index 950ab6d71f..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Core Data Application/Classes/AppDelegate.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { - NSManagedObjectModel* _managedObjectModel; - NSManagedObjectContext* _managedObjectContext; - NSPersistentStoreCoordinator* _persistentStoreCoordinator; - - // App State - BOOL _modelCreated; - BOOL _resetModel; -} - -@property (nonatomic, retain, readonly) NSManagedObjectContext* managedObjectContext; -@property (nonatomic, readonly) NSString* applicationDocumentsDirectory; - - -@end - diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/Classes/AppDelegate.m b/templates/projects3.2.2/Simple Application/Simple Core Data Application/Classes/AppDelegate.m deleted file mode 100644 index e10428a214..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Core Data Application/Classes/AppDelegate.m +++ /dev/null @@ -1,207 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - -#define kStoreType NSSQLiteStoreType -#define kStoreFilename @"db.sqlite" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate() -- (NSPersistentStoreCoordinator *)persistentStoreCoordinator; -- (NSString *)applicationDocumentsDirectory; - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - // Forcefully removes the model db and recreates it. - //_resetModel = YES; - - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_managedObjectContext); - TT_RELEASE_SAFELY(_managedObjectModel); - TT_RELEASE_SAFELY(_persistentStoreCoordinator); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationWillTerminate:(UIApplication *)application { - NSError* error = nil; - if (_managedObjectContext != nil) { - if ([_managedObjectContext hasChanges] && ![_managedObjectContext save:&error]) { - NSLog(@"Unresolved error %@, %@", error, [error userInfo]); - abort(); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Core Data stack - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSManagedObjectContext*)managedObjectContext { - if( _managedObjectContext != nil ) { - return _managedObjectContext; - } - - NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; - if (coordinator != nil) { - _managedObjectContext = [[NSManagedObjectContext alloc] init]; - [_managedObjectContext setPersistentStoreCoordinator: coordinator]; - [_managedObjectContext setUndoManager:nil]; - [_managedObjectContext setRetainsRegisteredObjects:YES]; - } - return _managedObjectContext; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSManagedObjectModel*)managedObjectModel { - if( _managedObjectModel != nil ) { - return _managedObjectModel; - } - _managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles:nil] retain]; - return _managedObjectModel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)storePath { - return [[self applicationDocumentsDirectory] - stringByAppendingPathComponent: kStoreFilename]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSURL*)storeUrl { - return [NSURL fileURLWithPath:[self storePath]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)migrationOptions { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSPersistentStoreCoordinator*)persistentStoreCoordinator { - if( _persistentStoreCoordinator != nil ) { - return _persistentStoreCoordinator; - } - - NSString* storePath = [self storePath]; - NSURL *storeUrl = [self storeUrl]; - - NSError* error; - _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] - initWithManagedObjectModel: [self managedObjectModel]]; - - NSDictionary* options = [self migrationOptions]; - - // Check whether the store already exists or not. - NSFileManager* fileManager = [NSFileManager defaultManager]; - BOOL exists = [fileManager fileExistsAtPath:storePath]; - - TTDINFO(storePath); - if( !exists ) { - _modelCreated = YES; - } else { - if( _resetModel || - [[NSUserDefaults standardUserDefaults] boolForKey:@"erase_all_preference"] ) { - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"erase_all_preference"]; - [fileManager removeItemAtPath:storePath error:nil]; - _modelCreated = YES; - } - } - - if (![_persistentStoreCoordinator - addPersistentStoreWithType: kStoreType - configuration: nil - URL: storeUrl - options: options - error: &error - ]) { - // We couldn't add the persistent store, so let's wipe it out and try again. - [fileManager removeItemAtPath:storePath error:nil]; - _modelCreated = YES; - - if (![_persistentStoreCoordinator - addPersistentStoreWithType: kStoreType - configuration: nil - URL: storeUrl - options: nil - error: &error - ]) { - // Something is terribly wrong here. - } - } - - return _persistentStoreCoordinator; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Application's documents directory - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)applicationDocumentsDirectory { - return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) - lastObject]; -} - - -@end - diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements b/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements deleted file mode 100644 index 788aaa2fe1..0000000000 Binary files a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements and /dev/null differ diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout b/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout deleted file mode 100644 index ce1bc30d8c..0000000000 Binary files a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout and /dev/null differ diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index ff72dc254c..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,16 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - - -#ifdef __OBJC__ - #import - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 7579261498..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for an application that uses three20 with Core Data. It provides an application delegate that creates the Core Data stack and establishes the persistent store. - - diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index 94a7e3341a..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,711 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - 28C3AD8A0F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */; }; - 28D801B40F44B63D00FB423F /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28D801B30F44B63D00FB423F /* CoreData.framework */; }; - 6E37974911B9BDCB0011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37972511B9BDB60011C497 /* libThree20Core.a */; }; - 6E37974A11B9BDCB0011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37972B11B9BDB60011C497 /* libThree20Network.a */; }; - 6E37974B11B9BDCC0011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973111B9BDB60011C497 /* libThree20Style.a */; }; - 6E37974C11B9BDCC0011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37974311B9BDB60011C497 /* libThree20UI.a */; }; - 6E37974D11B9BDCC0011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973711B9BDB60011C497 /* libThree20UICommon.a */; }; - 6E37974E11B9BDCD0011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */; }; - 6EF963EC118E96CC003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF963E9118E96CA003902E7 /* libThree20.a */; }; - EB383C0610BBF8A40000B2D2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EB383C0510BBF8A40000B2D2 /* AppDelegate.m */; }; - EB383C1410BBF8C70000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */; }; - EB383D1110BBFC630000B2D2 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EB383D1010BBFC630000B2D2 /* Three20.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E37972411B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37972611B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37972A11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37972C11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973011B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37973211B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973611B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37973811B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973C11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37973E11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37974211B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37974411B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37974F11B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37975111B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37975311B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37975511B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37975711B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37975911B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF963E8118E96CA003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF963EA118E96CA003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF963ED118E96CF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.xcdatamodel; path = "___PROJECTNAMEASIDENTIFIER___.xcdatamodel"; sourceTree = ""; }; - 28D801B30F44B63D00FB423F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; sourceTree = ""; }; - EB383C0410BBF8A40000B2D2 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = SOURCE_ROOT; }; - EB383C0510BBF8A40000B2D2 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = SOURCE_ROOT; }; - EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - EB383D1010BBFC630000B2D2 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, - 28D801B40F44B63D00FB423F /* CoreData.framework in Frameworks */, - EB383C1410BBF8C70000B2D2 /* QuartzCore.framework in Frameworks */, - 6EF963EC118E96CC003902E7 /* libThree20.a in Frameworks */, - 6E37974911B9BDCB0011C497 /* libThree20Core.a in Frameworks */, - 6E37974A11B9BDCB0011C497 /* libThree20Network.a in Frameworks */, - 6E37974B11B9BDCC0011C497 /* libThree20Style.a in Frameworks */, - 6E37974C11B9BDCC0011C497 /* libThree20UI.a in Frameworks */, - 6E37974D11B9BDCC0011C497 /* libThree20UICommon.a in Frameworks */, - 6E37974E11B9BDCD0011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - EB383C0410BBF8A40000B2D2 /* AppDelegate.h */, - EB383C0510BBF8A40000B2D2 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 6EF963BC118E96B7003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - EB383D1010BBFC630000B2D2 /* Three20.bundle */, - 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765A40DF7441C002DB57D /* CoreGraphics.framework */, - 28D801B30F44B63D00FB423F /* CoreData.framework */, - EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37971111B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37972511B9BDB60011C497 /* libThree20Core.a */, - 6E37972711B9BDB60011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971411B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37972B11B9BDB60011C497 /* libThree20Network.a */, - 6E37972D11B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971711B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973111B9BDB60011C497 /* libThree20Style.a */, - 6E37973311B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971A11B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973711B9BDB60011C497 /* libThree20UICommon.a */, - 6E37973911B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971D11B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */, - 6E37973F11B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37972011B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37974311B9BDB60011C497 /* libThree20UI.a */, - 6E37974511B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37974711B9BDB80011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */, - 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */, - 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */, - 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */, - 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */, - 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */, - 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E37974811B9BDC10011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF963BC118E96B7003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37974711B9BDB80011C497 /* Three20 */, - 6E37974811B9BDC10011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF963BE118E96C9003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF963E9118E96CA003902E7 /* libThree20.a */, - 6EF963EB118E96CA003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF963EE118E96CF003902E7 /* PBXTargetDependency */, - 6E37975011B9BDD70011C497 /* PBXTargetDependency */, - 6E37975211B9BDD70011C497 /* PBXTargetDependency */, - 6E37975411B9BDD70011C497 /* PBXTargetDependency */, - 6E37975611B9BDD70011C497 /* PBXTargetDependency */, - 6E37975811B9BDD70011C497 /* PBXTargetDependency */, - 6E37975A11B9BDD70011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.1"; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF963BE118E96C9003902E7 /* Products */; - ProjectRef = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37971111B9BDB60011C497 /* Products */; - ProjectRef = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37971411B9BDB60011C497 /* Products */; - ProjectRef = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37971711B9BDB60011C497 /* Products */; - ProjectRef = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37972011B9BDB60011C497 /* Products */; - ProjectRef = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37971A11B9BDB60011C497 /* Products */; - ProjectRef = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37971D11B9BDB60011C497 /* Products */; - ProjectRef = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E37972511B9BDB60011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37972411B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972711B9BDB60011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37972611B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972B11B9BDB60011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37972A11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972D11B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37972C11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973111B9BDB60011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E37973011B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973311B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973211B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973711B9BDB60011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E37973611B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973911B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973811B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E37973C11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973F11B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973E11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37974311B9BDB60011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E37974211B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37974511B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37974411B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF963E9118E96CA003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF963E8118E96CA003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF963EB118E96CA003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF963EA118E96CA003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EB383D1110BBFC630000B2D2 /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 28C3AD8A0F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel in Sources */, - EB383C0610BBF8A40000B2D2 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E37975011B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E37974F11B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975211B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E37975111B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975411B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E37975311B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975611B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E37975511B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975811B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E37975711B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975A11B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E37975911B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6EF963EE118E96CF003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF963ED118E96CF003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos3.1.3; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos3.1.3; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.2/Simple Application/Simple Core Data Application/main.m b/templates/projects3.2.2/Simple Application/Simple Core Data Application/main.m deleted file mode 100644 index 9387467159..0000000000 --- a/templates/projects3.2.2/Simple Application/Simple Core Data Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/projects3.2.2/Simple Application/TemplateChooser.plist b/templates/projects3.2.2/Simple Application/TemplateChooser.plist deleted file mode 100644 index 09bf9f451d..0000000000 --- a/templates/projects3.2.2/Simple Application/TemplateChooser.plist +++ /dev/null @@ -1,12 +0,0 @@ -{ - Checkboxes = ( - { - Key = CoreData; - Title = "Use Core Data for storage"; - }, - ); - TemplateSelection = { - "" = "Simple Application"; - CoreData = "Simple Core Data Application"; - }; -} diff --git a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h b/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h deleted file mode 100644 index 8694f8e28b..0000000000 --- a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { -} - -@end - diff --git a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m b/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m deleted file mode 100644 index 7e3c63c5f5..0000000000 --- a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 3d1e7e15e9..0000000000 --- a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index 9556e4be43..0000000000 --- a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,15 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// -#import - -#ifndef __IPHONE_3_2 -#warning "This project uses features only available in iPhone SDK 3.2 and later." -#endif - - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 60b4ce1ffb..0000000000 --- a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for an iPad application using the three20 framework. It provides an application delegate and a basic TTNavigator. - - diff --git a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index 3834a4d71d..0000000000 --- a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,705 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; - 6E3175FB1126577100F4DDEC /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E3175FA1126577100F4DDEC /* Three20.bundle */; }; - 6E3176191126579100F4DDEC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3176181126579100F4DDEC /* QuartzCore.framework */; }; - 6E3797BA11B9BE030011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37979911B9BE010011C497 /* libThree20Core.a */; }; - 6E3797BB11B9BE030011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37979F11B9BE010011C497 /* libThree20Network.a */; }; - 6E3797BC11B9BE040011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797A511B9BE010011C497 /* libThree20Style.a */; }; - 6E3797BD11B9BE040011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797B711B9BE010011C497 /* libThree20UI.a */; }; - 6E3797BE11B9BE050011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */; }; - 6E3797BF11B9BE050011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */; }; - 6EF96366118E9604003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF96363118E95FF003902E7 /* libThree20.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E37979811B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37979A11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37979E11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3797A011B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797A411B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3797A611B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797AA11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3797AC11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797B011B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3797B211B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797B611B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3797B811B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797CB11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3797CD11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3797CF11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3797D111B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3797D311B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3797D511B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF96362118E95FF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF96364118E95FF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF96367118E9608003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28A0AAE50D9B0CCF005BE974 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6E3175FA1126577100F4DDEC /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E3176181126579100F4DDEC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF96337118E95FE003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, - 6E3176191126579100F4DDEC /* QuartzCore.framework in Frameworks */, - 6EF96366118E9604003902E7 /* libThree20.a in Frameworks */, - 6E3797BA11B9BE030011C497 /* libThree20Core.a in Frameworks */, - 6E3797BB11B9BE030011C497 /* libThree20Network.a in Frameworks */, - 6E3797BC11B9BE040011C497 /* libThree20Style.a in Frameworks */, - 6E3797BD11B9BE040011C497 /* libThree20UI.a in Frameworks */, - 6E3797BE11B9BE050011C497 /* libThree20UICommon.a in Frameworks */, - 6E3797BF11B9BE050011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources-iPad */, - 6EF9630E118E95E6003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - 6E3176181126579100F4DDEC /* QuartzCore.framework */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 28A0AAE50D9B0CCF005BE974 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources-iPad */ = { - isa = PBXGroup; - children = ( - 6E3175FA1126577100F4DDEC /* Three20.bundle */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = "Resources-iPad"; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37978511B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37979911B9BE010011C497 /* libThree20Core.a */, - 6E37979B11B9BE010011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978811B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37979F11B9BE010011C497 /* libThree20Network.a */, - 6E3797A111B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978B11B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797A511B9BE010011C497 /* libThree20Style.a */, - 6E3797A711B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978E11B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */, - 6E3797AD11B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37979111B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */, - 6E3797B311B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37979411B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797B711B9BE010011C497 /* libThree20UI.a */, - 6E3797B911B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3797C111B9BE070011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */, - 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */, - 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */, - 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */, - 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */, - 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */, - 6EF96337118E95FE003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E3797C211B9BE0D0011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF9630E118E95E6003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E3797C111B9BE070011C497 /* Three20 */, - 6E3797C211B9BE0D0011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF96338118E95FE003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF96363118E95FF003902E7 /* libThree20.a */, - 6EF96365118E95FF003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF96368118E9608003902E7 /* PBXTargetDependency */, - 6E3797CC11B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797CE11B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D011B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D211B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D411B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D611B9BE1C0011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.2"; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - en, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF96338118E95FE003902E7 /* Products */; - ProjectRef = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37978511B9BE010011C497 /* Products */; - ProjectRef = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37978811B9BE010011C497 /* Products */; - ProjectRef = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37978B11B9BE010011C497 /* Products */; - ProjectRef = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37979411B9BE010011C497 /* Products */; - ProjectRef = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37978E11B9BE010011C497 /* Products */; - ProjectRef = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37979111B9BE010011C497 /* Products */; - ProjectRef = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E37979911B9BE010011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37979811B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37979B11B9BE010011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37979A11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37979F11B9BE010011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37979E11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A111B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797A011B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A511B9BE010011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E3797A411B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A711B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797A611B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3797AA11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797AD11B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797AC11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E3797B011B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B311B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797B211B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B711B9BE010011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E3797B611B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B911B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797B811B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF96363118E95FF003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF96362118E95FF003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF96365118E95FF003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF96364118E95FF003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3175FB1126577100F4DDEC /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E3797CC11B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E3797CB11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797CE11B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E3797CD11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D011B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E3797CF11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D211B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E3797D111B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D411B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E3797D311B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D611B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3797D511B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6EF96368118E9608003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF96367118E9608003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos3.1.3; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos3.1.3; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - TARGETED_DEVICE_FAMILY = 2; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PREBINDING = NO; - TARGETED_DEVICE_FAMILY = 2; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/main.m b/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/main.m deleted file mode 100644 index 8023e88258..0000000000 --- a/templates/projects3.2.2/Simple iPad Application/Simple iPad Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/projects3.2.4/Simple Application/Simple Application/Classes/AppDelegate.h b/templates/projects3.2.4/Simple Application/Simple Application/Classes/AppDelegate.h deleted file mode 100644 index 7cfb6b5468..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Application/Classes/AppDelegate.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -@interface AppDelegate : NSObject { -} - -@end - diff --git a/templates/projects3.2.4/Simple Application/Simple Application/Classes/AppDelegate.m b/templates/projects3.2.4/Simple Application/Simple Application/Classes/AppDelegate.m deleted file mode 100644 index 7e3c63c5f5..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Application/Classes/AppDelegate.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index b4a8da089d..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 7110fc90d3..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for any application using the three20 framework. It provides just an application delegate and a basic TTNavigator. - - diff --git a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index fb4c90a7e0..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,702 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 6E3796DA11B9BD740011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796B611B9BD630011C497 /* libThree20Core.a */; }; - 6E3796DB11B9BD750011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796BC11B9BD630011C497 /* libThree20Network.a */; }; - 6E3796DC11B9BD750011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796C211B9BD630011C497 /* libThree20Style.a */; }; - 6E3796DD11B9BD750011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796D411B9BD630011C497 /* libThree20UI.a */; }; - 6E3796DE11B9BD760011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796C811B9BD630011C497 /* libThree20UICommon.a */; }; - 6E3796DF11B9BD760011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */; }; - 6EF962BA118E955A003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF962B7118E9553003902E7 /* libThree20.a */; }; - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */; }; - EB383B6D10BBF6360000B2D2 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EB383B6C10BBF6360000B2D2 /* Three20.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E3796B511B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3796B711B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796BB11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3796BD11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796C111B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3796C311B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796C711B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3796C911B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796CD11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3796CF11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796D311B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3796D511B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796E811B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3796EA11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3796EC11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3796EE11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3796F011B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3796F211B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF962B6118E9553003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF962B8118E9553003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF962BB118E955F003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF9628B118E9552003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - EB383B6C10BBF6360000B2D2 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */, - 6EF962BA118E955A003902E7 /* libThree20.a in Frameworks */, - 6E3796DA11B9BD740011C497 /* libThree20Core.a in Frameworks */, - 6E3796DB11B9BD750011C497 /* libThree20Network.a in Frameworks */, - 6E3796DC11B9BD750011C497 /* libThree20Style.a in Frameworks */, - 6E3796DD11B9BD750011C497 /* libThree20UI.a in Frameworks */, - 6E3796DE11B9BD760011C497 /* libThree20UICommon.a in Frameworks */, - 6E3796DF11B9BD760011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 6EF96274118E9502003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - EB383B6C10BBF6360000B2D2 /* Three20.bundle */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E3796A211B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796B611B9BD630011C497 /* libThree20Core.a */, - 6E3796B811B9BD630011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796A511B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796BC11B9BD630011C497 /* libThree20Network.a */, - 6E3796BE11B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796A811B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796C211B9BD630011C497 /* libThree20Style.a */, - 6E3796C411B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796AB11B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796C811B9BD630011C497 /* libThree20UICommon.a */, - 6E3796CA11B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796AE11B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */, - 6E3796D011B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796B111B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796D411B9BD630011C497 /* libThree20UI.a */, - 6E3796D611B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796D811B9BD650011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */, - 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */, - 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */, - 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */, - 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */, - 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */, - 6EF9628B118E9552003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E3796D911B9BD6C0011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF96274118E9502003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E3796D811B9BD650011C497 /* Three20 */, - 6E3796D911B9BD6C0011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF9628C118E9552003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF962B7118E9553003902E7 /* libThree20.a */, - 6EF962B9118E9553003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF962BC118E955F003902E7 /* PBXTargetDependency */, - 6E3796E911B9BD800011C497 /* PBXTargetDependency */, - 6E3796EB11B9BD800011C497 /* PBXTargetDependency */, - 6E3796ED11B9BD800011C497 /* PBXTargetDependency */, - 6E3796EF11B9BD800011C497 /* PBXTargetDependency */, - 6E3796F111B9BD800011C497 /* PBXTargetDependency */, - 6E3796F311B9BD800011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF9628C118E9552003902E7 /* Products */; - ProjectRef = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E3796A211B9BD630011C497 /* Products */; - ProjectRef = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E3796A511B9BD630011C497 /* Products */; - ProjectRef = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E3796A811B9BD630011C497 /* Products */; - ProjectRef = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E3796B111B9BD630011C497 /* Products */; - ProjectRef = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E3796AB11B9BD630011C497 /* Products */; - ProjectRef = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E3796AE11B9BD630011C497 /* Products */; - ProjectRef = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E3796B611B9BD630011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E3796B511B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796B811B9BD630011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E3796B711B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796BC11B9BD630011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E3796BB11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796BE11B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796BD11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C211B9BD630011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E3796C111B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C411B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796C311B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C811B9BD630011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3796C711B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796CA11B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796C911B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E3796CD11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D011B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796CF11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D411B9BD630011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E3796D311B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D611B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796D511B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF962B7118E9553003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF962B6118E9553003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF962B9118E9553003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF962B8118E9553003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EB383B6D10BBF6360000B2D2 /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E3796E911B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E3796E811B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796EB11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E3796EA11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796ED11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E3796EC11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796EF11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E3796EE11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796F111B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E3796F011B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796F311B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3796F211B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6EF962BC118E955F003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF962BB118E955F003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos4.1; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos4.1; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.4/Simple Application/Simple Application/main.m b/templates/projects3.2.4/Simple Application/Simple Application/main.m deleted file mode 100644 index 8023e88258..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/Classes/AppDelegate.h b/templates/projects3.2.4/Simple Application/Simple Core Data Application/Classes/AppDelegate.h deleted file mode 100644 index 950ab6d71f..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Core Data Application/Classes/AppDelegate.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { - NSManagedObjectModel* _managedObjectModel; - NSManagedObjectContext* _managedObjectContext; - NSPersistentStoreCoordinator* _persistentStoreCoordinator; - - // App State - BOOL _modelCreated; - BOOL _resetModel; -} - -@property (nonatomic, retain, readonly) NSManagedObjectContext* managedObjectContext; -@property (nonatomic, readonly) NSString* applicationDocumentsDirectory; - - -@end - diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/Classes/AppDelegate.m b/templates/projects3.2.4/Simple Application/Simple Core Data Application/Classes/AppDelegate.m deleted file mode 100644 index e10428a214..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Core Data Application/Classes/AppDelegate.m +++ /dev/null @@ -1,207 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - -#define kStoreType NSSQLiteStoreType -#define kStoreFilename @"db.sqlite" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate() -- (NSPersistentStoreCoordinator *)persistentStoreCoordinator; -- (NSString *)applicationDocumentsDirectory; - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - // Forcefully removes the model db and recreates it. - //_resetModel = YES; - - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_managedObjectContext); - TT_RELEASE_SAFELY(_managedObjectModel); - TT_RELEASE_SAFELY(_persistentStoreCoordinator); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationWillTerminate:(UIApplication *)application { - NSError* error = nil; - if (_managedObjectContext != nil) { - if ([_managedObjectContext hasChanges] && ![_managedObjectContext save:&error]) { - NSLog(@"Unresolved error %@, %@", error, [error userInfo]); - abort(); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Core Data stack - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSManagedObjectContext*)managedObjectContext { - if( _managedObjectContext != nil ) { - return _managedObjectContext; - } - - NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; - if (coordinator != nil) { - _managedObjectContext = [[NSManagedObjectContext alloc] init]; - [_managedObjectContext setPersistentStoreCoordinator: coordinator]; - [_managedObjectContext setUndoManager:nil]; - [_managedObjectContext setRetainsRegisteredObjects:YES]; - } - return _managedObjectContext; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSManagedObjectModel*)managedObjectModel { - if( _managedObjectModel != nil ) { - return _managedObjectModel; - } - _managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles:nil] retain]; - return _managedObjectModel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)storePath { - return [[self applicationDocumentsDirectory] - stringByAppendingPathComponent: kStoreFilename]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSURL*)storeUrl { - return [NSURL fileURLWithPath:[self storePath]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)migrationOptions { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSPersistentStoreCoordinator*)persistentStoreCoordinator { - if( _persistentStoreCoordinator != nil ) { - return _persistentStoreCoordinator; - } - - NSString* storePath = [self storePath]; - NSURL *storeUrl = [self storeUrl]; - - NSError* error; - _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] - initWithManagedObjectModel: [self managedObjectModel]]; - - NSDictionary* options = [self migrationOptions]; - - // Check whether the store already exists or not. - NSFileManager* fileManager = [NSFileManager defaultManager]; - BOOL exists = [fileManager fileExistsAtPath:storePath]; - - TTDINFO(storePath); - if( !exists ) { - _modelCreated = YES; - } else { - if( _resetModel || - [[NSUserDefaults standardUserDefaults] boolForKey:@"erase_all_preference"] ) { - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"erase_all_preference"]; - [fileManager removeItemAtPath:storePath error:nil]; - _modelCreated = YES; - } - } - - if (![_persistentStoreCoordinator - addPersistentStoreWithType: kStoreType - configuration: nil - URL: storeUrl - options: options - error: &error - ]) { - // We couldn't add the persistent store, so let's wipe it out and try again. - [fileManager removeItemAtPath:storePath error:nil]; - _modelCreated = YES; - - if (![_persistentStoreCoordinator - addPersistentStoreWithType: kStoreType - configuration: nil - URL: storeUrl - options: nil - error: &error - ]) { - // Something is terribly wrong here. - } - } - - return _persistentStoreCoordinator; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Application's documents directory - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)applicationDocumentsDirectory { - return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) - lastObject]; -} - - -@end - diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements b/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements deleted file mode 100644 index 788aaa2fe1..0000000000 Binary files a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements and /dev/null differ diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout b/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout deleted file mode 100644 index ce1bc30d8c..0000000000 Binary files a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout and /dev/null differ diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index ff72dc254c..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,16 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - - -#ifdef __OBJC__ - #import - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 7579261498..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for an application that uses three20 with Core Data. It provides an application delegate that creates the Core Data stack and establishes the persistent store. - - diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index 8869c900f5..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,712 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - 28C3AD8A0F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */; }; - 28D801B40F44B63D00FB423F /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28D801B30F44B63D00FB423F /* CoreData.framework */; }; - 6E37974911B9BDCB0011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37972511B9BDB60011C497 /* libThree20Core.a */; }; - 6E37974A11B9BDCB0011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37972B11B9BDB60011C497 /* libThree20Network.a */; }; - 6E37974B11B9BDCC0011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973111B9BDB60011C497 /* libThree20Style.a */; }; - 6E37974C11B9BDCC0011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37974311B9BDB60011C497 /* libThree20UI.a */; }; - 6E37974D11B9BDCC0011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973711B9BDB60011C497 /* libThree20UICommon.a */; }; - 6E37974E11B9BDCD0011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */; }; - 6EF963EC118E96CC003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF963E9118E96CA003902E7 /* libThree20.a */; }; - EB383C0610BBF8A40000B2D2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EB383C0510BBF8A40000B2D2 /* AppDelegate.m */; }; - EB383C1410BBF8C70000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */; }; - EB383D1110BBFC630000B2D2 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EB383D1010BBFC630000B2D2 /* Three20.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E37972411B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37972611B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37972A11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37972C11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973011B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37973211B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973611B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37973811B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973C11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37973E11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37974211B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37974411B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37974F11B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37975111B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37975311B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37975511B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37975711B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37975911B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF963E8118E96CA003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF963EA118E96CA003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF963ED118E96CF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.xcdatamodel; path = "___PROJECTNAMEASIDENTIFIER___.xcdatamodel"; sourceTree = ""; }; - 28D801B30F44B63D00FB423F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; sourceTree = ""; }; - EB383C0410BBF8A40000B2D2 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = SOURCE_ROOT; }; - EB383C0510BBF8A40000B2D2 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = SOURCE_ROOT; }; - EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - EB383D1010BBFC630000B2D2 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, - 28D801B40F44B63D00FB423F /* CoreData.framework in Frameworks */, - EB383C1410BBF8C70000B2D2 /* QuartzCore.framework in Frameworks */, - 6EF963EC118E96CC003902E7 /* libThree20.a in Frameworks */, - 6E37974911B9BDCB0011C497 /* libThree20Core.a in Frameworks */, - 6E37974A11B9BDCB0011C497 /* libThree20Network.a in Frameworks */, - 6E37974B11B9BDCC0011C497 /* libThree20Style.a in Frameworks */, - 6E37974C11B9BDCC0011C497 /* libThree20UI.a in Frameworks */, - 6E37974D11B9BDCC0011C497 /* libThree20UICommon.a in Frameworks */, - 6E37974E11B9BDCD0011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - EB383C0410BBF8A40000B2D2 /* AppDelegate.h */, - EB383C0510BBF8A40000B2D2 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 6EF963BC118E96B7003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - EB383D1010BBFC630000B2D2 /* Three20.bundle */, - 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765A40DF7441C002DB57D /* CoreGraphics.framework */, - 28D801B30F44B63D00FB423F /* CoreData.framework */, - EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37971111B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37972511B9BDB60011C497 /* libThree20Core.a */, - 6E37972711B9BDB60011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971411B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37972B11B9BDB60011C497 /* libThree20Network.a */, - 6E37972D11B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971711B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973111B9BDB60011C497 /* libThree20Style.a */, - 6E37973311B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971A11B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973711B9BDB60011C497 /* libThree20UICommon.a */, - 6E37973911B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971D11B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */, - 6E37973F11B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37972011B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37974311B9BDB60011C497 /* libThree20UI.a */, - 6E37974511B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37974711B9BDB80011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */, - 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */, - 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */, - 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */, - 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */, - 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */, - 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E37974811B9BDC10011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF963BC118E96B7003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37974711B9BDB80011C497 /* Three20 */, - 6E37974811B9BDC10011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF963BE118E96C9003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF963E9118E96CA003902E7 /* libThree20.a */, - 6EF963EB118E96CA003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF963EE118E96CF003902E7 /* PBXTargetDependency */, - 6E37975011B9BDD70011C497 /* PBXTargetDependency */, - 6E37975211B9BDD70011C497 /* PBXTargetDependency */, - 6E37975411B9BDD70011C497 /* PBXTargetDependency */, - 6E37975611B9BDD70011C497 /* PBXTargetDependency */, - 6E37975811B9BDD70011C497 /* PBXTargetDependency */, - 6E37975A11B9BDD70011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF963BE118E96C9003902E7 /* Products */; - ProjectRef = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37971111B9BDB60011C497 /* Products */; - ProjectRef = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37971411B9BDB60011C497 /* Products */; - ProjectRef = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37971711B9BDB60011C497 /* Products */; - ProjectRef = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37972011B9BDB60011C497 /* Products */; - ProjectRef = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37971A11B9BDB60011C497 /* Products */; - ProjectRef = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37971D11B9BDB60011C497 /* Products */; - ProjectRef = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E37972511B9BDB60011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37972411B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972711B9BDB60011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37972611B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972B11B9BDB60011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37972A11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972D11B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37972C11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973111B9BDB60011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E37973011B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973311B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973211B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973711B9BDB60011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E37973611B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973911B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973811B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E37973C11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973F11B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973E11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37974311B9BDB60011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E37974211B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37974511B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37974411B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF963E9118E96CA003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF963E8118E96CA003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF963EB118E96CA003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF963EA118E96CA003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EB383D1110BBFC630000B2D2 /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 28C3AD8A0F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel in Sources */, - EB383C0610BBF8A40000B2D2 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E37975011B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E37974F11B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975211B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E37975111B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975411B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E37975311B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975611B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E37975511B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975811B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E37975711B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975A11B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E37975911B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6EF963EE118E96CF003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF963ED118E96CF003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos4.1; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos4.1; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.4/Simple Application/Simple Core Data Application/main.m b/templates/projects3.2.4/Simple Application/Simple Core Data Application/main.m deleted file mode 100644 index 9387467159..0000000000 --- a/templates/projects3.2.4/Simple Application/Simple Core Data Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/projects3.2.4/Simple Application/TemplateChooser.plist b/templates/projects3.2.4/Simple Application/TemplateChooser.plist deleted file mode 100644 index 09bf9f451d..0000000000 --- a/templates/projects3.2.4/Simple Application/TemplateChooser.plist +++ /dev/null @@ -1,12 +0,0 @@ -{ - Checkboxes = ( - { - Key = CoreData; - Title = "Use Core Data for storage"; - }, - ); - TemplateSelection = { - "" = "Simple Application"; - CoreData = "Simple Core Data Application"; - }; -} diff --git a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h b/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h deleted file mode 100644 index 8694f8e28b..0000000000 --- a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { -} - -@end - diff --git a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m b/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m deleted file mode 100644 index 7e3c63c5f5..0000000000 --- a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 3d1e7e15e9..0000000000 --- a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index 9556e4be43..0000000000 --- a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,15 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// -#import - -#ifndef __IPHONE_3_2 -#warning "This project uses features only available in iPhone SDK 3.2 and later." -#endif - - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 60b4ce1ffb..0000000000 --- a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for an iPad application using the three20 framework. It provides an application delegate and a basic TTNavigator. - - diff --git a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index 684cdc5ee3..0000000000 --- a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,706 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; - 6E3175FB1126577100F4DDEC /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E3175FA1126577100F4DDEC /* Three20.bundle */; }; - 6E3176191126579100F4DDEC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3176181126579100F4DDEC /* QuartzCore.framework */; }; - 6E3797BA11B9BE030011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37979911B9BE010011C497 /* libThree20Core.a */; }; - 6E3797BB11B9BE030011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37979F11B9BE010011C497 /* libThree20Network.a */; }; - 6E3797BC11B9BE040011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797A511B9BE010011C497 /* libThree20Style.a */; }; - 6E3797BD11B9BE040011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797B711B9BE010011C497 /* libThree20UI.a */; }; - 6E3797BE11B9BE050011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */; }; - 6E3797BF11B9BE050011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */; }; - 6EF96366118E9604003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF96363118E95FF003902E7 /* libThree20.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E37979811B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37979A11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37979E11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3797A011B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797A411B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3797A611B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797AA11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3797AC11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797B011B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3797B211B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797B611B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3797B811B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797CB11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3797CD11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3797CF11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3797D111B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3797D311B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3797D511B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF96362118E95FF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF96364118E95FF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF96367118E9608003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28A0AAE50D9B0CCF005BE974 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6E3175FA1126577100F4DDEC /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E3176181126579100F4DDEC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF96337118E95FE003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, - 6E3176191126579100F4DDEC /* QuartzCore.framework in Frameworks */, - 6EF96366118E9604003902E7 /* libThree20.a in Frameworks */, - 6E3797BA11B9BE030011C497 /* libThree20Core.a in Frameworks */, - 6E3797BB11B9BE030011C497 /* libThree20Network.a in Frameworks */, - 6E3797BC11B9BE040011C497 /* libThree20Style.a in Frameworks */, - 6E3797BD11B9BE040011C497 /* libThree20UI.a in Frameworks */, - 6E3797BE11B9BE050011C497 /* libThree20UICommon.a in Frameworks */, - 6E3797BF11B9BE050011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources-iPad */, - 6EF9630E118E95E6003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - 6E3176181126579100F4DDEC /* QuartzCore.framework */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 28A0AAE50D9B0CCF005BE974 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources-iPad */ = { - isa = PBXGroup; - children = ( - 6E3175FA1126577100F4DDEC /* Three20.bundle */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = "Resources-iPad"; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37978511B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37979911B9BE010011C497 /* libThree20Core.a */, - 6E37979B11B9BE010011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978811B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37979F11B9BE010011C497 /* libThree20Network.a */, - 6E3797A111B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978B11B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797A511B9BE010011C497 /* libThree20Style.a */, - 6E3797A711B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978E11B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */, - 6E3797AD11B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37979111B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */, - 6E3797B311B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37979411B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797B711B9BE010011C497 /* libThree20UI.a */, - 6E3797B911B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3797C111B9BE070011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */, - 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */, - 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */, - 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */, - 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */, - 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */, - 6EF96337118E95FE003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E3797C211B9BE0D0011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF9630E118E95E6003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E3797C111B9BE070011C497 /* Three20 */, - 6E3797C211B9BE0D0011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF96338118E95FE003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF96363118E95FF003902E7 /* libThree20.a */, - 6EF96365118E95FF003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF96368118E9608003902E7 /* PBXTargetDependency */, - 6E3797CC11B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797CE11B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D011B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D211B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D411B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D611B9BE1C0011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - en, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF96338118E95FE003902E7 /* Products */; - ProjectRef = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37978511B9BE010011C497 /* Products */; - ProjectRef = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37978811B9BE010011C497 /* Products */; - ProjectRef = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37978B11B9BE010011C497 /* Products */; - ProjectRef = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37979411B9BE010011C497 /* Products */; - ProjectRef = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37978E11B9BE010011C497 /* Products */; - ProjectRef = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37979111B9BE010011C497 /* Products */; - ProjectRef = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E37979911B9BE010011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37979811B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37979B11B9BE010011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37979A11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37979F11B9BE010011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37979E11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A111B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797A011B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A511B9BE010011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E3797A411B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A711B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797A611B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3797AA11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797AD11B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797AC11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E3797B011B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B311B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797B211B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B711B9BE010011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E3797B611B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B911B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797B811B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF96363118E95FF003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF96362118E95FF003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF96365118E95FF003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF96364118E95FF003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3175FB1126577100F4DDEC /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E3797CC11B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E3797CB11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797CE11B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E3797CD11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D011B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E3797CF11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D211B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E3797D111B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D411B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E3797D311B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D611B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3797D511B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6EF96368118E9608003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF96367118E9608003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos3.2; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos3.2; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - TARGETED_DEVICE_FAMILY = 2; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PREBINDING = NO; - TARGETED_DEVICE_FAMILY = 2; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/main.m b/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/main.m deleted file mode 100644 index 8023e88258..0000000000 --- a/templates/projects3.2.4/Simple iPad Application/Simple iPad Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/projects3.2.5/Simple Application/Simple Application/Classes/AppDelegate.h b/templates/projects3.2.5/Simple Application/Simple Application/Classes/AppDelegate.h deleted file mode 100644 index 7cfb6b5468..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Application/Classes/AppDelegate.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -@interface AppDelegate : NSObject { -} - -@end - diff --git a/templates/projects3.2.5/Simple Application/Simple Application/Classes/AppDelegate.m b/templates/projects3.2.5/Simple Application/Simple Application/Classes/AppDelegate.m deleted file mode 100644 index 7e3c63c5f5..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Application/Classes/AppDelegate.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index b4a8da089d..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 7110fc90d3..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for any application using the three20 framework. It provides just an application delegate and a basic TTNavigator. - - diff --git a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index 602fd21add..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,702 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 6E3796DA11B9BD740011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796B611B9BD630011C497 /* libThree20Core.a */; }; - 6E3796DB11B9BD750011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796BC11B9BD630011C497 /* libThree20Network.a */; }; - 6E3796DC11B9BD750011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796C211B9BD630011C497 /* libThree20Style.a */; }; - 6E3796DD11B9BD750011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796D411B9BD630011C497 /* libThree20UI.a */; }; - 6E3796DE11B9BD760011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796C811B9BD630011C497 /* libThree20UICommon.a */; }; - 6E3796DF11B9BD760011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */; }; - 6EF962BA118E955A003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF962B7118E9553003902E7 /* libThree20.a */; }; - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */; }; - EB383B6D10BBF6360000B2D2 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EB383B6C10BBF6360000B2D2 /* Three20.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E3796B511B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3796B711B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796BB11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3796BD11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796C111B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3796C311B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796C711B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3796C911B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796CD11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3796CF11B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796D311B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3796D511B9BD630011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3796E811B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3796EA11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3796EC11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3796EE11B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3796F011B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3796F211B9BD800011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF962B6118E9553003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF962B8118E9553003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF962BB118E955F003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF9628B118E9552003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - EB383B6C10BBF6360000B2D2 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - EB383B6510BBF62B0000B2D2 /* QuartzCore.framework in Frameworks */, - 6EF962BA118E955A003902E7 /* libThree20.a in Frameworks */, - 6E3796DA11B9BD740011C497 /* libThree20Core.a in Frameworks */, - 6E3796DB11B9BD750011C497 /* libThree20Network.a in Frameworks */, - 6E3796DC11B9BD750011C497 /* libThree20Style.a in Frameworks */, - 6E3796DD11B9BD750011C497 /* libThree20UI.a in Frameworks */, - 6E3796DE11B9BD760011C497 /* libThree20UICommon.a in Frameworks */, - 6E3796DF11B9BD760011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 6EF96274118E9502003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - EB383B6C10BBF6360000B2D2 /* Three20.bundle */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - EB383B6410BBF62B0000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E3796A211B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796B611B9BD630011C497 /* libThree20Core.a */, - 6E3796B811B9BD630011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796A511B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796BC11B9BD630011C497 /* libThree20Network.a */, - 6E3796BE11B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796A811B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796C211B9BD630011C497 /* libThree20Style.a */, - 6E3796C411B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796AB11B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796C811B9BD630011C497 /* libThree20UICommon.a */, - 6E3796CA11B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796AE11B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */, - 6E3796D011B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796B111B9BD630011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3796D411B9BD630011C497 /* libThree20UI.a */, - 6E3796D611B9BD630011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3796D811B9BD650011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */, - 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */, - 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */, - 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */, - 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */, - 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */, - 6EF9628B118E9552003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E3796D911B9BD6C0011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF96274118E9502003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E3796D811B9BD650011C497 /* Three20 */, - 6E3796D911B9BD6C0011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF9628C118E9552003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF962B7118E9553003902E7 /* libThree20.a */, - 6EF962B9118E9553003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF962BC118E955F003902E7 /* PBXTargetDependency */, - 6E3796E911B9BD800011C497 /* PBXTargetDependency */, - 6E3796EB11B9BD800011C497 /* PBXTargetDependency */, - 6E3796ED11B9BD800011C497 /* PBXTargetDependency */, - 6E3796EF11B9BD800011C497 /* PBXTargetDependency */, - 6E3796F111B9BD800011C497 /* PBXTargetDependency */, - 6E3796F311B9BD800011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF9628C118E9552003902E7 /* Products */; - ProjectRef = 6EF9628B118E9552003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E3796A211B9BD630011C497 /* Products */; - ProjectRef = 6E3796A111B9BD630011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E3796A511B9BD630011C497 /* Products */; - ProjectRef = 6E3796A411B9BD630011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E3796A811B9BD630011C497 /* Products */; - ProjectRef = 6E3796A711B9BD630011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E3796B111B9BD630011C497 /* Products */; - ProjectRef = 6E3796B011B9BD630011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E3796AB11B9BD630011C497 /* Products */; - ProjectRef = 6E3796AA11B9BD630011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E3796AE11B9BD630011C497 /* Products */; - ProjectRef = 6E3796AD11B9BD630011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E3796B611B9BD630011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E3796B511B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796B811B9BD630011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E3796B711B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796BC11B9BD630011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E3796BB11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796BE11B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796BD11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C211B9BD630011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E3796C111B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C411B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796C311B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796C811B9BD630011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3796C711B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796CA11B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796C911B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796CE11B9BD630011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E3796CD11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D011B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796CF11B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D411B9BD630011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E3796D311B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3796D611B9BD630011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3796D511B9BD630011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF962B7118E9553003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF962B6118E9553003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF962B9118E9553003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF962B8118E9553003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EB383B6D10BBF6360000B2D2 /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E3796E911B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E3796E811B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796EB11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E3796EA11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796ED11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E3796EC11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796EF11B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E3796EE11B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796F111B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E3796F011B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6E3796F311B9BD800011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3796F211B9BD800011C497 /* PBXContainerItemProxy */; - }; - 6EF962BC118E955F003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF962BB118E955F003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.5/Simple Application/Simple Application/main.m b/templates/projects3.2.5/Simple Application/Simple Application/main.m deleted file mode 100644 index 8023e88258..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/Classes/AppDelegate.h b/templates/projects3.2.5/Simple Application/Simple Core Data Application/Classes/AppDelegate.h deleted file mode 100644 index 950ab6d71f..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Core Data Application/Classes/AppDelegate.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { - NSManagedObjectModel* _managedObjectModel; - NSManagedObjectContext* _managedObjectContext; - NSPersistentStoreCoordinator* _persistentStoreCoordinator; - - // App State - BOOL _modelCreated; - BOOL _resetModel; -} - -@property (nonatomic, retain, readonly) NSManagedObjectContext* managedObjectContext; -@property (nonatomic, readonly) NSString* applicationDocumentsDirectory; - - -@end - diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/Classes/AppDelegate.m b/templates/projects3.2.5/Simple Application/Simple Core Data Application/Classes/AppDelegate.m deleted file mode 100644 index e10428a214..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Core Data Application/Classes/AppDelegate.m +++ /dev/null @@ -1,207 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - -#define kStoreType NSSQLiteStoreType -#define kStoreFilename @"db.sqlite" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate() -- (NSPersistentStoreCoordinator *)persistentStoreCoordinator; -- (NSString *)applicationDocumentsDirectory; - -@end - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - // Forcefully removes the model db and recreates it. - //_resetModel = YES; - - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)dealloc { - TT_RELEASE_SAFELY(_managedObjectContext); - TT_RELEASE_SAFELY(_managedObjectModel); - TT_RELEASE_SAFELY(_persistentStoreCoordinator); - - [super dealloc]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationWillTerminate:(UIApplication *)application { - NSError* error = nil; - if (_managedObjectContext != nil) { - if ([_managedObjectContext hasChanges] && ![_managedObjectContext save:&error]) { - NSLog(@"Unresolved error %@, %@", error, [error userInfo]); - abort(); - } - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Core Data stack - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSManagedObjectContext*)managedObjectContext { - if( _managedObjectContext != nil ) { - return _managedObjectContext; - } - - NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; - if (coordinator != nil) { - _managedObjectContext = [[NSManagedObjectContext alloc] init]; - [_managedObjectContext setPersistentStoreCoordinator: coordinator]; - [_managedObjectContext setUndoManager:nil]; - [_managedObjectContext setRetainsRegisteredObjects:YES]; - } - return _managedObjectContext; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSManagedObjectModel*)managedObjectModel { - if( _managedObjectModel != nil ) { - return _managedObjectModel; - } - _managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles:nil] retain]; - return _managedObjectModel; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)storePath { - return [[self applicationDocumentsDirectory] - stringByAppendingPathComponent: kStoreFilename]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSURL*)storeUrl { - return [NSURL fileURLWithPath:[self storePath]]; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSDictionary*)migrationOptions { - return nil; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSPersistentStoreCoordinator*)persistentStoreCoordinator { - if( _persistentStoreCoordinator != nil ) { - return _persistentStoreCoordinator; - } - - NSString* storePath = [self storePath]; - NSURL *storeUrl = [self storeUrl]; - - NSError* error; - _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] - initWithManagedObjectModel: [self managedObjectModel]]; - - NSDictionary* options = [self migrationOptions]; - - // Check whether the store already exists or not. - NSFileManager* fileManager = [NSFileManager defaultManager]; - BOOL exists = [fileManager fileExistsAtPath:storePath]; - - TTDINFO(storePath); - if( !exists ) { - _modelCreated = YES; - } else { - if( _resetModel || - [[NSUserDefaults standardUserDefaults] boolForKey:@"erase_all_preference"] ) { - [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"erase_all_preference"]; - [fileManager removeItemAtPath:storePath error:nil]; - _modelCreated = YES; - } - } - - if (![_persistentStoreCoordinator - addPersistentStoreWithType: kStoreType - configuration: nil - URL: storeUrl - options: options - error: &error - ]) { - // We couldn't add the persistent store, so let's wipe it out and try again. - [fileManager removeItemAtPath:storePath error:nil]; - _modelCreated = YES; - - if (![_persistentStoreCoordinator - addPersistentStoreWithType: kStoreType - configuration: nil - URL: storeUrl - options: nil - error: &error - ]) { - // Something is terribly wrong here. - } - } - - return _persistentStoreCoordinator; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Application's documents directory - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (NSString*)applicationDocumentsDirectory { - return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) - lastObject]; -} - - -@end - diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 15665856b0..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - - diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements b/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements deleted file mode 100644 index 788aaa2fe1..0000000000 Binary files a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/elements and /dev/null differ diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout b/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout deleted file mode 100644 index ce1bc30d8c..0000000000 Binary files a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER___.xcdatamodel/layout and /dev/null differ diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index ff72dc254c..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,16 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - - -#ifdef __OBJC__ - #import - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 7579261498..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for an application that uses three20 with Core Data. It provides an application delegate that creates the Core Data stack and establishes the persistent store. - - diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index 321425a219..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Core Data Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,712 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - 28C3AD8A0F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */; }; - 28D801B40F44B63D00FB423F /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28D801B30F44B63D00FB423F /* CoreData.framework */; }; - 6E37974911B9BDCB0011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37972511B9BDB60011C497 /* libThree20Core.a */; }; - 6E37974A11B9BDCB0011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37972B11B9BDB60011C497 /* libThree20Network.a */; }; - 6E37974B11B9BDCC0011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973111B9BDB60011C497 /* libThree20Style.a */; }; - 6E37974C11B9BDCC0011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37974311B9BDB60011C497 /* libThree20UI.a */; }; - 6E37974D11B9BDCC0011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973711B9BDB60011C497 /* libThree20UICommon.a */; }; - 6E37974E11B9BDCD0011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */; }; - 6EF963EC118E96CC003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF963E9118E96CA003902E7 /* libThree20.a */; }; - EB383C0610BBF8A40000B2D2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EB383C0510BBF8A40000B2D2 /* AppDelegate.m */; }; - EB383C1410BBF8C70000B2D2 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */; }; - EB383D1110BBFC630000B2D2 /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = EB383D1010BBFC630000B2D2 /* Three20.bundle */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E37972411B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37972611B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37972A11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37972C11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973011B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37973211B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973611B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37973811B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37973C11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37973E11B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37974211B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E37974411B9BDB60011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37974F11B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E37975111B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E37975311B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E37975511B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37975711B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E37975911B9BDD70011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF963E8118E96CA003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF963EA118E96CA003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF963ED118E96CF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.xcdatamodel; path = "___PROJECTNAMEASIDENTIFIER___.xcdatamodel"; sourceTree = ""; }; - 28D801B30F44B63D00FB423F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; sourceTree = ""; }; - EB383C0410BBF8A40000B2D2 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = SOURCE_ROOT; }; - EB383C0510BBF8A40000B2D2 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = SOURCE_ROOT; }; - EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - EB383D1010BBFC630000B2D2 /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, - 28D801B40F44B63D00FB423F /* CoreData.framework in Frameworks */, - EB383C1410BBF8C70000B2D2 /* QuartzCore.framework in Frameworks */, - 6EF963EC118E96CC003902E7 /* libThree20.a in Frameworks */, - 6E37974911B9BDCB0011C497 /* libThree20Core.a in Frameworks */, - 6E37974A11B9BDCB0011C497 /* libThree20Network.a in Frameworks */, - 6E37974B11B9BDCC0011C497 /* libThree20Style.a in Frameworks */, - 6E37974C11B9BDCC0011C497 /* libThree20UI.a in Frameworks */, - 6E37974D11B9BDCC0011C497 /* libThree20UICommon.a in Frameworks */, - 6E37974E11B9BDCD0011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - EB383C0410BBF8A40000B2D2 /* AppDelegate.h */, - EB383C0510BBF8A40000B2D2 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 6EF963BC118E96B7003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - EB383D1010BBFC630000B2D2 /* Three20.bundle */, - 28C3AD890F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765A40DF7441C002DB57D /* CoreGraphics.framework */, - 28D801B30F44B63D00FB423F /* CoreData.framework */, - EB383C1310BBF8C70000B2D2 /* QuartzCore.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37971111B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37972511B9BDB60011C497 /* libThree20Core.a */, - 6E37972711B9BDB60011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971411B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37972B11B9BDB60011C497 /* libThree20Network.a */, - 6E37972D11B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971711B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973111B9BDB60011C497 /* libThree20Style.a */, - 6E37973311B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971A11B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973711B9BDB60011C497 /* libThree20UICommon.a */, - 6E37973911B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37971D11B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */, - 6E37973F11B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37972011B9BDB60011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37974311B9BDB60011C497 /* libThree20UI.a */, - 6E37974511B9BDB60011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37974711B9BDB80011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */, - 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */, - 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */, - 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */, - 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */, - 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */, - 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E37974811B9BDC10011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF963BC118E96B7003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E37974711B9BDB80011C497 /* Three20 */, - 6E37974811B9BDC10011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF963BE118E96C9003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF963E9118E96CA003902E7 /* libThree20.a */, - 6EF963EB118E96CA003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF963EE118E96CF003902E7 /* PBXTargetDependency */, - 6E37975011B9BDD70011C497 /* PBXTargetDependency */, - 6E37975211B9BDD70011C497 /* PBXTargetDependency */, - 6E37975411B9BDD70011C497 /* PBXTargetDependency */, - 6E37975611B9BDD70011C497 /* PBXTargetDependency */, - 6E37975811B9BDD70011C497 /* PBXTargetDependency */, - 6E37975A11B9BDD70011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF963BE118E96C9003902E7 /* Products */; - ProjectRef = 6EF963BD118E96C9003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37971111B9BDB60011C497 /* Products */; - ProjectRef = 6E37971011B9BDB60011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37971411B9BDB60011C497 /* Products */; - ProjectRef = 6E37971311B9BDB60011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37971711B9BDB60011C497 /* Products */; - ProjectRef = 6E37971611B9BDB60011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37972011B9BDB60011C497 /* Products */; - ProjectRef = 6E37971F11B9BDB60011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37971A11B9BDB60011C497 /* Products */; - ProjectRef = 6E37971911B9BDB60011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37971D11B9BDB60011C497 /* Products */; - ProjectRef = 6E37971C11B9BDB60011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E37972511B9BDB60011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37972411B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972711B9BDB60011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37972611B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972B11B9BDB60011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37972A11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37972D11B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37972C11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973111B9BDB60011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E37973011B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973311B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973211B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973711B9BDB60011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E37973611B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973911B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973811B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973D11B9BDB60011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E37973C11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37973F11B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37973E11B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37974311B9BDB60011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E37974211B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37974511B9BDB60011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E37974411B9BDB60011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF963E9118E96CA003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF963E8118E96CA003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF963EB118E96CA003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF963EA118E96CA003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - EB383D1110BBFC630000B2D2 /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 28C3AD8A0F43EF2300507BA6 /* ___PROJECTNAMEASIDENTIFIER___.xcdatamodel in Sources */, - EB383C0610BBF8A40000B2D2 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E37975011B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E37974F11B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975211B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E37975111B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975411B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E37975311B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975611B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E37975511B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975811B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E37975711B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6E37975A11B9BDD70011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E37975911B9BDD70011C497 /* PBXContainerItemProxy */; - }; - 6EF963EE118E96CF003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF963ED118E96CF003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_PREPROCESSOR_DEFINITIONS = DEBUG; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.5/Simple Application/Simple Core Data Application/main.m b/templates/projects3.2.5/Simple Application/Simple Core Data Application/main.m deleted file mode 100644 index 9387467159..0000000000 --- a/templates/projects3.2.5/Simple Application/Simple Core Data Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/projects3.2.5/Simple Application/TemplateChooser.plist b/templates/projects3.2.5/Simple Application/TemplateChooser.plist deleted file mode 100644 index 09bf9f451d..0000000000 --- a/templates/projects3.2.5/Simple Application/TemplateChooser.plist +++ /dev/null @@ -1,12 +0,0 @@ -{ - Checkboxes = ( - { - Key = CoreData; - Title = "Use Core Data for storage"; - }, - ); - TemplateSelection = { - "" = "Simple Application"; - CoreData = "Simple Core Data Application"; - }; -} diff --git a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h b/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h deleted file mode 100644 index 8694f8e28b..0000000000 --- a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.h -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@interface AppDelegate : NSObject { -} - -@end - diff --git a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m b/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m deleted file mode 100644 index 7e3c63c5f5..0000000000 --- a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/Classes/AppDelegate.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// ___PROJECTNAMEASIDENTIFIER___AppDelegate.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation AppDelegate - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidFinishLaunching:(UIApplication *)application { - TTNavigator* navigator = [TTNavigator navigator]; - navigator.persistenceMode = TTNavigatorPersistenceModeAll; - - TTURLMap* map = navigator.URLMap; - - [map from:@"*" toViewController:[TTWebController class]]; - - if (![navigator restoreViewControllers]) { - [navigator openURLAction:[TTURLAction actionWithURLPath:@"http://three20.info"]]; - } -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)navigator:(TTNavigator*)navigator shouldOpenURL:(NSURL*)URL { - return YES; -} - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL { - [[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]]; - return YES; -} - - -@end diff --git a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist b/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist deleted file mode 100644 index 3d1e7e15e9..0000000000 --- a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER___-Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch b/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch deleted file mode 100644 index 9556e4be43..0000000000 --- a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAMEASIDENTIFIER____Prefix.pch +++ /dev/null @@ -1,15 +0,0 @@ -// -// Prefix header for all source files of the '___PROJECTNAME___' target in the '___PROJECTNAME___' project -// -#import - -#ifndef __IPHONE_3_2 -#warning "This project uses features only available in iPhone SDK 3.2 and later." -#endif - - -#ifdef __OBJC__ - #import - #import - #import "Three20/Three20.h" -#endif diff --git a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns b/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns deleted file mode 100644 index d80230f57f..0000000000 Binary files a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateIcon.icns and /dev/null differ diff --git a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist b/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist deleted file mode 100644 index 60b4ce1ffb..0000000000 --- a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/TemplateInfo.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Description - This template provides a starting point for an iPad application using the three20 framework. It provides an application delegate and a basic TTNavigator. - - diff --git a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj b/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj deleted file mode 100755 index 4efaebb7ea..0000000000 --- a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/___PROJECTNAME___.xcodeproj/project.pbxproj +++ /dev/null @@ -1,706 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */; }; - 6E3175FB1126577100F4DDEC /* Three20.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6E3175FA1126577100F4DDEC /* Three20.bundle */; }; - 6E3176191126579100F4DDEC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3176181126579100F4DDEC /* QuartzCore.framework */; }; - 6E3797BA11B9BE030011C497 /* libThree20Core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37979911B9BE010011C497 /* libThree20Core.a */; }; - 6E3797BB11B9BE030011C497 /* libThree20Network.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E37979F11B9BE010011C497 /* libThree20Network.a */; }; - 6E3797BC11B9BE040011C497 /* libThree20Style.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797A511B9BE010011C497 /* libThree20Style.a */; }; - 6E3797BD11B9BE040011C497 /* libThree20UI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797B711B9BE010011C497 /* libThree20UI.a */; }; - 6E3797BE11B9BE050011C497 /* libThree20UICommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */; }; - 6E3797BF11B9BE050011C497 /* libThree20UINavigator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */; }; - 6EF96366118E9604003902E7 /* libThree20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EF96363118E95FF003902E7 /* libThree20.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6E37979811B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E37979A11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E37979E11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3797A011B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797A411B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3797A611B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797AA11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3797AC11B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797B011B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3797B211B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797B611B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6E3797B811B9BE010011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6E3797CB11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UINavigator; - }; - 6E3797CD11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UICommon; - }; - 6E3797CF11B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Style; - }; - 6E3797D111B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Network; - }; - 6E3797D311B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20Core; - }; - 6E3797D511B9BE1C0011C497 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20UI; - }; - 6EF96362118E95FF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BEF31F3A0F352DF5000DE5D2; - remoteInfo = Three20; - }; - 6EF96364118E95FF003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB9E6C6210B6A8F800DE563C; - remoteInfo = UnitTests; - }; - 6EF96367118E9608003902E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BEF31F390F352DF5000DE5D2; - remoteInfo = Three20; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "___PROJECTNAME___.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 28A0AAE50D9B0CCF005BE974 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; sourceTree = ""; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6E3175FA1126577100F4DDEC /* Three20.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Three20.bundle; path = ../three20/src/Three20.bundle; sourceTree = SOURCE_ROOT; }; - 6E3176181126579100F4DDEC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Core.xcodeproj; path = ../three20/src/Three20Core/Three20Core.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Network.xcodeproj; path = ../three20/src/Three20Network/Three20Network.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20Style.xcodeproj; path = ../three20/src/Three20Style/Three20Style.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UICommon.xcodeproj; path = ../three20/src/Three20UICommon/Three20UICommon.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UINavigator.xcodeproj; path = ../three20/src/Three20UINavigator/Three20UINavigator.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20UI.xcodeproj; path = ../three20/src/Three20UI/Three20UI.xcodeproj; sourceTree = SOURCE_ROOT; }; - 6EF96337118E95FE003902E7 /* Three20.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Three20.xcodeproj; path = ../three20/src/Three20/Three20.xcodeproj; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 2892E4100DC94CBA00A64D0F /* CoreGraphics.framework in Frameworks */, - 6E3176191126579100F4DDEC /* QuartzCore.framework in Frameworks */, - 6EF96366118E9604003902E7 /* libThree20.a in Frameworks */, - 6E3797BA11B9BE030011C497 /* libThree20Core.a in Frameworks */, - 6E3797BB11B9BE030011C497 /* libThree20Network.a in Frameworks */, - 6E3797BC11B9BE040011C497 /* libThree20Style.a in Frameworks */, - 6E3797BD11B9BE040011C497 /* libThree20UI.a in Frameworks */, - 6E3797BE11B9BE050011C497 /* libThree20UICommon.a in Frameworks */, - 6E3797BF11B9BE050011C497 /* libThree20UINavigator.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - path = Classes; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources-iPad */, - 6EF9630E118E95E6003902E7 /* Dependencies */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - 6E3176181126579100F4DDEC /* QuartzCore.framework */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 28A0AAE50D9B0CCF005BE974 /* ___PROJECTNAMEASIDENTIFIER____Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources-iPad */ = { - isa = PBXGroup; - children = ( - 6E3175FA1126577100F4DDEC /* Three20.bundle */, - 8D1107310486CEB800E47090 /* ___PROJECTNAMEASIDENTIFIER___-Info.plist */, - ); - name = "Resources-iPad"; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 2892E40F0DC94CBA00A64D0F /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6E37978511B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37979911B9BE010011C497 /* libThree20Core.a */, - 6E37979B11B9BE010011C497 /* CoreUnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978811B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E37979F11B9BE010011C497 /* libThree20Network.a */, - 6E3797A111B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978B11B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797A511B9BE010011C497 /* libThree20Style.a */, - 6E3797A711B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37978E11B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */, - 6E3797AD11B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37979111B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */, - 6E3797B311B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E37979411B9BE010011C497 /* Products */ = { - isa = PBXGroup; - children = ( - 6E3797B711B9BE010011C497 /* libThree20UI.a */, - 6E3797B911B9BE010011C497 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; - 6E3797C111B9BE070011C497 /* Three20 */ = { - isa = PBXGroup; - children = ( - 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */, - 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */, - 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */, - 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */, - 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */, - 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */, - 6EF96337118E95FE003902E7 /* Three20.xcodeproj */, - ); - name = Three20; - sourceTree = ""; - }; - 6E3797C211B9BE0D0011C497 /* Three20 Extensions */ = { - isa = PBXGroup; - children = ( - ); - name = "Three20 Extensions"; - sourceTree = ""; - }; - 6EF9630E118E95E6003902E7 /* Dependencies */ = { - isa = PBXGroup; - children = ( - 6E3797C111B9BE070011C497 /* Three20 */, - 6E3797C211B9BE0D0011C497 /* Three20 Extensions */, - ); - name = Dependencies; - sourceTree = ""; - }; - 6EF96338118E95FE003902E7 /* Products */ = { - isa = PBXGroup; - children = ( - 6EF96363118E95FF003902E7 /* libThree20.a */, - 6EF96365118E95FF003902E7 /* UnitTests.octest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */; - buildPhases = ( - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 6EF96368118E9608003902E7 /* PBXTargetDependency */, - 6E3797CC11B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797CE11B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D011B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D211B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D411B9BE1C0011C497 /* PBXTargetDependency */, - 6E3797D611B9BE1C0011C497 /* PBXTargetDependency */, - ); - name = "___PROJECTNAME___"; - productName = "___PROJECTNAME___"; - productReference = 1D6058910D05DD3D006BFB54 /* ___PROJECTNAME___.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - en, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 6EF96338118E95FE003902E7 /* Products */; - ProjectRef = 6EF96337118E95FE003902E7 /* Three20.xcodeproj */; - }, - { - ProductGroup = 6E37978511B9BE010011C497 /* Products */; - ProjectRef = 6E37978411B9BE010011C497 /* Three20Core.xcodeproj */; - }, - { - ProductGroup = 6E37978811B9BE010011C497 /* Products */; - ProjectRef = 6E37978711B9BE010011C497 /* Three20Network.xcodeproj */; - }, - { - ProductGroup = 6E37978B11B9BE010011C497 /* Products */; - ProjectRef = 6E37978A11B9BE010011C497 /* Three20Style.xcodeproj */; - }, - { - ProductGroup = 6E37979411B9BE010011C497 /* Products */; - ProjectRef = 6E37979311B9BE010011C497 /* Three20UI.xcodeproj */; - }, - { - ProductGroup = 6E37978E11B9BE010011C497 /* Products */; - ProjectRef = 6E37978D11B9BE010011C497 /* Three20UICommon.xcodeproj */; - }, - { - ProductGroup = 6E37979111B9BE010011C497 /* Products */; - ProjectRef = 6E37979011B9BE010011C497 /* Three20UINavigator.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* ___PROJECTNAME___ */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 6E37979911B9BE010011C497 /* libThree20Core.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Core.a; - remoteRef = 6E37979811B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37979B11B9BE010011C497 /* CoreUnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = CoreUnitTests.octest; - remoteRef = 6E37979A11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E37979F11B9BE010011C497 /* libThree20Network.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Network.a; - remoteRef = 6E37979E11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A111B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797A011B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A511B9BE010011C497 /* libThree20Style.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20Style.a; - remoteRef = 6E3797A411B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797A711B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797A611B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797AB11B9BE010011C497 /* libThree20UICommon.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UICommon.a; - remoteRef = 6E3797AA11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797AD11B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797AC11B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B111B9BE010011C497 /* libThree20UINavigator.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UINavigator.a; - remoteRef = 6E3797B011B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B311B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797B211B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B711B9BE010011C497 /* libThree20UI.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20UI.a; - remoteRef = 6E3797B611B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E3797B911B9BE010011C497 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6E3797B811B9BE010011C497 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF96363118E95FF003902E7 /* libThree20.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libThree20.a; - remoteRef = 6EF96362118E95FF003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF96365118E95FF003902E7 /* UnitTests.octest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = UnitTests.octest; - remoteRef = 6EF96364118E95FF003902E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E3175FB1126577100F4DDEC /* Three20.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6E3797CC11B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UINavigator; - targetProxy = 6E3797CB11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797CE11B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UICommon; - targetProxy = 6E3797CD11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D011B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Style; - targetProxy = 6E3797CF11B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D211B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Network; - targetProxy = 6E3797D111B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D411B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20Core; - targetProxy = 6E3797D311B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6E3797D611B9BE1C0011C497 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20UI; - targetProxy = 6E3797D511B9BE1C0011C497 /* PBXContainerItemProxy */; - }; - 6EF96368118E9608003902E7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Three20; - targetProxy = 6EF96367118E9608003902E7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "___PROJECTNAMEASIDENTIFIER____Prefix.pch"; - HEADER_SEARCH_PATHS = ../three20/Build/Products/three20; - INFOPLIST_FILE = "___PROJECTNAMEASIDENTIFIER___-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; - OTHER_LDFLAGS = ( - "-all_load", - "-ObjC", - ); - PRODUCT_NAME = "___PROJECTNAME___"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - TARGETED_DEVICE_FAMILY = 2; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PREBINDING = NO; - TARGETED_DEVICE_FAMILY = 2; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "___PROJECTNAME___" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/main.m b/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/main.m deleted file mode 100644 index 8023e88258..0000000000 --- a/templates/projects3.2.5/Simple iPad Application/Simple iPad Application/main.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// main.m -// ___PROJECTNAME___ -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -int main(int argc, char *argv[]) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - [pool release]; - return retVal; -} diff --git a/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/TemplateInfo.plist b/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/TemplateInfo.plist deleted file mode 100644 index 7b2b2e9bd8..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/TemplateInfo.plist +++ /dev/null @@ -1,6 +0,0 @@ -{ - MainTemplateFile = "class.m"; - CounterpartTemplateFile = "class.h"; - Description = "An Objective-C class which is a subclass of TTDefaultStyleSheet."; -} - diff --git a/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/class.h b/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/class.h deleted file mode 100644 index 44df66bb8a..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/class.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// «FILENAME» -// «PROJECTNAME» -// -// Created by «FULLUSERNAME» on «DATE». -// Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved. -// - -@interface «FILEBASENAMEASIDENTIFIER» : TTDefaultStyleSheet { - -} - -@end diff --git a/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/class.m b/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/class.m deleted file mode 100644 index 0d5faa6553..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTDefaultStyleSheet subclass.pbfiletemplate/class.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// «FILENAME» -// «PROJECTNAME» -// -// Created by «FULLUSERNAME» on «DATE». -// Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved. -// - -«OPTIONALHEADERIMPORTLINE» - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation «FILEBASENAMEASIDENTIFIER» - -@end - diff --git a/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/TemplateInfo.plist b/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/TemplateInfo.plist deleted file mode 100644 index dc08925199..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/TemplateInfo.plist +++ /dev/null @@ -1,6 +0,0 @@ -{ - MainTemplateFile = "class.m"; - CounterpartTemplateFile = "class.h"; - Description = "An Objective-C class which is a subclass of TTTableViewController and implements a simple internal data source."; -} - diff --git a/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/class.h b/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/class.h deleted file mode 100644 index a99f0b322f..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/class.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// «FILENAME» -// «PROJECTNAME» -// -// Created by «FULLUSERNAME» on «DATE». -// Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved. -// - -@interface «FILEBASENAMEASIDENTIFIER» : TTTableViewController { - -} - -@end diff --git a/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/class.m b/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/class.m deleted file mode 100644 index 45db9c20c7..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTTableViewController subclass.pbfiletemplate/class.m +++ /dev/null @@ -1,33 +0,0 @@ -// -// «FILENAME» -// «PROJECTNAME» -// -// Created by «FULLUSERNAME» on «DATE». -// Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved. -// - -«OPTIONALHEADERIMPORTLINE» - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation «FILEBASENAMEASIDENTIFIER» - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { - //self.variableHeightRows = YES; - - self.dataSource = - [TTListDataSource dataSourceWithObjects: - [TTTableTextItem itemWithText:@"Table cell item"], - nil]; - } - - return self; -} - - -@end - diff --git a/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/TemplateInfo.plist b/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/TemplateInfo.plist deleted file mode 100644 index 8d7ef50b34..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/TemplateInfo.plist +++ /dev/null @@ -1,6 +0,0 @@ -{ - MainTemplateFile = "class.m"; - CounterpartTemplateFile = "class.h"; - Description = "An Objective-C class which is a subclass of TTViewController."; -} - diff --git a/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/class.h b/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/class.h deleted file mode 100644 index d5438b9f39..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/class.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// «FILENAME» -// «PROJECTNAME» -// -// Created by «FULLUSERNAME» on «DATE». -// Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved. -// - -@interface «FILEBASENAMEASIDENTIFIER» : TTViewController { - -} - -@end diff --git a/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/class.m b/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/class.m deleted file mode 100644 index 0d5faa6553..0000000000 --- a/templates/source/Three20 Class/Three20 class/TTViewController subclass.pbfiletemplate/class.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// «FILENAME» -// «PROJECTNAME» -// -// Created by «FULLUSERNAME» on «DATE». -// Copyright «YEAR» «ORGANIZATIONNAME». All rights reserved. -// - -«OPTIONALHEADERIMPORTLINE» - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation «FILEBASENAMEASIDENTIFIER» - -@end - diff --git a/templates/source/Three20 Class/Three20 class/TemplateChooser.plist b/templates/source/Three20 Class/Three20 class/TemplateChooser.plist deleted file mode 100644 index 56a202fa73..0000000000 --- a/templates/source/Three20 Class/Three20 class/TemplateChooser.plist +++ /dev/null @@ -1,41 +0,0 @@ - - - - - OptionsLabel - Subclass of - PopupMenu - - - Key - TTViewC - Title - TTViewController - - - Key - TTTableViewC - Title - TTTableViewController - - - Key - TTDefaultS - Title - TTDefaultStyleSheet - - - TemplateSelection - - - TTViewController subclass - TTViewC - TTViewController subclass - TTTableViewC - TTTableViewController subclass - TTDefaultS - TTDefaultStyleSheet subclass - - - - diff --git a/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/TemplateInfo.plist b/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/TemplateInfo.plist deleted file mode 100644 index f5de47009f..0000000000 --- a/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/TemplateInfo.plist +++ /dev/null @@ -1,6 +0,0 @@ -{ - MainTemplateFile = "class.m"; - CounterpartTemplateFile = "class.h"; - Description = "An Objective-C class in the Three20 library directory structure."; -} - diff --git a/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/class.h b/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/class.h deleted file mode 100644 index 0a52dbc4a7..0000000000 --- a/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/class.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface «FILEBASENAMEASIDENTIFIER» : NSObject { - -} - -@end diff --git a/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/class.m b/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/class.m deleted file mode 100644 index 3ce51da0d3..0000000000 --- a/templates/source/Three20 Library Class/Three20 class/TTObject.pbfiletemplate/class.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright 2009-2010 Facebook -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Three20/«FILEBASENAMEASIDENTIFIER».h" - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////////////////////////// -@implementation «FILEBASENAMEASIDENTIFIER» - -@end - diff --git a/templates/source/Three20 Library Class/Three20 class/TemplateChooser.plist b/templates/source/Three20 Library Class/Three20 class/TemplateChooser.plist deleted file mode 100644 index 0decb1f028..0000000000 --- a/templates/source/Three20 Library Class/Three20 class/TemplateChooser.plist +++ /dev/null @@ -1,25 +0,0 @@ - - - - - OptionsLabel - Subclass of - PopupMenu - - - Key - TTObject - Title - TTObject - - - TemplateSelection - - - TTObject - TTObject - TTObject - - - -