Skip to content
Browse files

Removed spaces in folder paths. This update solves some issues with h…

…eader paths not being recognized by Xcode.
  • Loading branch information...
1 parent dc9fc23 commit 4a4045684a394fd74e705beddd64f6fd1322d8c6 @macteo macteo committed Jul 22, 2011
Showing with 8,786 additions and 11,988 deletions.
  1. BIN Bundle/FPKKioskBundle.bundle/Info.plist
  2. BIN Bundle/FPKKioskBundle.bundle/Kiosk_ipad.nib
  3. BIN Bundle/FPKKioskBundle.bundle/Kiosk_phone.nib
  4. BIN Bundle/FPKReaderBundle.bundle/AudioViewController.nib
  5. BIN Bundle/FPKReaderBundle.bundle/BookmarkView.nib
  6. BIN Bundle/FPKReaderBundle.bundle/Info.plist
  7. BIN Bundle/FPKReaderBundle.bundle/OutlineView.nib
  8. BIN Bundle/FPKReaderBundle.bundle/SearchView2_pad.nib
  9. BIN Bundle/FPKReaderBundle.bundle/SearchView2_phone.nib
  10. BIN Bundle/FPKReaderBundle.bundle/TextDisplayView.nib
  11. BIN Bundle/FPKReaderBundle.bundle/WebBrowser.nib
  12. +266 −0 Classes/KioskApp/Controllers/Kiosk_ipad.xib
  13. +497 −0 Classes/KioskApp/Controllers/Kiosk_phone.xib
  14. +69 −0 Classes/KioskApp/Controllers/MFHomeListPdf.h
  15. +663 −0 Classes/KioskApp/Controllers/MFHomeListPdf.m
  16. +411 −0 Classes/KioskApp/Controllers/MainWindow_Kiosk.xib
  17. +49 −0 Classes/KioskApp/Controllers/MenuViewController_Kiosk.h
  18. +278 −0 Classes/KioskApp/Controllers/MenuViewController_Kiosk.m
  19. +19 −0 Classes/KioskApp/Controllers/XMLParser.h
  20. +138 −0 Classes/KioskApp/Controllers/XMLParser.m
  21. +19 −0 Classes/KioskApp/FastPDFKit_KioskAppDelegate.h
  22. +104 −0 Classes/KioskApp/FastPDFKit_KioskAppDelegate.m
  23. BIN Classes/KioskApp/Images/backThumb.png
  24. BIN Classes/KioskApp/Images/backThumb_iphone.png
  25. BIN Classes/KioskApp/Images/backThumb_iphone@2x.png
  26. BIN Classes/KioskApp/Images/download.png
  27. BIN Classes/KioskApp/Images/header.png
  28. BIN Classes/KioskApp/Images/header_iphone.png
  29. BIN Classes/KioskApp/Images/header_iphone@2x.png
  30. BIN Classes/KioskApp/Images/remove.png
  31. BIN Classes/KioskApp/Images/resume.png
  32. BIN Classes/KioskApp/Images/view.png
  33. 0 Classes/Reader/{Text Search → TextSearch}/MiniSearchView.h
  34. 0 Classes/Reader/{Text Search → TextSearch}/MiniSearchView.m
  35. 0 Classes/Reader/{Text Search → TextSearch}/MiniSearchViewControllerDelegate.h
  36. 0 Classes/Reader/{Text Search → TextSearch}/NotificationFactory.h
  37. 0 Classes/Reader/{Text Search → TextSearch}/NotificationFactory.m
  38. 0 Classes/Reader/{Text Search → TextSearch}/SearchManager.h
  39. 0 Classes/Reader/{Text Search → TextSearch}/SearchManager.m
  40. 0 Classes/Reader/{Text Search → TextSearch}/SearchResultCellView.h
  41. 0 Classes/Reader/{Text Search → TextSearch}/SearchResultCellView.m
  42. 0 Classes/Reader/{Text Search → TextSearch}/SearchResultDataSource.h
  43. 0 Classes/Reader/{Text Search → TextSearch}/SearchResultView.h
  44. 0 Classes/Reader/{Text Search → TextSearch}/SearchResultView.m
  45. 0 Classes/Reader/{Text Search → TextSearch}/SearchView2_pad.xib
  46. 0 Classes/Reader/{Text Search → TextSearch}/SearchView2_phone.xib
  47. 0 Classes/Reader/{Text Search → TextSearch}/SearchViewController.h
  48. 0 Classes/Reader/{Text Search → TextSearch}/SearchViewController.m
  49. 0 Classes/Reader/{Text Search → TextSearch}/SearchViewControllerDelegate.h
  50. 0 Classes/Reader/{Text Search → TextSearch}/TextDisplayView.xib
  51. 0 Classes/Reader/{Text Search → TextSearch}/TextDisplayViewController.h
  52. 0 Classes/Reader/{Text Search → TextSearch}/TextDisplayViewController.m
  53. 0 Classes/Reader/{Text Search → TextSearch}/TextDisplayViewControllerDelegate.h
  54. 0 Classes/Reader/{Text Search → TextSearch}/TextSearchOperation.h
  55. 0 Classes/Reader/{Text Search → TextSearch}/TextSearchOperation.m
  56. 0 Classes/Reader/{Thumbnail Slider → ThumbnailSlider}/MFHorizontalSlider.h
  57. 0 Classes/Reader/{Thumbnail Slider → ThumbnailSlider}/MFHorizontalSlider.m
  58. 0 Classes/Reader/{Thumbnail Slider → ThumbnailSlider}/MFSliderDetail.h
  59. 0 Classes/Reader/{Thumbnail Slider → ThumbnailSlider}/MFSliderDetail.m
  60. 0 Classes/{Simple App → SimpleApp}/Controllers/BasicLauncherController.h
  61. 0 Classes/{Simple App → SimpleApp}/Controllers/BasicLauncherController.m
  62. 0 Classes/{Simple App → SimpleApp}/Controllers/DocumentViewController.h
  63. 0 Classes/{Simple App → SimpleApp}/Controllers/DocumentViewController.m
  64. 0 Classes/{Simple App → SimpleApp}/Controllers/MainWindow.xib
  65. 0 Classes/{Simple App → SimpleApp}/Controllers/MenuViewController.h
  66. 0 Classes/{Simple App → SimpleApp}/Controllers/MenuViewController.m
  67. 0 Classes/{Simple App → SimpleApp}/Controllers/MenuView_pad.xib
  68. 0 Classes/{Simple App → SimpleApp}/Controllers/MenuView_phone.xib
  69. 0 Classes/{Simple App → SimpleApp}/FastPDFKit_SampleAppDelegate.h
  70. 0 Classes/{Simple App → SimpleApp}/FastPDFKit_SampleAppDelegate.m
  71. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIAuthenticationDialog.h
  72. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIAuthenticationDialog.m
  73. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASICacheDelegate.h
  74. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIDownloadCache.h
  75. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIDownloadCache.m
  76. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIFormDataRequest.h
  77. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIFormDataRequest.m
  78. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIHTTPRequest.h
  79. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIHTTPRequest.m
  80. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIHTTPRequestConfig.h
  81. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIHTTPRequestDelegate.h
  82. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIInputStream.h
  83. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIInputStream.m
  84. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASINSStringAdditions.h
  85. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASINSStringAdditions.m
  86. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASINetworkQueue.h
  87. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASINetworkQueue.m
  88. 0 Classes/{Third parties → ThirdParties}/ASIHTTP/ASIProgressDelegate.h
  89. 0 Classes/{Third parties → ThirdParties}/Reachability.h
  90. 0 Classes/{Third parties → ThirdParties}/Reachability.m
  91. 0 Classes/{Third parties → ThirdParties}/ZipArchive.h
  92. 0 Classes/{Third parties → ThirdParties}/libziparchive.a
  93. 0 Classes/{Third parties → ThirdParties}/minizip/crypt.h
  94. 0 Classes/{Third parties → ThirdParties}/minizip/ioapi.c
  95. 0 Classes/{Third parties → ThirdParties}/minizip/ioapi.h
  96. 0 Classes/{Third parties → ThirdParties}/minizip/mztools.c
  97. 0 Classes/{Third parties → ThirdParties}/minizip/mztools.h
  98. 0 Classes/{Third parties → ThirdParties}/minizip/unzip.c
  99. 0 Classes/{Third parties → ThirdParties}/minizip/unzip.h
  100. 0 Classes/{Third parties → ThirdParties}/minizip/zip.c
  101. 0 Classes/{Third parties → ThirdParties}/minizip/zip.h
  102. 0 {FastPdfKit Library → FPKCore}/FPKOverlayViewDataSource.h
  103. 0 {FastPdfKit Library → FPKCore}/Identity-H.cidf
  104. 0 {FastPdfKit Library → FPKCore}/Identity-V.cidf
  105. 0 {FastPdfKit Library → FPKCore}/MFAudioPlayerViewProtocol.h
  106. 0 {FastPdfKit Library → FPKCore}/MFAudioProvider.h
  107. 0 {FastPdfKit Library → FPKCore}/MFDocumentManager.h
  108. 0 {FastPdfKit Library → FPKCore}/MFDocumentOverlayDataSource.h
  109. 0 {FastPdfKit Library → FPKCore}/MFDocumentViewController.h
  110. 0 {FastPdfKit Library → FPKCore}/MFDocumentViewControllerDelegate.h
  111. 0 {FastPdfKit Library → FPKCore}/MFOverlayDrawable.h
  112. 0 {FastPdfKit Library → FPKCore}/MFOverlayTouchable.h
  113. 0 {FastPdfKit Library → FPKCore}/MFPDFOutlineEntry.h
  114. 0 {FastPdfKit Library → FPKCore}/MFTextItem.h
  115. 0 {FastPdfKit Library → FPKCore}/Stuff.h
  116. 0 {FastPdfKit Library → FPKCore}/libFastPDFKit.a
  117. 0 {FastPdfKit Library → FPKCore}/mfprofile.h
  118. +67 −50 FastPdfKit.xcodeproj/project.pbxproj
  119. +6,206 −11,938 ...PdfKit.xcodeproj/project.xcworkspace/xcuserdata/matteo.xcuserdatad/UserInterfaceState.xcuserstate
  120. 0 {Other Sources → OtherSources}/FastPDFKitKiosk-Prefix.pch
  121. 0 {Other Sources → OtherSources}/FastPDFKitReader-Prefix.pch
  122. 0 Other Sources/FastPDFKit_Sample-Prefix.pch → OtherSources/FastPDFKitSimple-Prefix.pch
  123. 0 {Other Sources → OtherSources}/FastPdfKit.xcconfig
  124. 0 {Other Sources → OtherSources}/KioskBundle-Prefix.pch
  125. 0 {Other Sources → OtherSources}/SimpleBundle-Prefix.pch
  126. 0 {Other Sources → OtherSources}/Snippets.strings
  127. 0 {Other Sources → OtherSources}/main.m
