├── .gitignore
├── .travis.yml
├── Example
├── JFImageSavePanelExample.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
├── JFImageSavePanelExample.xcworkspace
│ └── contents.xcworkspacedata
├── JFImageSavePanelExample
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ └── MainMenu.xib
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ └── main.m
├── JFImageSavePanelExampleTests
│ ├── Info.plist
│ └── JFImageSavePanelExampleTests.m
├── Podfile
├── Podfile.lock
└── Pods
│ ├── Headers
│ └── Public
│ │ └── JFImageSavePanel
│ │ └── JFImageSavePanel.h
│ ├── Local Podspecs
│ └── JFImageSavePanel.podspec
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ └── project.pbxproj
│ └── Target Support Files
│ ├── Pods-JFImageSavePanelExample-JFImageSavePanel
│ ├── Pods-JFImageSavePanelExample-JFImageSavePanel-Private.xcconfig
│ ├── Pods-JFImageSavePanelExample-JFImageSavePanel-dummy.m
│ ├── Pods-JFImageSavePanelExample-JFImageSavePanel-prefix.pch
│ └── Pods-JFImageSavePanelExample-JFImageSavePanel.xcconfig
│ └── Pods-JFImageSavePanelExample
│ ├── Pods-JFImageSavePanelExample-acknowledgements.markdown
│ ├── Pods-JFImageSavePanelExample-acknowledgements.plist
│ ├── Pods-JFImageSavePanelExample-dummy.m
│ ├── Pods-JFImageSavePanelExample-environment.h
│ ├── Pods-JFImageSavePanelExample-resources.sh
│ ├── Pods-JFImageSavePanelExample.debug.xcconfig
│ └── Pods-JFImageSavePanelExample.release.xcconfig
├── JFImageSavePanel.podspec
├── LICENSE
├── Pod
├── Assets
│ ├── .gitkeep
│ └── JFImageSavePanelAccessoryView.xib
└── Classes
│ ├── .gitkeep
│ ├── JFImageSavePanel.h
│ └── JFImageSavePanel.m
├── README.md
└── screenshot.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata
15 | *.xccheckout
16 | profile
17 | *.moved-aside
18 | DerivedData
19 | *.hmap
20 | *.ipa
21 |
22 | # Bundler
23 | .bundle
24 |
25 | # We recommend against adding the Pods directory to your .gitignore. However
26 | # you should judge for yourself, the pros and cons are mentioned at:
27 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
28 | #
29 | # Note: if you ignore the Pods directory, make sure to uncomment
30 | # `pod install` in .travis.yml
31 | #
32 | # Pods/
33 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # references:
2 | # * http://www.objc.io/issue-6/travis-ci.html
3 | # * https://github.com/supermarin/xcpretty#usage
4 |
5 | language: objective-c
6 | # cache: cocoapods
7 | # podfile: Example/Podfile
8 | # before_install: cd Example && pod install && cd -
9 | install:
10 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet
11 | script:
12 | - set -o pipefail && xcodebuild test -workspace Example/JFImageSavePanel.xcworkspace -scheme JFImageSavePanel -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
13 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | archiveVersion
6 | 1
7 | classes
8 |
9 | objectVersion
10 | 46
11 | objects
12 |
13 | 002BF64259E19DE0C011F359
14 |
15 | fileRef
16 | E67E92178A091601FDB6D54D
17 | isa
18 | PBXBuildFile
19 |
20 | 21563C3993624F07FBF6224A
21 |
22 | children
23 |
24 | FDF4EA3F0F415CEB1A9457AC
25 | 5F0378385FA62143084F286B
26 |
27 | isa
28 | PBXGroup
29 | name
30 | Pods
31 | sourceTree
32 | <group>
33 |
34 | 2FE7103A046568DBB0D4ED11
35 |
36 | buildActionMask
37 | 2147483647
38 | files
39 |
40 | inputPaths
41 |
42 | isa
43 | PBXShellScriptBuildPhase
44 | name
45 | Check Pods Manifest.lock
46 | outputPaths
47 |
48 | runOnlyForDeploymentPostprocessing
49 | 0
50 | shellPath
51 | /bin/sh
52 | shellScript
53 | diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
54 | if [[ $? != 0 ]] ; then
55 | cat << EOM
56 | error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
57 | EOM
58 | exit 1
59 | fi
60 |
61 | showEnvVarsInLog
62 | 0
63 |
64 | 37D59826CD1E51FD8D98694D
65 |
66 | buildActionMask
67 | 2147483647
68 | files
69 |
70 | inputPaths
71 |
72 | isa
73 | PBXShellScriptBuildPhase
74 | name
75 | Copy Pods Resources
76 | outputPaths
77 |
78 | runOnlyForDeploymentPostprocessing
79 | 0
80 | shellPath
81 | /bin/sh
82 | shellScript
83 | "${SRCROOT}/Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample-resources.sh"
84 |
85 | showEnvVarsInLog
86 | 0
87 |
88 | 5F0378385FA62143084F286B
89 |
90 | includeInIndex
91 | 1
92 | isa
93 | PBXFileReference
94 | lastKnownFileType
95 | text.xcconfig
96 | name
97 | Pods-JFImageSavePanelExample.release.xcconfig
98 | path
99 | Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample.release.xcconfig
100 | sourceTree
101 | <group>
102 |
103 | 963A0A931A31EA4100CAB89E
104 |
105 | children
106 |
107 | 963A0A9E1A31EA4100CAB89E
108 | 963A0AB21A31EA4100CAB89E
109 | 963A0A9D1A31EA4100CAB89E
110 | 21563C3993624F07FBF6224A
111 | 9D0C0D0C42D8F1507FA027A5
112 |
113 | isa
114 | PBXGroup
115 | sourceTree
116 | <group>
117 |
118 | 963A0A941A31EA4100CAB89E
119 |
120 | attributes
121 |
122 | LastUpgradeCheck
123 | 0610
124 | ORGANIZATIONNAME
125 | Jason Frame
126 | TargetAttributes
127 |
128 | 963A0A9B1A31EA4100CAB89E
129 |
130 | CreatedOnToolsVersion
131 | 6.1
132 |
133 | 963A0AAE1A31EA4100CAB89E
134 |
135 | CreatedOnToolsVersion
136 | 6.1
137 | TestTargetID
138 | 963A0A9B1A31EA4100CAB89E
139 |
140 |
141 |
142 | buildConfigurationList
143 | 963A0A971A31EA4100CAB89E
144 | compatibilityVersion
145 | Xcode 3.2
146 | developmentRegion
147 | English
148 | hasScannedForEncodings
149 | 0
150 | isa
151 | PBXProject
152 | knownRegions
153 |
154 | en
155 | Base
156 |
157 | mainGroup
158 | 963A0A931A31EA4100CAB89E
159 | productRefGroup
160 | 963A0A9D1A31EA4100CAB89E
161 | projectDirPath
162 |
163 | projectReferences
164 |
165 | projectRoot
166 |
167 | targets
168 |
169 | 963A0A9B1A31EA4100CAB89E
170 | 963A0AAE1A31EA4100CAB89E
171 |
172 |
173 | 963A0A971A31EA4100CAB89E
174 |
175 | buildConfigurations
176 |
177 | 963A0AB71A31EA4100CAB89E
178 | 963A0AB81A31EA4100CAB89E
179 |
180 | defaultConfigurationIsVisible
181 | 0
182 | defaultConfigurationName
183 | Release
184 | isa
185 | XCConfigurationList
186 |
187 | 963A0A981A31EA4100CAB89E
188 |
189 | buildActionMask
190 | 2147483647
191 | files
192 |
193 | 963A0AA51A31EA4100CAB89E
194 | 963A0AA31A31EA4100CAB89E
195 |
196 | isa
197 | PBXSourcesBuildPhase
198 | runOnlyForDeploymentPostprocessing
199 | 0
200 |
201 | 963A0A991A31EA4100CAB89E
202 |
203 | buildActionMask
204 | 2147483647
205 | files
206 |
207 | 002BF64259E19DE0C011F359
208 |
209 | isa
210 | PBXFrameworksBuildPhase
211 | runOnlyForDeploymentPostprocessing
212 | 0
213 |
214 | 963A0A9A1A31EA4100CAB89E
215 |
216 | buildActionMask
217 | 2147483647
218 | files
219 |
220 | 963A0AA71A31EA4100CAB89E
221 | 963A0AAA1A31EA4100CAB89E
222 |
223 | isa
224 | PBXResourcesBuildPhase
225 | runOnlyForDeploymentPostprocessing
226 | 0
227 |
228 | 963A0A9B1A31EA4100CAB89E
229 |
230 | buildConfigurationList
231 | 963A0AB91A31EA4100CAB89E
232 | buildPhases
233 |
234 | 2FE7103A046568DBB0D4ED11
235 | 963A0A981A31EA4100CAB89E
236 | 963A0A991A31EA4100CAB89E
237 | 963A0A9A1A31EA4100CAB89E
238 | 37D59826CD1E51FD8D98694D
239 |
240 | buildRules
241 |
242 | dependencies
243 |
244 | isa
245 | PBXNativeTarget
246 | name
247 | JFImageSavePanelExample
248 | productName
249 | JFImageSavePanelExample
250 | productReference
251 | 963A0A9C1A31EA4100CAB89E
252 | productType
253 | com.apple.product-type.application
254 |
255 | 963A0A9C1A31EA4100CAB89E
256 |
257 | explicitFileType
258 | wrapper.application
259 | includeInIndex
260 | 0
261 | isa
262 | PBXFileReference
263 | path
264 | JFImageSavePanelExample.app
265 | sourceTree
266 | BUILT_PRODUCTS_DIR
267 |
268 | 963A0A9D1A31EA4100CAB89E
269 |
270 | children
271 |
272 | 963A0A9C1A31EA4100CAB89E
273 | 963A0AAF1A31EA4100CAB89E
274 |
275 | isa
276 | PBXGroup
277 | name
278 | Products
279 | sourceTree
280 | <group>
281 |
282 | 963A0A9E1A31EA4100CAB89E
283 |
284 | children
285 |
286 | 963A0AA11A31EA4100CAB89E
287 | 963A0AA21A31EA4100CAB89E
288 | 963A0AA61A31EA4100CAB89E
289 | 963A0AA81A31EA4100CAB89E
290 | 963A0A9F1A31EA4100CAB89E
291 |
292 | isa
293 | PBXGroup
294 | path
295 | JFImageSavePanelExample
296 | sourceTree
297 | <group>
298 |
299 | 963A0A9F1A31EA4100CAB89E
300 |
301 | children
302 |
303 | 963A0AA01A31EA4100CAB89E
304 | 963A0AA41A31EA4100CAB89E
305 |
306 | isa
307 | PBXGroup
308 | name
309 | Supporting Files
310 | sourceTree
311 | <group>
312 |
313 | 963A0AA01A31EA4100CAB89E
314 |
315 | isa
316 | PBXFileReference
317 | lastKnownFileType
318 | text.plist.xml
319 | path
320 | Info.plist
321 | sourceTree
322 | <group>
323 |
324 | 963A0AA11A31EA4100CAB89E
325 |
326 | isa
327 | PBXFileReference
328 | lastKnownFileType
329 | sourcecode.c.h
330 | path
331 | AppDelegate.h
332 | sourceTree
333 | <group>
334 |
335 | 963A0AA21A31EA4100CAB89E
336 |
337 | isa
338 | PBXFileReference
339 | lastKnownFileType
340 | sourcecode.c.objc
341 | path
342 | AppDelegate.m
343 | sourceTree
344 | <group>
345 |
346 | 963A0AA31A31EA4100CAB89E
347 |
348 | fileRef
349 | 963A0AA21A31EA4100CAB89E
350 | isa
351 | PBXBuildFile
352 |
353 | 963A0AA41A31EA4100CAB89E
354 |
355 | isa
356 | PBXFileReference
357 | lastKnownFileType
358 | sourcecode.c.objc
359 | path
360 | main.m
361 | sourceTree
362 | <group>
363 |
364 | 963A0AA51A31EA4100CAB89E
365 |
366 | fileRef
367 | 963A0AA41A31EA4100CAB89E
368 | isa
369 | PBXBuildFile
370 |
371 | 963A0AA61A31EA4100CAB89E
372 |
373 | isa
374 | PBXFileReference
375 | lastKnownFileType
376 | folder.assetcatalog
377 | path
378 | Images.xcassets
379 | sourceTree
380 | <group>
381 |
382 | 963A0AA71A31EA4100CAB89E
383 |
384 | fileRef
385 | 963A0AA61A31EA4100CAB89E
386 | isa
387 | PBXBuildFile
388 |
389 | 963A0AA81A31EA4100CAB89E
390 |
391 | children
392 |
393 | 963A0AA91A31EA4100CAB89E
394 |
395 | isa
396 | PBXVariantGroup
397 | name
398 | MainMenu.xib
399 | sourceTree
400 | <group>
401 |
402 | 963A0AA91A31EA4100CAB89E
403 |
404 | isa
405 | PBXFileReference
406 | lastKnownFileType
407 | file.xib
408 | name
409 | Base
410 | path
411 | Base.lproj/MainMenu.xib
412 | sourceTree
413 | <group>
414 |
415 | 963A0AAA1A31EA4100CAB89E
416 |
417 | fileRef
418 | 963A0AA81A31EA4100CAB89E
419 | isa
420 | PBXBuildFile
421 |
422 | 963A0AAB1A31EA4100CAB89E
423 |
424 | buildActionMask
425 | 2147483647
426 | files
427 |
428 | 963A0AB61A31EA4100CAB89E
429 |
430 | isa
431 | PBXSourcesBuildPhase
432 | runOnlyForDeploymentPostprocessing
433 | 0
434 |
435 | 963A0AAC1A31EA4100CAB89E
436 |
437 | buildActionMask
438 | 2147483647
439 | files
440 |
441 | isa
442 | PBXFrameworksBuildPhase
443 | runOnlyForDeploymentPostprocessing
444 | 0
445 |
446 | 963A0AAD1A31EA4100CAB89E
447 |
448 | buildActionMask
449 | 2147483647
450 | files
451 |
452 | isa
453 | PBXResourcesBuildPhase
454 | runOnlyForDeploymentPostprocessing
455 | 0
456 |
457 | 963A0AAE1A31EA4100CAB89E
458 |
459 | buildConfigurationList
460 | 963A0ABC1A31EA4100CAB89E
461 | buildPhases
462 |
463 | 963A0AAB1A31EA4100CAB89E
464 | 963A0AAC1A31EA4100CAB89E
465 | 963A0AAD1A31EA4100CAB89E
466 |
467 | buildRules
468 |
469 | dependencies
470 |
471 | 963A0AB11A31EA4100CAB89E
472 |
473 | isa
474 | PBXNativeTarget
475 | name
476 | JFImageSavePanelExampleTests
477 | productName
478 | JFImageSavePanelExampleTests
479 | productReference
480 | 963A0AAF1A31EA4100CAB89E
481 | productType
482 | com.apple.product-type.bundle.unit-test
483 |
484 | 963A0AAF1A31EA4100CAB89E
485 |
486 | explicitFileType
487 | wrapper.cfbundle
488 | includeInIndex
489 | 0
490 | isa
491 | PBXFileReference
492 | path
493 | JFImageSavePanelExampleTests.xctest
494 | sourceTree
495 | BUILT_PRODUCTS_DIR
496 |
497 | 963A0AB01A31EA4100CAB89E
498 |
499 | containerPortal
500 | 963A0A941A31EA4100CAB89E
501 | isa
502 | PBXContainerItemProxy
503 | proxyType
504 | 1
505 | remoteGlobalIDString
506 | 963A0A9B1A31EA4100CAB89E
507 | remoteInfo
508 | JFImageSavePanelExample
509 |
510 | 963A0AB11A31EA4100CAB89E
511 |
512 | isa
513 | PBXTargetDependency
514 | target
515 | 963A0A9B1A31EA4100CAB89E
516 | targetProxy
517 | 963A0AB01A31EA4100CAB89E
518 |
519 | 963A0AB21A31EA4100CAB89E
520 |
521 | children
522 |
523 | 963A0AB51A31EA4100CAB89E
524 | 963A0AB31A31EA4100CAB89E
525 |
526 | isa
527 | PBXGroup
528 | path
529 | JFImageSavePanelExampleTests
530 | sourceTree
531 | <group>
532 |
533 | 963A0AB31A31EA4100CAB89E
534 |
535 | children
536 |
537 | 963A0AB41A31EA4100CAB89E
538 |
539 | isa
540 | PBXGroup
541 | name
542 | Supporting Files
543 | sourceTree
544 | <group>
545 |
546 | 963A0AB41A31EA4100CAB89E
547 |
548 | isa
549 | PBXFileReference
550 | lastKnownFileType
551 | text.plist.xml
552 | path
553 | Info.plist
554 | sourceTree
555 | <group>
556 |
557 | 963A0AB51A31EA4100CAB89E
558 |
559 | isa
560 | PBXFileReference
561 | lastKnownFileType
562 | sourcecode.c.objc
563 | path
564 | JFImageSavePanelExampleTests.m
565 | sourceTree
566 | <group>
567 |
568 | 963A0AB61A31EA4100CAB89E
569 |
570 | fileRef
571 | 963A0AB51A31EA4100CAB89E
572 | isa
573 | PBXBuildFile
574 |
575 | 963A0AB71A31EA4100CAB89E
576 |
577 | buildSettings
578 |
579 | ALWAYS_SEARCH_USER_PATHS
580 | NO
581 | CLANG_CXX_LANGUAGE_STANDARD
582 | gnu++0x
583 | CLANG_CXX_LIBRARY
584 | libc++
585 | CLANG_ENABLE_MODULES
586 | YES
587 | CLANG_ENABLE_OBJC_ARC
588 | YES
589 | CLANG_WARN_BOOL_CONVERSION
590 | YES
591 | CLANG_WARN_CONSTANT_CONVERSION
592 | YES
593 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE
594 | YES_ERROR
595 | CLANG_WARN_EMPTY_BODY
596 | YES
597 | CLANG_WARN_ENUM_CONVERSION
598 | YES
599 | CLANG_WARN_INT_CONVERSION
600 | YES
601 | CLANG_WARN_OBJC_ROOT_CLASS
602 | YES_ERROR
603 | CLANG_WARN_UNREACHABLE_CODE
604 | YES
605 | CLANG_WARN__DUPLICATE_METHOD_MATCH
606 | YES
607 | CODE_SIGN_IDENTITY
608 | -
609 | COPY_PHASE_STRIP
610 | NO
611 | ENABLE_STRICT_OBJC_MSGSEND
612 | YES
613 | GCC_C_LANGUAGE_STANDARD
614 | gnu99
615 | GCC_DYNAMIC_NO_PIC
616 | NO
617 | GCC_OPTIMIZATION_LEVEL
618 | 0
619 | GCC_PREPROCESSOR_DEFINITIONS
620 |
621 | DEBUG=1
622 | $(inherited)
623 |
624 | GCC_SYMBOLS_PRIVATE_EXTERN
625 | NO
626 | GCC_WARN_64_TO_32_BIT_CONVERSION
627 | YES
628 | GCC_WARN_ABOUT_RETURN_TYPE
629 | YES_ERROR
630 | GCC_WARN_UNDECLARED_SELECTOR
631 | YES
632 | GCC_WARN_UNINITIALIZED_AUTOS
633 | YES_AGGRESSIVE
634 | GCC_WARN_UNUSED_FUNCTION
635 | YES
636 | GCC_WARN_UNUSED_VARIABLE
637 | YES
638 | MACOSX_DEPLOYMENT_TARGET
639 | 10.9
640 | MTL_ENABLE_DEBUG_INFO
641 | YES
642 | ONLY_ACTIVE_ARCH
643 | YES
644 | SDKROOT
645 | macosx
646 |
647 | isa
648 | XCBuildConfiguration
649 | name
650 | Debug
651 |
652 | 963A0AB81A31EA4100CAB89E
653 |
654 | buildSettings
655 |
656 | ALWAYS_SEARCH_USER_PATHS
657 | NO
658 | CLANG_CXX_LANGUAGE_STANDARD
659 | gnu++0x
660 | CLANG_CXX_LIBRARY
661 | libc++
662 | CLANG_ENABLE_MODULES
663 | YES
664 | CLANG_ENABLE_OBJC_ARC
665 | YES
666 | CLANG_WARN_BOOL_CONVERSION
667 | YES
668 | CLANG_WARN_CONSTANT_CONVERSION
669 | YES
670 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE
671 | YES_ERROR
672 | CLANG_WARN_EMPTY_BODY
673 | YES
674 | CLANG_WARN_ENUM_CONVERSION
675 | YES
676 | CLANG_WARN_INT_CONVERSION
677 | YES
678 | CLANG_WARN_OBJC_ROOT_CLASS
679 | YES_ERROR
680 | CLANG_WARN_UNREACHABLE_CODE
681 | YES
682 | CLANG_WARN__DUPLICATE_METHOD_MATCH
683 | YES
684 | CODE_SIGN_IDENTITY
685 | -
686 | COPY_PHASE_STRIP
687 | YES
688 | DEBUG_INFORMATION_FORMAT
689 | dwarf-with-dsym
690 | ENABLE_NS_ASSERTIONS
691 | NO
692 | ENABLE_STRICT_OBJC_MSGSEND
693 | YES
694 | GCC_C_LANGUAGE_STANDARD
695 | gnu99
696 | GCC_WARN_64_TO_32_BIT_CONVERSION
697 | YES
698 | GCC_WARN_ABOUT_RETURN_TYPE
699 | YES_ERROR
700 | GCC_WARN_UNDECLARED_SELECTOR
701 | YES
702 | GCC_WARN_UNINITIALIZED_AUTOS
703 | YES_AGGRESSIVE
704 | GCC_WARN_UNUSED_FUNCTION
705 | YES
706 | GCC_WARN_UNUSED_VARIABLE
707 | YES
708 | MACOSX_DEPLOYMENT_TARGET
709 | 10.9
710 | MTL_ENABLE_DEBUG_INFO
711 | NO
712 | SDKROOT
713 | macosx
714 |
715 | isa
716 | XCBuildConfiguration
717 | name
718 | Release
719 |
720 | 963A0AB91A31EA4100CAB89E
721 |
722 | buildConfigurations
723 |
724 | 963A0ABA1A31EA4100CAB89E
725 | 963A0ABB1A31EA4100CAB89E
726 |
727 | defaultConfigurationIsVisible
728 | 0
729 | isa
730 | XCConfigurationList
731 |
732 | 963A0ABA1A31EA4100CAB89E
733 |
734 | baseConfigurationReference
735 | FDF4EA3F0F415CEB1A9457AC
736 | buildSettings
737 |
738 | ASSETCATALOG_COMPILER_APPICON_NAME
739 | AppIcon
740 | COMBINE_HIDPI_IMAGES
741 | YES
742 | INFOPLIST_FILE
743 | JFImageSavePanelExample/Info.plist
744 | LD_RUNPATH_SEARCH_PATHS
745 | $(inherited) @executable_path/../Frameworks
746 | PRODUCT_NAME
747 | $(TARGET_NAME)
748 |
749 | isa
750 | XCBuildConfiguration
751 | name
752 | Debug
753 |
754 | 963A0ABB1A31EA4100CAB89E
755 |
756 | baseConfigurationReference
757 | 5F0378385FA62143084F286B
758 | buildSettings
759 |
760 | ASSETCATALOG_COMPILER_APPICON_NAME
761 | AppIcon
762 | COMBINE_HIDPI_IMAGES
763 | YES
764 | INFOPLIST_FILE
765 | JFImageSavePanelExample/Info.plist
766 | LD_RUNPATH_SEARCH_PATHS
767 | $(inherited) @executable_path/../Frameworks
768 | PRODUCT_NAME
769 | $(TARGET_NAME)
770 |
771 | isa
772 | XCBuildConfiguration
773 | name
774 | Release
775 |
776 | 963A0ABC1A31EA4100CAB89E
777 |
778 | buildConfigurations
779 |
780 | 963A0ABD1A31EA4100CAB89E
781 | 963A0ABE1A31EA4100CAB89E
782 |
783 | defaultConfigurationIsVisible
784 | 0
785 | isa
786 | XCConfigurationList
787 |
788 | 963A0ABD1A31EA4100CAB89E
789 |
790 | buildSettings
791 |
792 | BUNDLE_LOADER
793 | $(TEST_HOST)
794 | COMBINE_HIDPI_IMAGES
795 | YES
796 | FRAMEWORK_SEARCH_PATHS
797 |
798 | $(DEVELOPER_FRAMEWORKS_DIR)
799 | $(inherited)
800 |
801 | GCC_PREPROCESSOR_DEFINITIONS
802 |
803 | DEBUG=1
804 | $(inherited)
805 |
806 | INFOPLIST_FILE
807 | JFImageSavePanelExampleTests/Info.plist
808 | LD_RUNPATH_SEARCH_PATHS
809 | $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks
810 | PRODUCT_NAME
811 | $(TARGET_NAME)
812 | TEST_HOST
813 | $(BUILT_PRODUCTS_DIR)/JFImageSavePanelExample.app/Contents/MacOS/JFImageSavePanelExample
814 |
815 | isa
816 | XCBuildConfiguration
817 | name
818 | Debug
819 |
820 | 963A0ABE1A31EA4100CAB89E
821 |
822 | buildSettings
823 |
824 | BUNDLE_LOADER
825 | $(TEST_HOST)
826 | COMBINE_HIDPI_IMAGES
827 | YES
828 | FRAMEWORK_SEARCH_PATHS
829 |
830 | $(DEVELOPER_FRAMEWORKS_DIR)
831 | $(inherited)
832 |
833 | INFOPLIST_FILE
834 | JFImageSavePanelExampleTests/Info.plist
835 | LD_RUNPATH_SEARCH_PATHS
836 | $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks
837 | PRODUCT_NAME
838 | $(TARGET_NAME)
839 | TEST_HOST
840 | $(BUILT_PRODUCTS_DIR)/JFImageSavePanelExample.app/Contents/MacOS/JFImageSavePanelExample
841 |
842 | isa
843 | XCBuildConfiguration
844 | name
845 | Release
846 |
847 | 9D0C0D0C42D8F1507FA027A5
848 |
849 | children
850 |
851 | E67E92178A091601FDB6D54D
852 |
853 | isa
854 | PBXGroup
855 | name
856 | Frameworks
857 | sourceTree
858 | <group>
859 |
860 | E67E92178A091601FDB6D54D
861 |
862 | explicitFileType
863 | archive.ar
864 | includeInIndex
865 | 0
866 | isa
867 | PBXFileReference
868 | path
869 | libPods-JFImageSavePanelExample.a
870 | sourceTree
871 | BUILT_PRODUCTS_DIR
872 |
873 | FDF4EA3F0F415CEB1A9457AC
874 |
875 | includeInIndex
876 | 1
877 | isa
878 | PBXFileReference
879 | lastKnownFileType
880 | text.xcconfig
881 | name
882 | Pods-JFImageSavePanelExample.debug.xcconfig
883 | path
884 | Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample.debug.xcconfig
885 | sourceTree
886 | <group>
887 |
888 |
889 | rootObject
890 | 963A0A941A31EA4100CAB89E
891 |
892 |
893 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // JFImageSavePanelExample
4 | //
5 | // Created by Jason Frame on 05/12/2014.
6 | // Copyright (c) 2014 Jason Frame. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : NSObject
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // JFImageSavePanelExample
4 | //
5 | // Created by Jason Frame on 05/12/2014.
6 | // Copyright (c) 2014 Jason Frame. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "JFImageSavePanel.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @property (weak) IBOutlet NSWindow *window;
15 | @end
16 |
17 | @implementation AppDelegate
18 |
19 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { }
20 |
21 | - (IBAction)showSavePanel:(id)sender
22 | {
23 | JFImageSavePanel *panel = [JFImageSavePanel savePanel];
24 |
25 | NSImage *image = [[NSImage alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Double-alaskan-rainbow.jpg/400px-Double-alaskan-rainbow.jpg"]];
26 |
27 | //panel.imageType = kUTTypeJPEG;
28 | [panel runModalForImage:image error:NULL];
29 |
30 | //Alternatives:
31 |
32 | /*[panel beginWithImage:image completionHandler:^(NSInteger result) {
33 | //Do something
34 | NSLog(@"Done!");
35 | }];*/
36 |
37 | /*[panel beginSheetWithImage:image window:_window completionHandler:^(NSInteger result) {
38 | //Do something
39 | NSLog(@"Done!");
40 | }];*/
41 | }
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.onehackoranother.$(PRODUCT_NAME:rfc1034identifier)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2014 Jason Frame. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExample/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // JFImageSavePanelExample
4 | //
5 | // Created by Jason Frame on 05/12/2014.
6 | // Copyright (c) 2014 Jason Frame. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, const char * argv[]) {
12 | return NSApplicationMain(argc, argv);
13 | }
14 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.onehackoranother.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Example/JFImageSavePanelExampleTests/JFImageSavePanelExampleTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // JFImageSavePanelExampleTests.m
3 | // JFImageSavePanelExampleTests
4 | //
5 | // Created by Jason Frame on 05/12/2014.
6 | // Copyright (c) 2014 Jason Frame. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface JFImageSavePanelExampleTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation JFImageSavePanelExampleTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | source 'https://github.com/CocoaPods/Specs.git'
2 |
3 | target 'JFImageSavePanelExample', :exclusive => true do
4 | pod "JFImageSavePanel", :path => "../"
5 | end
6 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - JFImageSavePanel (0.1.0)
3 |
4 | DEPENDENCIES:
5 | - JFImageSavePanel (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | JFImageSavePanel:
9 | :path: ../
10 |
11 | SPEC CHECKSUMS:
12 | JFImageSavePanel: 324129f3259b99ecad5a62d5d6ff5c6a707f7b02
13 |
14 | COCOAPODS: 0.35.0
15 |
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/JFImageSavePanel/JFImageSavePanel.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/JFImageSavePanel.h
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/JFImageSavePanel.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod lib lint JFImageSavePanel.podspec' to ensure this is a
3 | # valid spec and remove all comments before submitting the spec.
4 | #
5 | # Any lines starting with a # are optional, but encouraged
6 | #
7 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
8 | #
9 |
10 | Pod::Spec.new do |s|
11 | s.name = "JFImageSavePanel"
12 | s.version = "0.1.0"
13 | s.summary = "NSSavePanel wrapper for image save dialogs, similar to those in Preview.app"
14 | s.description = ""
15 | s.homepage = "https://github.com/jaz303/JFImageSavePanel"
16 | s.screenshots = "https://github.com/sebj/JFImageSavePanel/raw/master/screenshot.png"
17 | s.license = 'MIT'
18 | s.author = { "Jason Frame" => "jason@onehackoranother.com" }
19 | s.source = { :git => "https://github.com/jaz303/JFImageSavePanel.git", :tag => s.version.to_s }
20 | s.social_media_url = 'https://twitter.com/jaz303'
21 |
22 | s.platform = :osx
23 | s.requires_arc = true
24 |
25 | s.source_files = 'Pod/Classes'
26 | s.resources = ['Pod/Assets/*.xib']
27 |
28 | # s.public_header_files = 'Pod/Classes/**/*.h'
29 | # s.frameworks = 'UIKit', 'MapKit'
30 | # s.dependency 'AFNetworking', '~> 2.3'
31 | end
32 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - JFImageSavePanel (0.1.0)
3 |
4 | DEPENDENCIES:
5 | - JFImageSavePanel (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | JFImageSavePanel:
9 | :path: ../
10 |
11 | SPEC CHECKSUMS:
12 | JFImageSavePanel: 324129f3259b99ecad5a62d5d6ff5c6a707f7b02
13 |
14 | COCOAPODS: 0.35.0
15 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | archiveVersion
6 | 1
7 | classes
8 |
9 | objectVersion
10 | 46
11 | objects
12 |
13 | 040976192CA49536FDD807A6
14 |
15 | fileRef
16 | 867FA166F4ADF2EF6C7328D1
17 | isa
18 | PBXBuildFile
19 |
20 | 056FC8A82D026607C0E901A6
21 |
22 | explicitFileType
23 | archive.ar
24 | includeInIndex
25 | 0
26 | isa
27 | PBXFileReference
28 | path
29 | libPods-JFImageSavePanelExample.a
30 | sourceTree
31 | BUILT_PRODUCTS_DIR
32 |
33 | 14711E2CC25A7260A166FF60
34 |
35 | includeInIndex
36 | 1
37 | isa
38 | PBXFileReference
39 | lastKnownFileType
40 | sourcecode.c.objc
41 | path
42 | Pods-JFImageSavePanelExample-JFImageSavePanel-dummy.m
43 | sourceTree
44 | <group>
45 |
46 | 1BB9BB91711BB0B933F332A5
47 |
48 | includeInIndex
49 | 1
50 | isa
51 | PBXFileReference
52 | lastKnownFileType
53 | file.xib
54 | name
55 | JFImageSavePanelAccessoryView.xib
56 | path
57 | Pod/Assets/JFImageSavePanelAccessoryView.xib
58 | sourceTree
59 | <group>
60 |
61 | 1CCAAB80AC3D0CB30838C97F
62 |
63 | children
64 |
65 | 1BB9BB91711BB0B933F332A5
66 |
67 | isa
68 | PBXGroup
69 | name
70 | Resources
71 | sourceTree
72 | <group>
73 |
74 | 224CD9EE9A70D843F675532F
75 |
76 | buildActionMask
77 | 2147483647
78 | files
79 |
80 | 49EB5C74D201D171FD257585
81 |
82 | isa
83 | PBXFrameworksBuildPhase
84 | runOnlyForDeploymentPostprocessing
85 | 0
86 |
87 | 2864DECF19982491C8C843EF
88 |
89 | containerPortal
90 | 5B47E95B979E064B73CDE070
91 | isa
92 | PBXContainerItemProxy
93 | proxyType
94 | 1
95 | remoteGlobalIDString
96 | 8DBF7AC23FDEB52EC41C1120
97 | remoteInfo
98 | Pods-JFImageSavePanelExample-JFImageSavePanel
99 |
100 | 2D831FDF2A2050C3DE3BBFE3
101 |
102 | children
103 |
104 | 79F4B318E857D415D7990889
105 |
106 | isa
107 | PBXGroup
108 | name
109 | Frameworks
110 | sourceTree
111 | <group>
112 |
113 | 2EA5EE725A28EA8A526C5336
114 |
115 | baseConfigurationReference
116 | B88162E4C271B75C875C3367
117 | buildSettings
118 |
119 | ALWAYS_SEARCH_USER_PATHS
120 | NO
121 | COMBINE_HIDPI_IMAGES
122 | YES
123 | COPY_PHASE_STRIP
124 | YES
125 | DEBUG_INFORMATION_FORMAT
126 | dwarf-with-dsym
127 | DSTROOT
128 | /tmp/xcodeproj.dst
129 | GCC_ENABLE_OBJC_EXCEPTIONS
130 | YES
131 | GCC_PRECOMPILE_PREFIX_HEADER
132 | YES
133 | GCC_PREFIX_HEADER
134 | Target Support Files/Pods-JFImageSavePanelExample-JFImageSavePanel/Pods-JFImageSavePanelExample-JFImageSavePanel-prefix.pch
135 | GCC_VERSION
136 | com.apple.compilers.llvm.clang.1_0
137 | INSTALL_PATH
138 | $(BUILT_PRODUCTS_DIR)
139 | MACOSX_DEPLOYMENT_TARGET
140 | 10.9
141 | OTHER_CFLAGS
142 |
143 | -DNS_BLOCK_ASSERTIONS=1
144 | $(inherited)
145 |
146 | OTHER_CPLUSPLUSFLAGS
147 |
148 | -DNS_BLOCK_ASSERTIONS=1
149 | $(inherited)
150 |
151 | OTHER_LDFLAGS
152 |
153 | OTHER_LIBTOOLFLAGS
154 |
155 | PRODUCT_NAME
156 | $(TARGET_NAME)
157 | SDKROOT
158 | macosx
159 | SKIP_INSTALL
160 | YES
161 |
162 | isa
163 | XCBuildConfiguration
164 | name
165 | Release
166 |
167 | 3180E0505D630C9830DD5BC1
168 |
169 | isa
170 | PBXTargetDependency
171 | name
172 | Pods-JFImageSavePanelExample-JFImageSavePanel
173 | target
174 | 8DBF7AC23FDEB52EC41C1120
175 | targetProxy
176 | 2864DECF19982491C8C843EF
177 |
178 | 36CA196FEF7D853A1181E823
179 |
180 | includeInIndex
181 | 1
182 | isa
183 | PBXFileReference
184 | lastKnownFileType
185 | sourcecode.c.h
186 | path
187 | Pods-JFImageSavePanelExample-JFImageSavePanel-prefix.pch
188 | sourceTree
189 | <group>
190 |
191 | 3D9B1BFB16203FBE365BFF82
192 |
193 | children
194 |
195 | 056FC8A82D026607C0E901A6
196 | CDFEBC838CD0858C246790C2
197 |
198 | isa
199 | PBXGroup
200 | name
201 | Products
202 | sourceTree
203 | <group>
204 |
205 | 3DD23DB9F95891B2E9818ADF
206 |
207 | children
208 |
209 | F5BD7E98E54E7E18579CE633
210 |
211 | isa
212 | PBXGroup
213 | name
214 | Development Pods
215 | sourceTree
216 | <group>
217 |
218 | 45C8A488F070A5784271B809
219 |
220 | includeInIndex
221 | 1
222 | isa
223 | PBXFileReference
224 | lastKnownFileType
225 | text
226 | name
227 | Podfile
228 | path
229 | ../Podfile
230 | sourceTree
231 | SOURCE_ROOT
232 | xcLanguageSpecificationIdentifier
233 | xcode.lang.ruby
234 |
235 | 48A46D22FCD75BA18BC64FC9
236 |
237 | buildSettings
238 |
239 | ALWAYS_SEARCH_USER_PATHS
240 | NO
241 | CLANG_CXX_LANGUAGE_STANDARD
242 | gnu++0x
243 | CLANG_CXX_LIBRARY
244 | libc++
245 | CLANG_ENABLE_MODULES
246 | YES
247 | CLANG_ENABLE_OBJC_ARC
248 | YES
249 | CLANG_WARN_BOOL_CONVERSION
250 | YES
251 | CLANG_WARN_CONSTANT_CONVERSION
252 | YES
253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE
254 | YES
255 | CLANG_WARN_EMPTY_BODY
256 | YES
257 | CLANG_WARN_ENUM_CONVERSION
258 | YES
259 | CLANG_WARN_INT_CONVERSION
260 | YES
261 | CLANG_WARN_OBJC_ROOT_CLASS
262 | YES
263 | COPY_PHASE_STRIP
264 | NO
265 | ENABLE_NS_ASSERTIONS
266 | NO
267 | GCC_C_LANGUAGE_STANDARD
268 | gnu99
269 | GCC_PREPROCESSOR_DEFINITIONS
270 |
271 | RELEASE=1
272 |
273 | GCC_WARN_64_TO_32_BIT_CONVERSION
274 | YES
275 | GCC_WARN_ABOUT_RETURN_TYPE
276 | YES
277 | GCC_WARN_UNDECLARED_SELECTOR
278 | YES
279 | GCC_WARN_UNINITIALIZED_AUTOS
280 | YES
281 | GCC_WARN_UNUSED_FUNCTION
282 | YES
283 | GCC_WARN_UNUSED_VARIABLE
284 | YES
285 | MACOSX_DEPLOYMENT_TARGET
286 | 10.9
287 | STRIP_INSTALLED_PRODUCT
288 | NO
289 | VALIDATE_PRODUCT
290 | YES
291 |
292 | isa
293 | XCBuildConfiguration
294 | name
295 | Release
296 |
297 | 49EB5C74D201D171FD257585
298 |
299 | fileRef
300 | 867FA166F4ADF2EF6C7328D1
301 | isa
302 | PBXBuildFile
303 |
304 | 4CD56B56062876F2F16E9FC8
305 |
306 | buildSettings
307 |
308 | ALWAYS_SEARCH_USER_PATHS
309 | NO
310 | CLANG_CXX_LANGUAGE_STANDARD
311 | gnu++0x
312 | CLANG_CXX_LIBRARY
313 | libc++
314 | CLANG_ENABLE_MODULES
315 | YES
316 | CLANG_ENABLE_OBJC_ARC
317 | YES
318 | CLANG_WARN_BOOL_CONVERSION
319 | YES
320 | CLANG_WARN_CONSTANT_CONVERSION
321 | YES
322 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE
323 | YES
324 | CLANG_WARN_EMPTY_BODY
325 | YES
326 | CLANG_WARN_ENUM_CONVERSION
327 | YES
328 | CLANG_WARN_INT_CONVERSION
329 | YES
330 | CLANG_WARN_OBJC_ROOT_CLASS
331 | YES
332 | COPY_PHASE_STRIP
333 | YES
334 | GCC_C_LANGUAGE_STANDARD
335 | gnu99
336 | GCC_DYNAMIC_NO_PIC
337 | NO
338 | GCC_OPTIMIZATION_LEVEL
339 | 0
340 | GCC_PREPROCESSOR_DEFINITIONS
341 |
342 | DEBUG=1
343 | $(inherited)
344 |
345 | GCC_SYMBOLS_PRIVATE_EXTERN
346 | NO
347 | GCC_WARN_64_TO_32_BIT_CONVERSION
348 | YES
349 | GCC_WARN_ABOUT_RETURN_TYPE
350 | YES
351 | GCC_WARN_UNDECLARED_SELECTOR
352 | YES
353 | GCC_WARN_UNINITIALIZED_AUTOS
354 | YES
355 | GCC_WARN_UNUSED_FUNCTION
356 | YES
357 | GCC_WARN_UNUSED_VARIABLE
358 | YES
359 | MACOSX_DEPLOYMENT_TARGET
360 | 10.9
361 | ONLY_ACTIVE_ARCH
362 | YES
363 | STRIP_INSTALLED_PRODUCT
364 | NO
365 |
366 | isa
367 | XCBuildConfiguration
368 | name
369 | Debug
370 |
371 | 4FE147D3CC416CDBD8AC6233
372 |
373 | includeInIndex
374 | 1
375 | isa
376 | PBXFileReference
377 | lastKnownFileType
378 | sourcecode.c.h
379 | name
380 | JFImageSavePanel.h
381 | path
382 | Pod/Classes/JFImageSavePanel.h
383 | sourceTree
384 | <group>
385 |
386 | 5120678AA3269A6316029DBD
387 |
388 | baseConfigurationReference
389 | 7398516D195FF910C75E5DD9
390 | buildSettings
391 |
392 | ALWAYS_SEARCH_USER_PATHS
393 | NO
394 | COMBINE_HIDPI_IMAGES
395 | YES
396 | COPY_PHASE_STRIP
397 | NO
398 | DSTROOT
399 | /tmp/xcodeproj.dst
400 | GCC_DYNAMIC_NO_PIC
401 | NO
402 | GCC_ENABLE_OBJC_EXCEPTIONS
403 | YES
404 | GCC_OPTIMIZATION_LEVEL
405 | 0
406 | GCC_PRECOMPILE_PREFIX_HEADER
407 | YES
408 | GCC_PREPROCESSOR_DEFINITIONS
409 |
410 | DEBUG=1
411 | $(inherited)
412 |
413 | GCC_SYMBOLS_PRIVATE_EXTERN
414 | NO
415 | GCC_VERSION
416 | com.apple.compilers.llvm.clang.1_0
417 | INSTALL_PATH
418 | $(BUILT_PRODUCTS_DIR)
419 | MACOSX_DEPLOYMENT_TARGET
420 | 10.9
421 | OTHER_LDFLAGS
422 |
423 | OTHER_LIBTOOLFLAGS
424 |
425 | PRODUCT_NAME
426 | $(TARGET_NAME)
427 | SDKROOT
428 | macosx
429 | SKIP_INSTALL
430 | YES
431 |
432 | isa
433 | XCBuildConfiguration
434 | name
435 | Debug
436 |
437 | 5B47E95B979E064B73CDE070
438 |
439 | attributes
440 |
441 | LastUpgradeCheck
442 | 0510
443 |
444 | buildConfigurationList
445 | FE8A861BFF6063935C84ACDA
446 | compatibilityVersion
447 | Xcode 3.2
448 | developmentRegion
449 | English
450 | hasScannedForEncodings
451 | 0
452 | isa
453 | PBXProject
454 | knownRegions
455 |
456 | en
457 |
458 | mainGroup
459 | F9DA742149EA7155E6667D87
460 | productRefGroup
461 | 3D9B1BFB16203FBE365BFF82
462 | projectDirPath
463 |
464 | projectReferences
465 |
466 | projectRoot
467 |
468 | targets
469 |
470 | F15FADFE7F72C5D56210A31C
471 | 8DBF7AC23FDEB52EC41C1120
472 |
473 |
474 | 5BBA305354B9324830216A08
475 |
476 | fileRef
477 | 70A3F5BDEC7B1BC3975FDC4F
478 | isa
479 | PBXBuildFile
480 | settings
481 |
482 | COMPILER_FLAGS
483 | -DOS_OBJECT_USE_OBJC=0
484 |
485 |
486 | 5E59E7DD40A479220B767186
487 |
488 | includeInIndex
489 | 1
490 | isa
491 | PBXFileReference
492 | lastKnownFileType
493 | text
494 | path
495 | Pods-JFImageSavePanelExample-acknowledgements.markdown
496 | sourceTree
497 | <group>
498 |
499 | 5EDDE8A1E45BBAB2AB3D7116
500 |
501 | includeInIndex
502 | 1
503 | isa
504 | PBXFileReference
505 | lastKnownFileType
506 | text.script.sh
507 | path
508 | Pods-JFImageSavePanelExample-resources.sh
509 | sourceTree
510 | <group>
511 |
512 | 609C7C41F321BD01927B2986
513 |
514 | children
515 |
516 | 970305C027AC24C31E962B33
517 |
518 | isa
519 | PBXGroup
520 | name
521 | Targets Support Files
522 | sourceTree
523 | <group>
524 |
525 | 6F89B16F7609DF7595AFB88D
526 |
527 | includeInIndex
528 | 1
529 | isa
530 | PBXFileReference
531 | lastKnownFileType
532 | text.xcconfig
533 | path
534 | Pods-JFImageSavePanelExample.release.xcconfig
535 | sourceTree
536 | <group>
537 |
538 | 70A3F5BDEC7B1BC3975FDC4F
539 |
540 | includeInIndex
541 | 1
542 | isa
543 | PBXFileReference
544 | lastKnownFileType
545 | sourcecode.c.objc
546 | name
547 | JFImageSavePanel.m
548 | path
549 | Pod/Classes/JFImageSavePanel.m
550 | sourceTree
551 | <group>
552 |
553 | 7398516D195FF910C75E5DD9
554 |
555 | includeInIndex
556 | 1
557 | isa
558 | PBXFileReference
559 | lastKnownFileType
560 | text.xcconfig
561 | path
562 | Pods-JFImageSavePanelExample.debug.xcconfig
563 | sourceTree
564 | <group>
565 |
566 | 79F4B318E857D415D7990889
567 |
568 | children
569 |
570 | 867FA166F4ADF2EF6C7328D1
571 |
572 | isa
573 | PBXGroup
574 | name
575 | OS X
576 | sourceTree
577 | <group>
578 |
579 | 7ED40A287AB3D2874160AE63
580 |
581 | buildConfigurations
582 |
583 | 957C2E101ADAA6D1659ED937
584 | 2EA5EE725A28EA8A526C5336
585 |
586 | defaultConfigurationIsVisible
587 | 0
588 | defaultConfigurationName
589 | Release
590 | isa
591 | XCConfigurationList
592 |
593 | 867FA166F4ADF2EF6C7328D1
594 |
595 | isa
596 | PBXFileReference
597 | lastKnownFileType
598 | wrapper.framework
599 | name
600 | Cocoa.framework
601 | path
602 | Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Cocoa.framework
603 | sourceTree
604 | DEVELOPER_DIR
605 |
606 | 899383909FD2087D3A56994E
607 |
608 | buildActionMask
609 | 2147483647
610 | files
611 |
612 | DD769EF9D383DF6F08FBC1ED
613 |
614 | isa
615 | PBXHeadersBuildPhase
616 | runOnlyForDeploymentPostprocessing
617 | 0
618 |
619 | 8DBF7AC23FDEB52EC41C1120
620 |
621 | buildConfigurationList
622 | 7ED40A287AB3D2874160AE63
623 | buildPhases
624 |
625 | B372F29DD387B5B5EFB737CE
626 | 224CD9EE9A70D843F675532F
627 | 899383909FD2087D3A56994E
628 |
629 | buildRules
630 |
631 | dependencies
632 |
633 | isa
634 | PBXNativeTarget
635 | name
636 | Pods-JFImageSavePanelExample-JFImageSavePanel
637 | productName
638 | Pods-JFImageSavePanelExample-JFImageSavePanel
639 | productReference
640 | CDFEBC838CD0858C246790C2
641 | productType
642 | com.apple.product-type.library.static
643 |
644 | 9515812CDC7A6D5C1B8A26CD
645 |
646 | includeInIndex
647 | 1
648 | isa
649 | PBXFileReference
650 | lastKnownFileType
651 | sourcecode.c.h
652 | path
653 | Pods-JFImageSavePanelExample-environment.h
654 | sourceTree
655 | <group>
656 |
657 | 957C2E101ADAA6D1659ED937
658 |
659 | baseConfigurationReference
660 | B88162E4C271B75C875C3367
661 | buildSettings
662 |
663 | ALWAYS_SEARCH_USER_PATHS
664 | NO
665 | COMBINE_HIDPI_IMAGES
666 | YES
667 | COPY_PHASE_STRIP
668 | NO
669 | DSTROOT
670 | /tmp/xcodeproj.dst
671 | GCC_DYNAMIC_NO_PIC
672 | NO
673 | GCC_ENABLE_OBJC_EXCEPTIONS
674 | YES
675 | GCC_OPTIMIZATION_LEVEL
676 | 0
677 | GCC_PRECOMPILE_PREFIX_HEADER
678 | YES
679 | GCC_PREFIX_HEADER
680 | Target Support Files/Pods-JFImageSavePanelExample-JFImageSavePanel/Pods-JFImageSavePanelExample-JFImageSavePanel-prefix.pch
681 | GCC_PREPROCESSOR_DEFINITIONS
682 |
683 | DEBUG=1
684 | $(inherited)
685 |
686 | GCC_SYMBOLS_PRIVATE_EXTERN
687 | NO
688 | GCC_VERSION
689 | com.apple.compilers.llvm.clang.1_0
690 | INSTALL_PATH
691 | $(BUILT_PRODUCTS_DIR)
692 | MACOSX_DEPLOYMENT_TARGET
693 | 10.9
694 | OTHER_LDFLAGS
695 |
696 | OTHER_LIBTOOLFLAGS
697 |
698 | PRODUCT_NAME
699 | $(TARGET_NAME)
700 | SDKROOT
701 | macosx
702 | SKIP_INSTALL
703 | YES
704 |
705 | isa
706 | XCBuildConfiguration
707 | name
708 | Debug
709 |
710 | 970305C027AC24C31E962B33
711 |
712 | children
713 |
714 | 5E59E7DD40A479220B767186
715 | CE8E49463B910E92D10D0E98
716 | E9F270CA7410444782E0BA28
717 | 9515812CDC7A6D5C1B8A26CD
718 | 5EDDE8A1E45BBAB2AB3D7116
719 | 7398516D195FF910C75E5DD9
720 | 6F89B16F7609DF7595AFB88D
721 |
722 | isa
723 | PBXGroup
724 | name
725 | Pods-JFImageSavePanelExample
726 | path
727 | Target Support Files/Pods-JFImageSavePanelExample
728 | sourceTree
729 | <group>
730 |
731 | A0DC8BF71EBF6B31C601C193
732 |
733 | buildActionMask
734 | 2147483647
735 | files
736 |
737 | A2CC296A210F71EE0410D1F5
738 |
739 | isa
740 | PBXSourcesBuildPhase
741 | runOnlyForDeploymentPostprocessing
742 | 0
743 |
744 | A2CC296A210F71EE0410D1F5
745 |
746 | fileRef
747 | E9F270CA7410444782E0BA28
748 | isa
749 | PBXBuildFile
750 |
751 | B372F29DD387B5B5EFB737CE
752 |
753 | buildActionMask
754 | 2147483647
755 | files
756 |
757 | 5BBA305354B9324830216A08
758 | DFDE0034713A467861AFE410
759 |
760 | isa
761 | PBXSourcesBuildPhase
762 | runOnlyForDeploymentPostprocessing
763 | 0
764 |
765 | B88162E4C271B75C875C3367
766 |
767 | includeInIndex
768 | 1
769 | isa
770 | PBXFileReference
771 | lastKnownFileType
772 | text.xcconfig
773 | path
774 | Pods-JFImageSavePanelExample-JFImageSavePanel-Private.xcconfig
775 | sourceTree
776 | <group>
777 |
778 | C98F9AFE22C6C8731ED1F65B
779 |
780 | buildConfigurations
781 |
782 | 5120678AA3269A6316029DBD
783 | D2EE2019CADF6314295F4D00
784 |
785 | defaultConfigurationIsVisible
786 | 0
787 | defaultConfigurationName
788 | Release
789 | isa
790 | XCConfigurationList
791 |
792 | CDFEBC838CD0858C246790C2
793 |
794 | explicitFileType
795 | archive.ar
796 | includeInIndex
797 | 0
798 | isa
799 | PBXFileReference
800 | path
801 | libPods-JFImageSavePanelExample-JFImageSavePanel.a
802 | sourceTree
803 | BUILT_PRODUCTS_DIR
804 |
805 | CE8E49463B910E92D10D0E98
806 |
807 | includeInIndex
808 | 1
809 | isa
810 | PBXFileReference
811 | lastKnownFileType
812 | text.plist.xml
813 | path
814 | Pods-JFImageSavePanelExample-acknowledgements.plist
815 | sourceTree
816 | <group>
817 |
818 | CEEE95D4259ED14AA30CBF8B
819 |
820 | includeInIndex
821 | 1
822 | isa
823 | PBXFileReference
824 | lastKnownFileType
825 | text.xcconfig
826 | path
827 | Pods-JFImageSavePanelExample-JFImageSavePanel.xcconfig
828 | sourceTree
829 | <group>
830 |
831 | D2EE2019CADF6314295F4D00
832 |
833 | baseConfigurationReference
834 | 6F89B16F7609DF7595AFB88D
835 | buildSettings
836 |
837 | ALWAYS_SEARCH_USER_PATHS
838 | NO
839 | COMBINE_HIDPI_IMAGES
840 | YES
841 | COPY_PHASE_STRIP
842 | YES
843 | DEBUG_INFORMATION_FORMAT
844 | dwarf-with-dsym
845 | DSTROOT
846 | /tmp/xcodeproj.dst
847 | GCC_ENABLE_OBJC_EXCEPTIONS
848 | YES
849 | GCC_PRECOMPILE_PREFIX_HEADER
850 | YES
851 | GCC_VERSION
852 | com.apple.compilers.llvm.clang.1_0
853 | INSTALL_PATH
854 | $(BUILT_PRODUCTS_DIR)
855 | MACOSX_DEPLOYMENT_TARGET
856 | 10.9
857 | OTHER_CFLAGS
858 |
859 | -DNS_BLOCK_ASSERTIONS=1
860 | $(inherited)
861 |
862 | OTHER_CPLUSPLUSFLAGS
863 |
864 | -DNS_BLOCK_ASSERTIONS=1
865 | $(inherited)
866 |
867 | OTHER_LDFLAGS
868 |
869 | OTHER_LIBTOOLFLAGS
870 |
871 | PRODUCT_NAME
872 | $(TARGET_NAME)
873 | SDKROOT
874 | macosx
875 | SKIP_INSTALL
876 | YES
877 |
878 | isa
879 | XCBuildConfiguration
880 | name
881 | Release
882 |
883 | DD769EF9D383DF6F08FBC1ED
884 |
885 | fileRef
886 | 4FE147D3CC416CDBD8AC6233
887 | isa
888 | PBXBuildFile
889 |
890 | DFDE0034713A467861AFE410
891 |
892 | fileRef
893 | 14711E2CC25A7260A166FF60
894 | isa
895 | PBXBuildFile
896 |
897 | E9F270CA7410444782E0BA28
898 |
899 | includeInIndex
900 | 1
901 | isa
902 | PBXFileReference
903 | lastKnownFileType
904 | sourcecode.c.objc
905 | path
906 | Pods-JFImageSavePanelExample-dummy.m
907 | sourceTree
908 | <group>
909 |
910 | F131FE5BE33E3A221A22EB35
911 |
912 | children
913 |
914 | CEEE95D4259ED14AA30CBF8B
915 | B88162E4C271B75C875C3367
916 | 14711E2CC25A7260A166FF60
917 | 36CA196FEF7D853A1181E823
918 |
919 | isa
920 | PBXGroup
921 | name
922 | Support Files
923 | path
924 | Example/Pods/Target Support Files/Pods-JFImageSavePanelExample-JFImageSavePanel
925 | sourceTree
926 | <group>
927 |
928 | F15FADFE7F72C5D56210A31C
929 |
930 | buildConfigurationList
931 | C98F9AFE22C6C8731ED1F65B
932 | buildPhases
933 |
934 | A0DC8BF71EBF6B31C601C193
935 | FA6088D62DC2001F6F7920F5
936 |
937 | buildRules
938 |
939 | dependencies
940 |
941 | 3180E0505D630C9830DD5BC1
942 |
943 | isa
944 | PBXNativeTarget
945 | name
946 | Pods-JFImageSavePanelExample
947 | productName
948 | Pods-JFImageSavePanelExample
949 | productReference
950 | 056FC8A82D026607C0E901A6
951 | productType
952 | com.apple.product-type.library.static
953 |
954 | F5BD7E98E54E7E18579CE633
955 |
956 | children
957 |
958 | 4FE147D3CC416CDBD8AC6233
959 | 70A3F5BDEC7B1BC3975FDC4F
960 | 1CCAAB80AC3D0CB30838C97F
961 | F131FE5BE33E3A221A22EB35
962 |
963 | isa
964 | PBXGroup
965 | name
966 | JFImageSavePanel
967 | path
968 | ../..
969 | sourceTree
970 | <group>
971 |
972 | F9DA742149EA7155E6667D87
973 |
974 | children
975 |
976 | 45C8A488F070A5784271B809
977 | 3DD23DB9F95891B2E9818ADF
978 | 2D831FDF2A2050C3DE3BBFE3
979 | 3D9B1BFB16203FBE365BFF82
980 | 609C7C41F321BD01927B2986
981 |
982 | isa
983 | PBXGroup
984 | sourceTree
985 | <group>
986 |
987 | FA6088D62DC2001F6F7920F5
988 |
989 | buildActionMask
990 | 2147483647
991 | files
992 |
993 | 040976192CA49536FDD807A6
994 |
995 | isa
996 | PBXFrameworksBuildPhase
997 | runOnlyForDeploymentPostprocessing
998 | 0
999 |
1000 | FE8A861BFF6063935C84ACDA
1001 |
1002 | buildConfigurations
1003 |
1004 | 4CD56B56062876F2F16E9FC8
1005 | 48A46D22FCD75BA18BC64FC9
1006 |
1007 | defaultConfigurationIsVisible
1008 | 0
1009 | defaultConfigurationName
1010 | Release
1011 | isa
1012 | XCConfigurationList
1013 |
1014 |
1015 | rootObject
1016 | 5B47E95B979E064B73CDE070
1017 |
1018 |
1019 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample-JFImageSavePanel/Pods-JFImageSavePanelExample-JFImageSavePanel-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods-JFImageSavePanelExample-JFImageSavePanel.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/JFImageSavePanel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JFImageSavePanel"
4 | OTHER_LDFLAGS = -ObjC
5 | PODS_ROOT = ${SRCROOT}
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample-JFImageSavePanel/Pods-JFImageSavePanelExample-JFImageSavePanel-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_JFImageSavePanelExample_JFImageSavePanel : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_JFImageSavePanelExample_JFImageSavePanel
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample-JFImageSavePanel/Pods-JFImageSavePanelExample-JFImageSavePanel-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "Pods-JFImageSavePanelExample-environment.h"
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample-JFImageSavePanel/Pods-JFImageSavePanelExample-JFImageSavePanel.xcconfig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaz303/JFImageSavePanel/34b057bfb09f1ac22cb5b9fa45c5ea674023df0d/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample-JFImageSavePanel/Pods-JFImageSavePanelExample-JFImageSavePanel.xcconfig
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## JFImageSavePanel
5 |
6 | Copyright (c) 2014 Jason Frame
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 | Generated by CocoaPods - http://cocoapods.org
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Copyright (c) 2014 Jason Frame <jason@onehackoranother.com>
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 |
37 | Title
38 | JFImageSavePanel
39 | Type
40 | PSGroupSpecifier
41 |
42 |
43 | FooterText
44 | Generated by CocoaPods - http://cocoapods.org
45 | Title
46 |
47 | Type
48 | PSGroupSpecifier
49 |
50 |
51 | StringsTable
52 | Acknowledgements
53 | Title
54 | Acknowledgements
55 |
56 |
57 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_JFImageSavePanelExample : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_JFImageSavePanelExample
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample-environment.h:
--------------------------------------------------------------------------------
1 |
2 | // To check if a library is compiled with CocoaPods you
3 | // can use the `COCOAPODS` macro definition which is
4 | // defined in the xcconfigs so it is available in
5 | // headers also when they are imported in the client
6 | // project.
7 |
8 |
9 | // JFImageSavePanel
10 | #define COCOAPODS_POD_AVAILABLE_JFImageSavePanel
11 | #define COCOAPODS_VERSION_MAJOR_JFImageSavePanel 0
12 | #define COCOAPODS_VERSION_MINOR_JFImageSavePanel 1
13 | #define COCOAPODS_VERSION_PATCH_JFImageSavePanel 0
14 |
15 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
5 |
6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
7 | > "$RESOURCES_TO_COPY"
8 |
9 | install_resource()
10 | {
11 | case $1 in
12 | *.storyboard)
13 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
14 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
15 | ;;
16 | *.xib)
17 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
18 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
19 | ;;
20 | *.framework)
21 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
22 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
23 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
24 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
25 | ;;
26 | *.xcdatamodel)
27 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
28 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
29 | ;;
30 | *.xcdatamodeld)
31 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
32 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
33 | ;;
34 | *.xcmappingmodel)
35 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\""
36 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm"
37 | ;;
38 | *.xcassets)
39 | ;;
40 | /*)
41 | echo "$1"
42 | echo "$1" >> "$RESOURCES_TO_COPY"
43 | ;;
44 | *)
45 | echo "${PODS_ROOT}/$1"
46 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
47 | ;;
48 | esac
49 | }
50 | install_resource "../../Pod/Assets/JFImageSavePanelAccessoryView.xib"
51 |
52 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
53 | if [[ "${ACTION}" == "install" ]]; then
54 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
55 | fi
56 | rm -f "$RESOURCES_TO_COPY"
57 |
58 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
59 | then
60 | case "${TARGETED_DEVICE_FAMILY}" in
61 | 1,2)
62 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
63 | ;;
64 | 1)
65 | TARGET_DEVICE_ARGS="--target-device iphone"
66 | ;;
67 | 2)
68 | TARGET_DEVICE_ARGS="--target-device ipad"
69 | ;;
70 | *)
71 | TARGET_DEVICE_ARGS="--target-device mac"
72 | ;;
73 | esac
74 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
75 | fi
76 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JFImageSavePanel"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/JFImageSavePanel"
4 | OTHER_LDFLAGS = -ObjC -l"Pods-JFImageSavePanelExample-JFImageSavePanel"
5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
6 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-JFImageSavePanelExample/Pods-JFImageSavePanelExample.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JFImageSavePanel"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/JFImageSavePanel"
4 | OTHER_LDFLAGS = -ObjC -l"Pods-JFImageSavePanelExample-JFImageSavePanel"
5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
6 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/JFImageSavePanel.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "JFImageSavePanel"
3 | s.version = "1.0.4"
4 | s.summary = "NSSavePanel wrapper for image save dialogs"
5 | s.description = "An NSSavePanel wrapper for use with images, similar to Preview.app. Includes image type selector and, where applicable, output quality settings"
6 | s.homepage = "https://github.com/jaz303/JFImageSavePanel"
7 | s.screenshots = "https://github.com/sebj/JFImageSavePanel/raw/master/screenshot.png"
8 | s.license = 'MIT'
9 | s.author = { "Jason Frame" => "jason@onehackoranother.com" }
10 | s.source = { :git => "https://github.com/jaz303/JFImageSavePanel.git", :tag => s.version.to_s }
11 | s.social_media_url = 'https://twitter.com/jaz303'
12 |
13 | s.platform = :osx
14 | s.requires_arc = true
15 |
16 | s.source_files = 'Pod/Classes'
17 | s.resources = ['Pod/Assets/*.xib']
18 |
19 | # s.public_header_files = 'Pod/Classes/**/*.h'
20 | # s.frameworks = 'UIKit', 'MapKit'
21 | # s.dependency 'AFNetworking', '~> 2.3'
22 | end
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Jason Frame
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Pod/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaz303/JFImageSavePanel/34b057bfb09f1ac22cb5b9fa45c5ea674023df0d/Pod/Assets/.gitkeep
--------------------------------------------------------------------------------
/Pod/Assets/JFImageSavePanelAccessoryView.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 101000
5 | 13E28
6 | 6250
7 | 1265.21
8 | 698.00
9 |
13 |
14 | NSCustomObject
15 | NSCustomView
16 | NSMenu
17 | NSMenuItem
18 | NSPopUpButton
19 | NSPopUpButtonCell
20 | NSSlider
21 | NSSliderCell
22 | NSTextField
23 | NSTextFieldCell
24 |
25 |
26 | com.apple.InterfaceBuilder.CocoaPlugin
27 |
28 |
32 |
33 |
36 |
39 |
42 |
265 |
266 |
267 |
268 |
269 |
270 | fileTypes
271 |
272 |
273 |
274 | 22
275 |
276 |
277 |
278 | compressionFactor
279 |
280 |
281 |
282 | 23
283 |
284 |
285 |
286 | accessoryView
287 |
288 |
289 |
290 | 24
291 |
292 |
293 |
294 | compressionFactorLabel
295 |
296 |
297 |
298 | 29
299 |
300 |
301 |
302 | compressionLeastLabel
303 |
304 |
305 |
306 | 35
307 |
308 |
309 |
310 | compressionBestLabel
311 |
312 |
313 |
314 | 36
315 |
316 |
317 |
318 |
319 |
320 | 0
321 |
322 |
323 |
324 |
325 |
326 | -2
327 |
328 |
329 | File's Owner
330 |
331 |
332 | -1
333 |
334 |
335 | First Responder
336 |
337 |
338 | -3
339 |
340 |
341 | Application
342 |
343 |
344 | 1
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 | 2
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 | 3
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 | 4
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 | 5
385 |
386 |
387 |
388 |
389 | 7
390 |
391 |
392 |
393 |
394 | 8
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 | 9
403 |
404 |
405 |
406 |
407 | 10
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 | 11
416 |
417 |
418 |
419 |
420 | 12
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 | 13
429 |
430 |
431 |
432 |
433 | 15
434 |
435 |
436 |
437 |
438 | 30
439 |
440 |
441 |
442 |
443 | 31
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 | 32
452 |
453 |
454 |
455 |
456 | 33
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 | 34
465 |
466 |
467 |
468 |
469 |
470 |
471 | com.apple.InterfaceBuilder.CocoaPlugin
472 | com.apple.InterfaceBuilder.CocoaPlugin
473 | com.apple.InterfaceBuilder.CocoaPlugin
474 | com.apple.InterfaceBuilder.CocoaPlugin
475 | com.apple.InterfaceBuilder.CocoaPlugin
476 | com.apple.InterfaceBuilder.CocoaPlugin
477 | com.apple.InterfaceBuilder.CocoaPlugin
478 | com.apple.InterfaceBuilder.CocoaPlugin
479 | com.apple.InterfaceBuilder.CocoaPlugin
480 | com.apple.InterfaceBuilder.CocoaPlugin
481 | com.apple.InterfaceBuilder.CocoaPlugin
482 | com.apple.InterfaceBuilder.CocoaPlugin
483 | com.apple.InterfaceBuilder.CocoaPlugin
484 | com.apple.InterfaceBuilder.CocoaPlugin
485 | com.apple.InterfaceBuilder.CocoaPlugin
486 | com.apple.InterfaceBuilder.CocoaPlugin
487 | com.apple.InterfaceBuilder.CocoaPlugin
488 | com.apple.InterfaceBuilder.CocoaPlugin
489 | com.apple.InterfaceBuilder.CocoaPlugin
490 | com.apple.InterfaceBuilder.CocoaPlugin
491 | com.apple.InterfaceBuilder.CocoaPlugin
492 |
493 |
494 |
495 |
496 |
497 | 36
498 |
499 |
500 | 0
501 | IBCocoaFramework
502 | NO
503 |
504 | com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3
505 |
506 |
507 | YES
508 | 3
509 |
510 | {11, 11}
511 | {10, 3}
512 |
513 |
514 |
515 |
--------------------------------------------------------------------------------
/Pod/Classes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaz303/JFImageSavePanel/34b057bfb09f1ac22cb5b9fa45c5ea674023df0d/Pod/Classes/.gitkeep
--------------------------------------------------------------------------------
/Pod/Classes/JFImageSavePanel.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface JFImageSavePanel : NSObject
4 |
5 | /*
6 | * Defaults to "Save Image"
7 | */
8 | @property (retain,nonatomic) NSString *title;
9 |
10 | /*
11 | * Defaults to kUTTypePNG
12 | */
13 | @property (assign,nonatomic) const CFStringRef imageType;
14 |
15 | /*
16 | * Instantiates and returns a new save panel, not a singleton
17 | */
18 | + (JFImageSavePanel *)savePanel;
19 |
20 | - (NSInteger)runModalForImage:(NSImage *)image error:(NSError **)error;
21 | - (void)beginWithImage:(NSImage *)image completionHandler:(void (^)(NSInteger result))block;
22 |
23 | /*
24 | * Note that this method will not display a title
25 | */
26 | - (void)beginSheetWithImage:(NSImage *)image window:(NSWindow*)window completionHandler:(void (^)(NSInteger))block;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Pod/Classes/JFImageSavePanel.m:
--------------------------------------------------------------------------------
1 | #import "JFImageSavePanel.h"
2 |
3 | @interface JFImageSavePanel ()
4 |
5 | @property (retain) NSSavePanel *savePanel;
6 | @property (assign) IBOutlet NSView *accessoryView;
7 | @property (assign) IBOutlet NSPopUpButton *fileTypes;
8 | @property (assign) IBOutlet NSSlider *compressionFactor;
9 | @property (assign) IBOutlet NSTextField *compressionFactorLabel;
10 | @property (assign) IBOutlet NSTextField *compressionLeastLabel;
11 | @property (assign) IBOutlet NSTextField *compressionBestLabel;
12 |
13 | - (void)configureSavePanel;
14 | - (void)fileTypeChanged:(id)sender;
15 | - (void)saveImage:(NSImage *)image;
16 |
17 | @end
18 |
19 | #pragma mark -
20 |
21 | @implementation JFImageSavePanel
22 |
23 | @synthesize title, imageType;
24 | @synthesize savePanel, accessoryView, fileTypes, compressionFactor, compressionFactorLabel;
25 |
26 | + (JFImageSavePanel *)savePanel
27 | {
28 | JFImageSavePanel *panel = [[JFImageSavePanel alloc] init];
29 | return panel;
30 | }
31 |
32 | - (id)init
33 | {
34 | self = [super init];
35 | if (self) {
36 |
37 | self.title = @"Save Image";
38 | self.imageType = kUTTypePNG;
39 |
40 | self.savePanel = [NSSavePanel savePanel];
41 |
42 | NSNib *accessoryNib = [[NSNib alloc] initWithNibNamed:@"JFImageSavePanelAccessoryView" bundle:nil];
43 | [accessoryNib instantiateWithOwner:self topLevelObjects:nil];
44 |
45 | [self.fileTypes setTarget:self];
46 | [self.fileTypes setAction:@selector(fileTypeChanged:)];
47 |
48 | }
49 | return self;
50 | }
51 |
52 | - (void)dealloc
53 | {
54 | self.title = nil;
55 | self.savePanel = nil;
56 | }
57 |
58 | - (void)configureSavePanel
59 | {
60 | [self.savePanel setAccessoryView:self.accessoryView];
61 |
62 | [self.savePanel setCanCreateDirectories:YES];
63 | [self.savePanel setCanSelectHiddenExtension:YES];
64 | [self.savePanel setExtensionHidden:NO];
65 | [self.savePanel setAllowsOtherFileTypes:YES];
66 |
67 | [self.savePanel setTitle:self.title];
68 |
69 | [self.fileTypes selectItemAtIndex:-1];
70 | if (UTTypeEqual(self.imageType, kUTTypeJPEG)) {
71 | [self.fileTypes selectItemAtIndex:0];
72 | } else if (UTTypeEqual(self.imageType, kUTTypeJPEG2000)) {
73 | [self.fileTypes selectItemAtIndex:1];
74 | } else if (UTTypeEqual(self.imageType, kUTTypePNG)) {
75 | [self.fileTypes selectItemAtIndex:2];
76 | } else if (UTTypeEqual(self.imageType, kUTTypeTIFF)) {
77 | [self.fileTypes selectItemAtIndex:3];
78 | }
79 |
80 | [self fileTypeChanged:nil];
81 |
82 | }
83 |
84 | - (void)setCompressionSectionVisible:(BOOL)flag {
85 | //If flag, increase height to make visible, otherwise decrease height to hide it
86 | [[self.accessoryView animator] setFrameSize:NSMakeSize(self.accessoryView.frame.size.width, flag? 105.0f : 42.0f)];
87 | }
88 |
89 | - (void)fileTypeChanged:(id)sender
90 | {
91 | switch (self.fileTypes.indexOfSelectedItem) {
92 | case 0:
93 | {
94 | self.imageType = kUTTypeJPEG;
95 | self.compressionBestLabel.stringValue = @"Best";
96 | break;
97 | }
98 | case 1:
99 | {
100 | self.imageType = kUTTypeJPEG2000;
101 | self.compressionBestLabel.stringValue = @"Lossless";
102 | break;
103 | }
104 | case 2:
105 | {
106 | self.imageType = kUTTypePNG;
107 | break;
108 | }
109 | case 3: {
110 | self.imageType = kUTTypeTIFF;
111 | break;
112 | }
113 | }
114 |
115 | if (self.fileTypes.indexOfSelectedItem < 2) {
116 | //JPEG or JPEG2000
117 | [self setCompressionSectionVisible:YES];
118 | [self.compressionFactorLabel setTextColor:[NSColor controlTextColor]];
119 | } else {
120 | //PNG or TIFF
121 | [self setCompressionSectionVisible:NO];
122 | [self.compressionFactorLabel setTextColor:[NSColor disabledControlTextColor]];
123 | }
124 |
125 | [self.savePanel setAllowedFileTypes:@[(NSString*)self.imageType]];
126 |
127 |
128 | NSString *name = self.savePanel.nameFieldStringValue;
129 | NSString *nameWithoutExtension = [name stringByDeletingPathExtension];
130 |
131 | if (![name isEqualToString:nameWithoutExtension]) {
132 | //NSString *correctExtension = (__bridge NSString *)UTTypeCopyPreferredTagWithClass(self.imageType, kUTTagClassFilenameExtension);
133 | CFStringRef cfCorrectExtension = UTTypeCopyPreferredTagWithClass(self.imageType, kUTTagClassFilenameExtension);
134 | NSString *correctExtension = CFBridgingRelease(cfCorrectExtension);
135 | [self.savePanel setNameFieldStringValue:[nameWithoutExtension stringByAppendingPathExtension:correctExtension]];
136 | }
137 | }
138 |
139 | - (NSInteger)runModalForImage:(NSImage *)image error:(NSError **)error
140 | {
141 | [self configureSavePanel];
142 | NSInteger result = [self.savePanel runModal];
143 |
144 | if (result == NSFileHandlingPanelOKButton)
145 | [self saveImage:image];
146 |
147 | return result;
148 | }
149 |
150 | - (void)beginWithImage:(NSImage *)image completionHandler:(void (^)(NSInteger result))block
151 | {
152 | [self configureSavePanel];
153 | [self.savePanel beginWithCompletionHandler:^(NSInteger result) {
154 | if (result == NSFileHandlingPanelOKButton)
155 | [self saveImage:image];
156 |
157 | if (block)
158 | block(result);
159 | }];
160 | }
161 |
162 | - (void)beginSheetWithImage:(NSImage *)image window:(NSWindow*)window completionHandler:(void (^)(NSInteger))block
163 | {
164 | [self configureSavePanel];
165 |
166 | [self.savePanel beginSheetModalForWindow:window completionHandler:^(NSInteger result) {
167 | if (result == NSFileHandlingPanelOKButton)
168 | [self saveImage:image];
169 |
170 | if (block)
171 | block(result);
172 | }];
173 | }
174 |
175 | - (void)saveImage:(NSImage *)image
176 | {
177 | NSData *outData = nil;
178 | NSBitmapImageRep *bitmapRep = [NSBitmapImageRep imageRepWithData:image.TIFFRepresentation];
179 | CGFloat compression = self.compressionFactor.floatValue / 100.0f;
180 |
181 | if (UTTypeEqual(self.imageType, kUTTypeJPEG)) {
182 | //JPEG
183 | outData = [bitmapRep representationUsingType:NSJPEGFileType properties:@{NSImageCompressionFactor:@(compression)}];
184 | }
185 | else if (UTTypeEqual(self.imageType, kUTTypeJPEG2000)) {
186 | //JPEG2000
187 | outData = [bitmapRep representationUsingType:NSJPEG2000FileType properties:@{NSImageCompressionFactor:@(compression)}];
188 | }
189 | else if (UTTypeEqual(self.imageType, kUTTypePNG)) {
190 | //PNG
191 | outData = [bitmapRep representationUsingType:NSPNGFileType properties:nil];
192 | }
193 | else if (UTTypeEqual(self.imageType, kUTTypeTIFF)) {
194 | //TIFF
195 | outData = [bitmapRep representationUsingType:NSTIFFFileType properties:nil];
196 | }
197 |
198 | if (outData)
199 | [outData writeToURL:savePanel.URL atomically:YES];
200 | }
201 |
202 | @end
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # JFImageSavePanel
2 |
3 | [](http://cocoadocs.org/docsets/JFImageSavePanel)
4 | [](http://cocoadocs.org/docsets/JFImageSavePanel)
5 | [](http://cocoadocs.org/docsets/JFImageSavePanel)
6 |
7 | NSSavePanel wrapper for image save dialogs, similar to those in Preview.app.
8 |
9 | ## A quick note about `IKSaveOptions`
10 |
11 | Apple provides [`IKSaveOptions`](https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/IKSaveOptions/index.html#//apple_ref/doc/uid/TP40004705-CH3-DontLinkElementID_8), a class that offers similar functionality which I wasn't aware of when I first wrote this library. It might be worth checking this out first to see if it meets your needs; thanks to Marek Hrušovský for heads-up.
12 |
13 | ## Example
14 |
15 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
16 |
17 | ## Installation
18 |
19 | JFImageSavePanel is available through [CocoaPods](http://cocoapods.org). To install
20 | it, simply add the following line to your Podfile:
21 |
22 | pod "JFImageSavePanel"
23 |
24 | ## Screenshot
25 |
26 | 
27 |
28 | ## Usage Example
29 |
30 | JFImageSavePanel *panel = [JFImageSavePanel savePanel];
31 |
32 | NSImage *image = [[NSImage alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://..."]];
33 |
34 | // This is the default image type, which can be changed.
35 | // Possible values: kUTTypeJPEG, kUTTypeJPEG2000, kUTTypePNG, kUTTypeTIFF.
36 | [panel setImageType:kUTTypeJPEG];
37 |
38 | // Image will be saved to selected path if 'OK' button is pressed
39 | [panel runModalForImage:image error:NULL];
40 |
41 | ## Contributors
42 |
43 | * [Seb Jachec](http://github.com/sebj)
44 | * [Jason Frame](http://github.com/jaz303)
45 |
46 | ## Copyright and License
47 |
48 | © 2012 Jason Frame [ [jason@onehackoranother.com](mailto:jason@onehackoranother.com) / [@jaz303](http://twitter.com/jaz303) ]
49 | MIT Licensed
50 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaz303/JFImageSavePanel/34b057bfb09f1ac22cb5b9fa45c5ea674023df0d/screenshot.png
--------------------------------------------------------------------------------