View
BIN Bundle/FPKKioskBundle.bundle/Info.plist
Binary file not shown.
View
BIN Bundle/FPKKioskBundle.bundle/Kiosk_ipad.nib
Binary file not shown.
View
BIN Bundle/FPKKioskBundle.bundle/Kiosk_phone.nib
Binary file not shown.
View
BIN Bundle/FPKReaderBundle.bundle/AudioViewController.nib
Binary file not shown.
View
BIN Bundle/FPKReaderBundle.bundle/BookmarkView.nib
Binary file not shown.
View
BIN Bundle/FPKReaderBundle.bundle/Info.plist
Binary file not shown.
View
BIN Bundle/FPKReaderBundle.bundle/OutlineView.nib
Binary file not shown.
View
BIN Bundle/FPKReaderBundle.bundle/SearchView2_pad.nib
Binary file not shown.
View
BIN Bundle/FPKReaderBundle.bundle/SearchView2_phone.nib
Binary file not shown.
View
BIN Bundle/FPKReaderBundle.bundle/TextDisplayView.nib
Binary file not shown.
View
BIN Bundle/FPKReaderBundle.bundle/WebBrowser.nib
Binary file not shown.
View
266 Classes/KioskApp/Controllers/Kiosk_ipad.xib
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10J869</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1306</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">301</string>
+ </object>
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>IBProxyObject</string>
+ <string>IBUIView</string>
+ <string>IBUIImageView</string>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ </object>
+ <object class="IBProxyObject" id="975951072">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ </object>
+ <object class="IBUIView" id="191373211">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIImageView" id="898200445">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{768, 128}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSWindow"/>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">header.png</string>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrame">{{0, 20}, {768, 1004}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
+ <int key="IBUIStatusBarStyle">2</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBIPadFramework</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="191373211"/>
+ </object>
+ <int key="connectionID">10</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="191373211"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="898200445"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="975951072"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">14</int>
+ <reference key="object" ref="898200445"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBPluginDependency</string>
+ <string>14.IBPluginDependency</string>
+ <string>14.IBViewBoundsToFrameTransform</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>MenuViewController</string>
+ <string>UIResponder</string>
+ <string>{{334, 68}, {768, 1024}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABCzgAAwvwAAA</bytes>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">14</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">MenuViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>actionOpenEncryptedDocument:</string>
+ <string>actionOpenPlainDocument:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>actionOpenEncryptedDocument:</string>
+ <string>actionOpenPlainDocument:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">actionOpenEncryptedDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">actionOpenPlainDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>manualButton</string>
+ <string>manualTextView</string>
+ <string>referenceButton</string>
+ <string>referenceTextView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIButton</string>
+ <string>UITextView</string>
+ <string>UIButton</string>
+ <string>UITextView</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>manualButton</string>
+ <string>manualTextView</string>
+ <string>referenceButton</string>
+ <string>referenceTextView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">manualButton</string>
+ <string key="candidateClassName">UIButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">manualTextView</string>
+ <string key="candidateClassName">UITextView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">referenceButton</string>
+ <string key="candidateClassName">UIButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">referenceTextView</string>
+ <string key="candidateClassName">UITextView</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/MenuViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1056" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NS.key.0">header.png</string>
+ <string key="NS.object.0">{768, 141}</string>
+ </object>
+ <string key="IBCocoaTouchPluginVersion">301</string>
+ </data>
+</archive>
View
497 Classes/KioskApp/Controllers/Kiosk_phone.xib
@@ -0,0 +1,497 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10J567</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">462.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">132</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="1"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="975951072">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="191373211">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIImageView" id="798790673">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 59}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSCustomResource" key="IBUIImage">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">header_iphone.png</string>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 460}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="191373211"/>
+ </object>
+ <int key="connectionID">15</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="191373211"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="798790673"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="975951072"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">18</int>
+ <reference key="object" ref="798790673"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBPluginDependency</string>
+ <string>18.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>MenuViewController</string>
+ <string>UIResponder</string>
+ <string>{{599, 174}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">18</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">MenuViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>actionOpenEncryptedDocument:</string>
+ <string>actionOpenPlainDocument:</string>
+ <string>actionOpenPlainDocumentFromNewMain:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>actionOpenEncryptedDocument:</string>
+ <string>actionOpenPlainDocument:</string>
+ <string>actionOpenPlainDocumentFromNewMain:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">actionOpenEncryptedDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">actionOpenPlainDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">actionOpenPlainDocumentFromNewMain:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>manualButton</string>
+ <string>manualTextView</string>
+ <string>referenceButton</string>
+ <string>referenceTextView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIButton</string>
+ <string>UITextView</string>
+ <string>UIButton</string>
+ <string>UITextView</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>manualButton</string>
+ <string>manualTextView</string>
+ <string>referenceButton</string>
+ <string>referenceTextView</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">manualButton</string>
+ <string key="candidateClassName">UIButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">manualTextView</string>
+ <string key="candidateClassName">UITextView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">referenceButton</string>
+ <string key="candidateClassName">UIButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">referenceTextView</string>
+ <string key="candidateClassName">UITextView</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/MenuViewController.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="474212686">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIButton</string>
+ <string key="superclassName">UIControl</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIControl</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIImageView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIImageView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="474212686"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIScrollView</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UITextView</string>
+ <string key="superclassName">UIScrollView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1056" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../FastPdfKit Sample.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NS.key.0">header_iphone.png</string>
+ <string key="NS.object.0">{320, 59}</string>
+ </object>
+ <string key="IBCocoaTouchPluginVersion">132</string>
+ </data>
+</archive>
View
69 Classes/KioskApp/Controllers/MFHomeListPdf.h
@@ -0,0 +1,69 @@
+//
+// MFHomeListPdf.h
+// RoadView
+//
+// Created by Matteo Gavagnin on 26/03/09.
+// Copyright 2009 MobFarm s.r.l.. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "ASIHTTPRequest.h"
+#import "MenuViewController_Kiosk.h"
+
+@interface MFHomeListPdf : UIViewController <UIActionSheetDelegate>{
+
+ id object;
+ NSString *thumbName;
+ CGSize size;
+ NSString *page;
+ NSString *downloadUrl;
+ NSString *titleOfPdf;
+ id delegate;
+ id dataSource;
+ UIImageView *corner;
+ BOOL temp;
+ int documentNumber;
+
+ ASIHTTPRequest *httpRequest;
+
+ BOOL pdfInDownload;
+ BOOL isPdfLink;
+ MenuViewController_Kiosk *menuViewController;
+ NSString *pdfToDownload;
+ UIButton *removeButton;
+ UIButton *openButton;
+ UIButton *openButtonFromImage;
+ UIProgressView *progressDownload;
+ UIImageView *thumbImage;
+
+ BOOL downloadPdfStopped;
+}
+
+@property (nonatomic,copy) NSString *thumbName;
+@property (nonatomic,assign) id object;
+@property (nonatomic,assign) id dataSource;
+@property (nonatomic,retain) UIImageView *corner;
+
+@property (nonatomic,copy) NSString *downloadUrl;
+@property (nonatomic) BOOL temp;
+@property (nonatomic) BOOL isPdfLink;
+@property (nonatomic) BOOL downloadPdfStopped;
+@property (nonatomic, assign) MenuViewController_Kiosk *menuViewController;
+@property (nonatomic, assign) int documentNumber;
+@property (nonatomic,copy) NSString *page;
+@property (nonatomic,copy) NSString *titleOfPdf;
+@property (nonatomic,retain ) UIButton *removeButton;
+@property (nonatomic,retain ) UIButton *openButton;
+@property (nonatomic,retain ) UIButton *openButtonFromImage;
+@property (nonatomic,retain ) UIProgressView *progressDownload;
+@property (nonatomic,retain ) UIImageView *thumbImage;
+@property (nonatomic,retain) ASIHTTPRequest * httpRequest;
+
+- (id)initWithName:(NSString *)Page andTitoloPdf:(NSString *)titoloPdf andLinkPdf:(NSString *)linkpdf andnumOfDoc:(int)numDoc andImage:(NSString *)_image andSize:(CGSize)_size;
+- (void)setSelected:(BOOL)selected;
+- (void)updateCorner;
+- (void)downloadPDF:(id)sender withUrl:(NSString *)_url andName:(NSString *)nomefilepdf;
+- (void)downloadImage:(id)sender withUrl:(NSString *)_url andName:(NSString *)nomefilepdf;
+- (BOOL)checkIfPDfLink:(NSString *)url;
+
+@end
View
663 Classes/KioskApp/Controllers/MFHomeListPdf.m
@@ -0,0 +1,663 @@
+//
+// MFHomeListPdf.m
+// RoadView
+//
+// Created by Matteo Gavagnin on 26/03/09.
+// Copyright 2009 MobFarm s.r.l.. All rights reserved.
+//
+
+#import "MFHomeListPdf.h"
+#import "MenuViewController_Kiosk.h"
+#import "ZipArchive.h"
+
+#define TITLE_DOWNLOAD @"Download"
+#define TITLE_OPEN @"Open"
+#define TITLE_REMOVE @"Remove"
+#define TITLE_RESUME @"Resume"
+
+@implementation MFHomeListPdf
+@synthesize object, temp, dataSource ,corner,documentNumber;
+@synthesize menuViewController;
+@synthesize page,titleOfPdf;
+@synthesize removeButton,openButton,openButtonFromImage;
+@synthesize progressDownload;
+// @synthesize yProgressBar,xBtnRemove,yBtnRemove,xBtnOpen,yBtnOpen,widthButton,heightButton;
+@synthesize thumbImage;
+@synthesize downloadUrl;
+@synthesize httpRequest;
+@synthesize thumbName;
+@synthesize isPdfLink;
+@synthesize downloadPdfStopped;
+// Load the view and initialize the pageNumber ivar.
+
+- (id)initWithName:(NSString *)Page andTitoloPdf:(NSString *)titlePdf andLinkPdf:(NSString *)linkpdf andnumOfDoc:(int)numDoc andImage:(NSString *)_image andSize:(CGSize)_size{
+
+ size = _size;
+ self.downloadUrl = linkpdf;
+ self.thumbName = _image;
+ self.page=Page;
+ self.titleOfPdf = titlePdf;
+
+ [self downloadImage:self withUrl:thumbName andName:Page];
+
+ documentNumber = numDoc;
+ temp = NO;
+ return self;
+}
+
+
+// Implement viewDidLoad to do additional setup after loading the view
+- (void)viewDidLoad {
+
+ UIButton * aButton = nil;
+
+ UILabel * aLabel = nil;
+ NSString * aLabelTitle = nil;
+
+ UIImageView * anImageView = nil;
+
+ UIProgressView * aProgressView = nil;
+
+ NSArray * paths = nil;
+ NSString * documentsDirectory = nil;
+ NSString * cacheDirectory = nil;
+ NSString * thumbPath = nil;
+ NSString * pdfPath = nil;
+
+ NSFileManager * fileManager = nil;
+
+ NSString * pdfPathTempForResume = nil;
+
+ BOOL fileAlreadyExists = NO;
+
+ // Calculate sizes and offsets.
+
+ CGFloat progressBarVOffset;
+ CGFloat removeButtonHOffset;
+ CGFloat removeButtonVOffset;
+ CGFloat openButtonHOffset;
+ CGFloat openButtonVOffset;
+ CGFloat buttonWidth;
+ CGFloat buttonHeight;
+
+ if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { // iPad.
+
+ progressBarVOffset=485; //set y position of the progress bar
+ removeButtonHOffset=120; // set x position of btn remove
+ removeButtonVOffset=590; //set y position of btn remove
+ openButtonHOffset=120; //set x position of btn remove
+ openButtonVOffset=530; // set y position of btn Open/Downlaod
+ buttonWidth=140; // width of the button
+ buttonHeight=44; // height of the button
+
+ } else { // iPhone.
+
+ //iphone
+ progressBarVOffset=215;
+ removeButtonHOffset=40;
+ removeButtonVOffset=215;
+ openButtonHOffset=40;
+ openButtonVOffset=190;
+ buttonWidth=70;
+ buttonHeight=22;
+ }
+
+
+ [super viewDidLoad];
+
+ [self.view setBackgroundColor:[UIColor clearColor]];
+
+ // Paths to the cover and the document.
+
+ paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ documentsDirectory = [paths objectAtIndex:0];
+ pdfPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@/%@.pdf",page,page]];
+
+ paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
+ cacheDirectory = [paths objectAtIndex:0];
+ thumbPath = [cacheDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png",page]];
+
+ fileManager = [[NSFileManager alloc]init];
+
+ //create the temp directory used for the resume of pdf.
+
+ pdfPathTempForResume = [documentsDirectory stringByAppendingPathComponent:@"temp"];
+
+ [fileManager createDirectoryAtPath:pdfPathTempForResume withIntermediateDirectories:YES attributes:nil error:nil];
+
+ if ([fileManager fileExistsAtPath:pdfPath]) {
+ fileAlreadyExists = YES;
+ }else {
+ fileAlreadyExists = NO;
+ }
+
+ // Cover image. We add a background and the overlaying cover image directly onto the controller's view.
+
+ if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+
+ // Background.
+
+ anImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, size.width-10, size.height-10)];
+ [anImageView setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"backThumb",@"png")]];
+ [[self view] addSubview:anImageView];
+ [anImageView release];
+
+ // Cover.
+
+ anImageView = [[UIImageView alloc] initWithFrame:CGRectMake(22, 17, size.width-24, size.height-24)];
+ [anImageView setImage:[UIImage imageWithContentsOfFile:thumbPath]];
+ [anImageView setUserInteractionEnabled:YES];
+ [anImageView setTag:documentNumber];
+ [[self view] addSubview:anImageView];
+ self.thumbImage = anImageView;
+ [anImageView release];
+
+ } else {
+
+ // Background.
+
+ anImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, size.width-10, size.height-10)];
+ [anImageView setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"backThumb_iphone",@"png")]];
+ [[self view] addSubview:anImageView];
+ [anImageView release];
+
+ // Cover.
+
+ anImageView = [[UIImageView alloc] initWithFrame:CGRectMake(17, 12, size.width-14, size.height-14)];
+ [anImageView setImage:[UIImage imageWithContentsOfFile:thumbPath]];
+ [anImageView setUserInteractionEnabled:YES];
+ [anImageView setTag:documentNumber];
+ [[self view] addSubview:anImageView];
+ self.thumbImage = anImageView;
+ [anImageView release];
+ }
+
+ // Open button.
+
+ aButton= [UIButton buttonWithType:UIButtonTypeCustom];
+ [aButton setFrame:CGRectMake(20, 15, size.width-20, size.height-20)];
+ [aButton setTag:documentNumber];
+ [aButton setAutoresizingMask:UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleRightMargin];
+
+ // Open or download action, depend if the file is already present or not.
+
+ if (!fileAlreadyExists) {
+ [aButton addTarget:self action:@selector(actionDownloadPdf:) forControlEvents:UIControlEventTouchUpInside];
+ } else {
+ [aButton addTarget:self action:@selector(actionOpenPdf:) forControlEvents:UIControlEventTouchUpInside];
+ }
+
+ [[self view] addSubview:aButton];
+ self.openButtonFromImage = aButton;
+
+
+ // Progress bar for the download operation.
+
+ aProgressView = [[UIProgressView alloc] initWithFrame:CGRectMake(21, progressBarVOffset, size.width-24, size.height-10)];
+ aProgressView.progressViewStyle = UIActivityIndicatorViewStyleGray;
+ aProgressView.progress= 0.0;
+ aProgressView.hidden = TRUE;
+ [[self view] addSubview:aProgressView];
+ self.progressDownload = aProgressView;
+ [aProgressView release];
+
+
+ // Open/download button.
+
+ aButton = [UIButton buttonWithType:UIButtonTypeCustom];
+ [aButton setFrame:CGRectMake(openButtonHOffset, openButtonVOffset, buttonWidth, buttonHeight)];
+ [aButton setTag:documentNumber];
+ [aButton setAutoresizingMask:UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleRightMargin];
+ [[aButton titleLabel]setFont:[UIFont fontWithName:@"Arial Rounded MT Bold" size:(15.0)]];
+
+ if (!fileAlreadyExists) {
+
+ if ([fileManager fileExistsAtPath:[pdfPathTempForResume stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.pdf",page]]]) {
+ // Resume.
+
+ [aButton setTitle:TITLE_RESUME forState:UIControlStateNormal];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"resume",@"png")] forState:UIControlStateNormal];
+
+ }else {
+
+ // Download.
+
+ [aButton setTitle:TITLE_DOWNLOAD forState:UIControlStateNormal];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"download",@"png")] forState:UIControlStateNormal];
+ }
+ [aButton addTarget:self action:@selector(actionDownloadPdf:) forControlEvents:UIControlEventTouchUpInside];
+ } else {
+
+ // Open.
+
+ [aButton setTitle:TITLE_OPEN forState:UIControlStateNormal];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"view",@"png")] forState:UIControlStateNormal];
+ [aButton addTarget:self action:@selector(actionOpenPdf:) forControlEvents:UIControlEventTouchUpInside];
+ }
+
+ [[self view] addSubview:aButton];
+ self.openButton = aButton;
+
+
+ // Remove button.
+
+ aButton = [UIButton buttonWithType:UIButtonTypeCustom];
+ [aButton setFrame:CGRectMake(removeButtonHOffset, removeButtonVOffset, buttonWidth, buttonHeight)];
+ [aButton setTitle:TITLE_REMOVE forState:UIControlStateNormal];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"remove",@"png")] forState:UIControlStateNormal];
+ [aButton setTag:documentNumber];
+ [aButton setAutoresizingMask:UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleRightMargin];
+ [aButton addTarget:self action:@selector(actionremovePdf:) forControlEvents:UIControlEventTouchUpInside];
+ [[aButton titleLabel]setFont:[UIFont fontWithName:@"Arial Rounded MT Bold" size:(15.0)]];
+
+ // If pdf already exist show the button.
+
+ [aButton setHidden:(!fileAlreadyExists)];
+ [[self view] addSubview:aButton];
+ self.removeButton = aButton;
+
+
+ // Title label.
+ if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+
+ aLabel = [[UILabel alloc ] initWithFrame:CGRectMake(45, 495, 300, 30) ];
+ aLabel.textAlignment = UITextAlignmentCenter;
+ aLabel.textColor = [UIColor blackColor];
+ aLabel.backgroundColor = [UIColor clearColor];
+ aLabel.font = [UIFont fontWithName:@"Arial Rounded MT Bold" size:(25.0)];
+
+ }else {
+
+ aLabel = [[UILabel alloc ] initWithFrame:CGRectMake(20, 170, 105, 20) ];
+ aLabel.textAlignment = UITextAlignmentCenter;
+ aLabel.textColor = [UIColor blackColor];
+ aLabel.backgroundColor = [UIColor clearColor];
+ aLabel.font = [UIFont fontWithName:@"Arial Rounded MT Bold" size:(15.0)];
+ }
+
+ aLabelTitle = [NSString stringWithFormat:@"%@",self.titleOfPdf];
+ [aLabel setText:aLabelTitle];
+ [[self view] addSubview:aLabel];
+ [aLabel release];
+ [fileManager release];
+
+}
+
+-(void)actionremovePdf:(id)sender{
+
+ // Basically, we get the UI elements and change their behaviour.
+
+ UIButton * aButton = nil; /* Will reuse to reference different buttons */
+
+ NSFileManager *filemanager = nil;
+
+ NSArray *paths = nil;
+ NSString *documentsDirectory = nil;
+ NSString *pdfPath = nil;
+
+ paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ documentsDirectory = [paths objectAtIndex:0];
+ pdfPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",page]];
+
+ // Remove the file form disk (ignore the error).
+
+ filemanager = [[NSFileManager alloc]init];
+ [filemanager removeItemAtPath:pdfPath error:NULL];
+ [filemanager release];
+
+ // Hide the remove button.
+ aButton = [menuViewController.buttonRemoveDict objectForKey:page];
+ aButton.hidden = YES;
+
+ // Change the open/download button to download.
+
+ aButton = [menuViewController.openButtons objectForKey:page];
+ [aButton setTitle:TITLE_DOWNLOAD forState:UIControlStateNormal];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"download",@"png")] forState:UIControlStateNormal];
+ [aButton setTag:documentNumber];
+ [aButton setAutoresizingMask:UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleRightMargin];
+ [aButton removeTarget:self action:@selector(actionOpenPdf:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton addTarget:self action:@selector(actionDownloadPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+ // Change the action on the cover from open to download.
+
+ aButton = [menuViewController.imgDict objectForKey:page];
+ [aButton removeTarget:self action:@selector(actionOpenPdf:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton addTarget:self action:@selector(actionDownloadPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+}
+
+-(void)visualizzaButtonRemove{
+ //show btnRemove
+ UIButton *btnRemoveSel = [menuViewController.buttonRemoveDict objectForKey:page];
+ btnRemoveSel.hidden = NO;
+}
+
+-(void)actionOpenPdf:(id)sender {
+ //Open Pdf
+ //senderButton = sender;
+ //NSString * [NSString stringWithFormat:@"%@", page];
+ //[mvc setDocumentName:pdfToDownload];
+ [menuViewController actionOpenPlainDocument:page];
+}
+
+-(void)actionStopPdf:(id)sender {
+
+ UIButton * aButton = nil;
+
+ downloadPdfStopped = YES;
+ [self.httpRequest cancel];
+
+ aButton = [menuViewController.openButtons objectForKey:page];
+ [aButton setTitle:TITLE_OPEN forState:UIControlStateNormal];
+ [aButton removeTarget:self action:@selector(actionStopPdf:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"resume",@"png")] forState:UIControlStateNormal];
+ [aButton addTarget:self action:@selector(actionDownloadPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+ // Cover button.
+
+ aButton = [menuViewController.imgDict objectForKey:page];
+ [aButton removeTarget:self action:@selector(actionStopPdf:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton addTarget:self action:@selector(actionDownloadPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+}
+
+-(void)actionDownloadPdf:(id)sender {
+
+ if(pdfInDownload)
+ return;
+
+ //senderButton = sender;
+ //self.pdfToDownload=[NSString stringWithFormat:@"%@", page];
+ [self downloadPDF:self withUrl:downloadUrl andName:page];
+}
+
+
+-(void)downloadPDF:(id)sender withUrl:(NSString *)sourceURL andName:(NSString *)destinationFilePath{
+
+ NSURL *url = nil;
+ ASIHTTPRequest * request = nil;
+
+ NSArray * paths = nil;
+ NSString * documentsDirectory = nil;
+ NSString * pdfPath = nil;
+
+ UIProgressView * progressView = nil;
+ NSString *pathContainPdf = nil;
+ NSFileManager *filemanager = nil;
+ NSError **error;
+ NSString *pdfPathTempForResume = nil;
+
+ //check if the download url is a link to a pdf file or pfk file.
+ isPdfLink = [self checkIfPDfLink:sourceURL];
+
+ // Filename path.
+
+ paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ documentsDirectory = [paths objectAtIndex:0];
+
+ pathContainPdf = [NSString stringWithString:[NSString stringWithFormat:@"/%@/",destinationFilePath]];
+ pathContainPdf = [documentsDirectory stringByAppendingString:pathContainPdf];
+
+ filemanager = [[NSFileManager alloc]init];
+ [filemanager createDirectoryAtPath:pathContainPdf withIntermediateDirectories:YES attributes:nil error:error];
+ [filemanager release];
+
+ if (isPdfLink) {
+ pdfPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@/%@.pdf",destinationFilePath,destinationFilePath]];
+ }else{
+ pdfPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@/%@.fpk",destinationFilePath,destinationFilePath]];
+ }
+
+ //This Directory Contains the temp file in download . it's used when resume is supported.
+ pdfPathTempForResume = [documentsDirectory stringByAppendingPathComponent:@"temp"];
+
+ if (isPdfLink) {
+ pdfPathTempForResume = [pdfPathTempForResume stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.pdf",destinationFilePath]];
+ }else {
+ pdfPathTempForResume = [pdfPathTempForResume stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.fpk",destinationFilePath]];
+
+ }
+
+ url = [NSURL URLWithString:sourceURL];
+
+ request = [ASIHTTPRequest requestWithURL:url];
+ [request setDelegate:self];
+
+ [request setUseKeychainPersistence:YES];
+ [request setDownloadDestinationPath:pdfPath];
+ [request setDidFinishSelector:@selector(requestFinished:)];
+ [request setDidFailSelector:@selector(requestFailed:)];
+
+ // Get the progressview from the mainviewcontroller and set it as the progress delegate.
+
+ progressView = [menuViewController.progressViewDict objectForKey:page];
+ [request setDownloadProgressDelegate:progressView];
+
+ [request setShouldPresentAuthenticationDialog:YES];
+ [request setDownloadDestinationPath:pdfPath];
+ [request setAllowResumeForFileDownloads:YES]; //set YEs if resume is supported
+ [request setTemporaryFileDownloadPath:pdfPathTempForResume]; // if resume is supported set the temporary Path
+
+ self.httpRequest = request;
+
+ [request startAsynchronous];
+}
+
+-(void)downloadImage:(id)sender withUrl:(NSString *)_url andName:(NSString *)nomefilepdf{
+
+ //Download Image for the thumb of the pdf
+
+ NSURL *url = [NSURL URLWithString:_url];
+
+ NSArray * paths = nil;
+ NSString * documentsDirectory = nil;
+ NSString * imgSavedPath = nil;
+ NSString * pdfPath = nil;
+
+ NSFileManager * fileManager = nil;
+
+ ASIHTTPRequest * aRequest = nil;
+
+ // Filename path.
+
+ fileManager = [[NSFileManager alloc]init];
+
+ paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
+ documentsDirectory = [paths objectAtIndex:0];
+ imgSavedPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png",page]];
+
+ if(![fileManager fileExistsAtPath: imgSavedPath]) {
+
+ pdfPath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.png",nomefilepdf]];
+
+ aRequest = [ASIHTTPRequest requestWithURL:url];
+
+ [aRequest setDelegate:self];
+ [aRequest setDidStartSelector:@selector(requestStartedDownloadImg:)];
+ [aRequest setDidFinishSelector:@selector(requestFinishedDownloadImg:)];
+ [aRequest setDidFailSelector:@selector(requestFailedDownloadImg:)];
+ [aRequest setUseKeychainPersistence:YES];
+ [aRequest setDownloadDestinationPath:pdfPath];
+
+ self.httpRequest = aRequest;
+
+ [aRequest startSynchronous];
+
+ }
+
+ [fileManager release];
+}
+
+-(void)requestStarted:(ASIHTTPRequest *)request{
+
+ UIButton *aButton = nil;
+ UIProgressView *progressView = nil;
+
+ pdfInDownload = YES;
+
+ progressView = [menuViewController.progressViewDict objectForKey:page];
+ progressView.hidden = NO;
+
+ aButton =[menuViewController.openButtons objectForKey:page];
+ [aButton setTitle:TITLE_OPEN forState:UIControlStateNormal];
+ [aButton removeTarget:self action:@selector(actionDownloadPDF:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"pause",@"png")] forState:UIControlStateNormal];
+ [aButton addTarget:self action:@selector(actionStopPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+ // Cover button.
+
+ aButton = [menuViewController.imgDict objectForKey:page];
+ [aButton removeTarget:self action:@selector(actionDownloadPDF:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton addTarget:self action:@selector(actionStopPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+ [aButton release];
+}
+
+-(void)requestFinished:(ASIHTTPRequest *)request{
+
+ UIProgressView * aProgressView = nil;
+ UIButton * aButton = nil; /* Will reuse this to reference different buttons */
+
+ pdfInDownload = NO;
+
+ // Update the UI elements from download status to pen status. We get the buttons from the main view controller
+ // and update them to the new status.
+
+ // Download/open button.
+
+ aButton =[menuViewController.openButtons objectForKey:page];
+ [aButton setTitle:TITLE_OPEN forState:UIControlStateNormal];
+ [aButton removeTarget:self action:@selector(actionStopPdf:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"view",@"png")] forState:UIControlStateNormal];
+ [aButton addTarget:self action:@selector(actionOpenPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+ // Cover button.
+
+ aButton = [menuViewController.imgDict objectForKey:page];
+ [aButton removeTarget:self action:@selector(actionStopPdf:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton addTarget:self action:@selector(actionOpenPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+ [self performSelector:@selector(visualizzaButtonRemove) withObject:nil afterDelay:0.1]; /* This will show the remove button */
+
+ // Hide the progress view.
+
+ aProgressView = [menuViewController.progressViewDict objectForKey:page];
+ aProgressView.hidden = YES;
+
+ if (!isPdfLink) {
+
+ ZipArchive * zipFile = nil;
+ NSArray * dirContents = nil;
+
+ NSString * oldPath = nil;
+ NSString * newPath = nil;
+
+ //set the directory for the Unzip and use ZipArchive library to unzip the file and the multimedia file
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+ NSString *documentsDirectory = [paths objectAtIndex:0];
+ NSString *unzippedDestination = [documentsDirectory stringByAppendingString:[NSString stringWithFormat:@"/%@/",page]];
+ NSString *saveLocation = [documentsDirectory stringByAppendingString:[NSString stringWithFormat:@"/%@/%@.fpk",page,page]];
+
+ zipFile = [[ZipArchive alloc] init];
+ [zipFile UnzipOpenFile:saveLocation];
+ [zipFile UnzipFileTo:unzippedDestination overWrite:YES];
+ [zipFile UnzipCloseFile];
+ [zipFile release];
+
+ // rename the file pdf ( only one must be exists in the fpk folder ) correctly
+ // With this rename of the pdf we are sure that the pdf name is correct.
+
+ dirContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:unzippedDestination error:nil];
+
+ for (NSString *tString in dirContents) {
+
+ if ([tString hasSuffix:@".pdf"]) {
+
+ oldPath =[unzippedDestination stringByAppendingString:tString];
+ newPath = [unzippedDestination stringByAppendingString:[NSString stringWithFormat:@"%@.pdf",page]];
+
+ [[NSFileManager defaultManager] moveItemAtPath:oldPath toPath:newPath error:nil];
+ }
+ }
+ }
+}
+
+-(void)requestFailed:(ASIHTTPRequest *)request{
+
+ UIButton * aButton = nil;
+ UIProgressView * aProgressView = nil;
+
+ pdfInDownload = NO;
+
+ aProgressView = [menuViewController.progressViewDict objectForKey:page];
+ aProgressView.hidden = !downloadPdfStopped;
+
+ aButton = [menuViewController.openButtons objectForKey:page];
+ [aButton setTitle:TITLE_RESUME forState:UIControlStateNormal];
+ [aButton setImage:[UIImage imageWithContentsOfFile:MF_BUNDLED_RESOURCE(@"FPKKioskBundle",@"resume",@"png")] forState:UIControlStateNormal];
+ [aButton removeTarget:self action:@selector(actionStopPDF:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton addTarget:self action:@selector(actionDownloadPDF:) forControlEvents:UIControlEventTouchUpInside];
+
+ aButton = [menuViewController.imgDict objectForKey:page];
+ [aButton removeTarget:self action:@selector(actionDownloadPDF:) forControlEvents:UIControlEventTouchUpInside];
+ [aButton addTarget:self action:@selector(actionStopPdf:) forControlEvents:UIControlEventTouchUpInside];
+
+ if (downloadPdfStopped) {
+ downloadPdfStopped=NO;
+ }
+}
+
+-(BOOL)checkIfPDfLink:(NSString *)url{
+
+ //url example in xml
+ //link pdf: <link>http://go.mobfarm.eu/pdf/Aperture.pdf</link>
+ //link fpk: <link>http://go.mobfarm.eu/pdf/Aperture.fpk</link>
+
+ NSArray *listItems = [url componentsSeparatedByString:@"."];
+ NSString *doctype = [listItems objectAtIndex:listItems.count-1];
+
+ if ([doctype isEqualToString:@"pdf"]) {
+ NSLog(@"Is Pdf");
+ return YES;
+ }else{
+ NSLog(@"Is fpk");
+ return NO;
+ }
+}
+
+- (void)updateCorner{
+ //Not used
+}
+
+- (void)setSelected:(BOOL)selected{
+
+}
+
+
+- (void)didReceiveMemoryWarning {
+ [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
+ // Release anything that's not essential, such as cached data
+}
+
+
+- (void)dealloc {
+
+ [corner release];
+ [httpRequest release];
+ [thumbName release];
+ [page release];
+ [downloadUrl release];
+
+ [thumbName release];
+ [removeButton release];
+ [openButton release];
+ [thumbImage release];
+ [openButtonFromImage release];
+ [progressDownload release];
+
+ [super dealloc];
+}
+
+
+@end
View
411 Classes/KioskApp/Controllers/MainWindow_Kiosk.xib
@@ -0,0 +1,411 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10J567</string>
+ <string key="IBDocument.InterfaceBuilderVersion">823</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">462.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">132</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="2"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="590933970">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIWindow" id="380026005">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">1316</int>
+ <object class="NSPSMatrix" key="NSFrameMatrix"/>
+ <string key="NSFrameSize">{320, 480}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ <object class="IBUICustomObject" id="693117962">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="693117962"/>
+ <reference key="destination" ref="380026005"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="693117962"/>
+ </object>
+ <int key="connectionID">6</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="380026005"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="590933970"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4</int>
+ <reference key="object" ref="693117962"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>2.IBAttributePlaceholdersKey</string>
+ <string>2.IBEditorWindowLastContentRect</string>
+ <string>2.IBPluginDependency</string>
+ <string>2.UIWindow.visibleAtLaunch</string>
+ <string>4.CustomClassName</string>
+ <string>4.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <object class="NSMutableDictionary">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <string>{{341, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <integer value="1"/>
+ <string>FastPDFKit_KioskAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">6</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">FastPDFKit_KioskAppDelegate</string>
+ <string key="superclassName">FastPDFKit_SampleAppDelegate</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/FastPDFKit_KioskAppDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">FastPDFKit_SampleAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">window</string>
+ <string key="NS.object.0">UIWindow</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">window</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">window</string>
+ <string key="candidateClassName">UIWindow</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/FastPDFKit_SampleAppDelegate.h</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="959001954">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIApplication</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="959001954"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key=