cocoanetics / dtfoundation Goto Github PK
View Code? Open in Web Editor NEWStandard toolset classes and categories
License: BSD 2-Clause "Simplified" License
Standard toolset classes and categories
License: BSD 2-Clause "Simplified" License
Currently the unit tests for DTZipArchive are outdated. I tried changing the alloc/init to the new class cluster initializer, but I get errors in testPKZip.
It would be really be nice if you could add subspecs to only use DTActionSheet or DTAlertView without other in my case unnecessary categories and classes.
spec.subspec 'DTActionSheet' do |ss|
ss.platform = :ios, '4.3'
ss.ios.source_files = 'Core/Source/DTWeakSupport.h','Core/Source/iOS/DTActionSheet.{h,m}'
end
spec.subspec 'DTAlertView' do |ss|
ss.platform = :ios, '4.3'
ss.ios.source_files = 'Core/Source/DTWeakSupport.h','Core/Source/iOS/DTAlertView.{h,m}'
end
I am dragging xcodeproj to my project. But wherever I import DTCoreFoundation it gives error.
Several targets in DTFoundation have turned to architectures $(ARCHS_STANDARD_64_BIT)
Fix that and replace those with $(ARCHS_STANDARD_INCLUDING_64_BIT)
Apparently the zlib dependency is missing from the pod spec which causes projects including the DTZipArchive sub spec to be missing the import.
With the current way how DTReachability is wtching the connection there is a scenario where DNS resolution might not be possible yet, even though the INET is already reachable.
Switch to using SCNetworkReachabilityCreateWithName
@renep improved DTSidePanel
Could you add the code below to DTCustomColoredAccessory along with a new DTCustomColoredAccessoryType called DTCustomColoredAccessoryTypeLeft
This creates an arrow that points left
case DTCustomColoredAccessoryTypeLeft:
{
// (x,y) is the tip of the arrow
CGFloat x = CGRectGetMaxX(self.bounds)-10.0;;
CGFloat y = CGRectGetMidY(self.bounds);
CGContextMoveToPoint(ctxt, x+R, y+R);
CGContextAddLineToPoint(ctxt, x, y);
CGContextAddLineToPoint(ctxt, x+R, y-R);
break;
}
When alertView is created the following way:
DTAlertView *alertView = [[DTAlertView alloc] initWithTitle:@"title" message:@"message"];
[alertView addButtonWithTitle:@"OK" block:^{
// block does not get called anymore -> delegate is not beeing set correctly
}];
When a Tab is decoded from versus \t then there is no way to know which it came from an entity or a \t.
Two methods where deprecated in iOS 7 and OS X 10.10:
aslresponse_next
replaced by asl_next
asl_free
replaced by asl_release
use cocoa pod , development can use it's easy.
To get a better code coverage (Coveralls)
From the Demo logs when allowClosing = YES
2013-06-18 21:30:00.447 DTSidePanels Demo[81753:c07] <LoggingNavigationController: 0xab9dd40> Right -[LoggingNavigationController willMoveToParentViewController:] (null)
2013-06-18 21:30:00.447 DTSidePanels Demo[81753:c07] <LoggingNavigationController: 0xab9dd40> Right -[LoggingNavigationController didMoveToParentViewController:] (null)
2013-06-18 21:30:00.447 DTSidePanels Demo[81753:c07] <LoggingNavigationController: 0xab9dd40> Right -[LoggingNavigationController willMoveToParentViewController:] <DTSidePanelController: 0xabad3f0>
2013-06-18 21:30:00.448 DTSidePanels Demo[81753:c07] <ModalPanelViewController: 0xab9d9e0> -[ModalPanelViewController viewWillAppear:] animated:1
2013-06-18 21:30:00.448 DTSidePanels Demo[81753:c07] <LoggingNavigationController: 0xab9dd40> Right -[LoggingNavigationController viewWillAppear:] animated:1
2013-06-18 21:30:00.700 DTSidePanels Demo[81753:c07] <ModalPanelViewController: 0xab9d9e0> -[ModalPanelViewController viewDidAppear:] animated:1
2013-06-18 21:30:00.701 DTSidePanels Demo[81753:c07] <LoggingNavigationController: 0xab9dd40> Right -[LoggingNavigationController viewDidAppear:] animated:1
2013-06-18 21:30:00.701 DTSidePanels Demo[81753:c07] <LoggingNavigationController: 0xab9dd40> Right -[LoggingNavigationController didMoveToParentViewController:] <DTSidePanelController: 0xabad3f0>
The completion blocks for the buttons are not executed on iOS8
I followed the instructions on the documentation but I didn't manage to do it. I compiled the uncompressed xcode project so I can have as product the DTFoundation framework.
Then I added it to the project to which I want to add it, so I add it on the settings of the target "Linked frameworks and libraries", add the header to the pch file. Then add the flag to the linker flags. but my project won't compile, this is the error:
/Build/Products/Release-iphoneos/DTFoundation.framework/Headers/DTFoundation.h:16:9: fatal error: 'DTFoundationConstants.h' file not found
I thought it was because I was building the framework on debug so I tried release to no avail...
Please any comments will be greatly appreciated!!
update1: I managed to just import the classes that I was using but I'd like to still learn how to link the entire Framework since it looks very handy. Thanks a lot for sharing the framework in any case.
Fix the deprecated sizeWithFont:
usage in DTActivityTitleView
When programmatically changing the center panel e.g. from a left-hand menu then no appearance notifications are sent.
use cocoa pod , development can use it easy.
If there is no start and no end handler in the delegate then characters will also not get accumulated.
Hi Coco,
the CFPropertyListCreateFromXMLData Function is deprecated soon and should be replaced with the CFPropertyListCreateWithData Function.
Source: @CFPropertyList.h ( Line:35-38 )
Best Regards
The following code is causing errors in the static analyzer:
I am using the following Podspec:
pod 'DTFoundation', '1.7.3'
Bot Issue: analyzerWarning. Dead store.
Issue: Value stored to 'height' is never read.
File: DTProgressHUD.m.
Integration Number: 54.
Integration URL: https://build6.local/xcode/bots/C613BCA/integrations
Description: Value stored to 'height' is never read.
Committers: Introduced 50 integrations ago.
Bot Issue: analyzerWarning. Logic error.
Issue: Passed-by-value struct argument contains uninitialized data (e.g., field: 'x').
File: DTSidePanelController.m.
Integration Number: 54.
Integration URL: https://build6.local/xcode/bots/C613BCA/integrations
Description: Passed-by-value struct argument contains uninitialized data (e.g., field: 'x').
Committers: Introduced 50 integrations ago.
Bot Issue: analyzerWarning. Coding conventions (Apple).
Issue: Potential null dereference. According to coding standards in 'Creating and Returning NSError Objects' the parameter may be null.
File: DTZipArchiveGZip.m.
Integration Number: 54.
Integration URL: https://build6.local/xcode/bots/C613BCA/integrations
Description: Potential null dereference. According to coding standards in 'Creating and Returning NSError Objects' the parameter may be null.
Committers: Introduced 50 integrations ago.
Running under iOS 7 there can be a warning about missing rootViewController if the progress HUD is spawned too early. This warning does not happen on iOS 8 or if doing the initial show with dispatch_async on main thread to force it onto the next run loop.
Still, I'd like to move some code from DTProgressHUD
in DTProgressHUDWindow
to clean it up a bit.
Line 89 in DTExtendedFileAttributes.m reads:
getxattr(filePath, attrName, buffer, 255, 0, 0);
it should be:
getxattr(filePath, attrName, buffer, bufferLength, 0, 0);
The code above that line finds the correct buffer length and allocates the buffer, but then the hardcoded value of 255 is used in the actual call to getxattr.
Extra dot (.) is added towards the end of the string when calling pathByIncrementingSequenceNumber on a string with no pathExtension.
I have noticed something odd with DTHTMLParser:
If you set your delegate and then change it (as you often do with SAX), the callback functions will change correctly but DTHTMLParser will only call selectors your original delegate responded to.
For example, lets say my original delegate only responds to:
parser:didStartElement:attributes:
And the delegate I change my parser to responds to:
parser:didStartElement:attributes:
parser:didEndElement:
DTHTMLParser will never call parser:didEndElement: on the new delegate because the original delegate did not respond to it.
I have looked through the source but I can't figure out why this would be. Any ideas?
Check this out:
$ pod --version
0.16.4
$ cat Podfile | grep DTF
pod 'DTFoundation', '~> 1.1'
$ pod install | grep DTF
Using DTFoundation (1.1.0)
$ ls Pods/DTFoundation/Core/Source/ | grep DTAsyncFileDeleter
<nothing>
Sorry for creating an issue about this. Any summarized up 1.7.4 changelog? Thanks for your great work!
There should be more Unit Tests and also Coveralls support.
in DTTextAttachment.m
renamed
to
line 220
sizeThatFitsKeepingAspectRatio -> DTCGSizeThatFillsKeepingAspectRatio
pull req: Cocoanetics/DTCoreText#677
It looks like the latest beta broke something when subclassing UIActionSheet.
The delegate methods are no longer called and therefore the action blocks are never executed.
I know the documentation says that UIActionSheet is not designed to be subclassed so maybe now they are enforcing it at framework level?
Implement header that defines DT_WEAK_VARIABLE and DT_WEAK_PROPERTY which automatically use zeroing weak references if the deployment target allows it.
Update DTFoundation classes that use weak refs to use it.
I can't build the sample app because xCode is complaining that "DTUtils.h File Not found" in the files DTCoreText.h.
How can I solve this?
Thanks!
Ben
Because there is no deployment target for OS X in the pod spec for DTHTMLParser cannot be used with Cocoapods.
DTSidePanelController is not a member of any of the targets except the demo.
The reason was that I wrote it using weak references, but the deployment target 4.3 does not allow that.
Issue #29 needed for that.
We need the spec file for DTFoundation so that it can be a dependency of DTCoreText. Also the elements that have their own static lib targets should be their own sub specs.
The error line for the case where the developer doesn't use ARC is causing problems. I never thought that somebody would actually see this, but there is the scenario where somebody is using an ARC-enabled library from a MRC app. Then he would still add the header.
In this case the header would be of no consequence for the generation of IVARs or property methods since those had already been set up correctly by the compiler for the static lib. In this case a weak property is supposed to be simply assign. And a weak IVAR would appear without additional qualifier.
Static Library fails to build under Xcode 4.2 (Build 4C199) with numerous Semantic Issues, probaly to many to list here. I'm using latest commit from March 15.
Previously DTFoundation from 5/12/2012 compiled successfully under my setup. I can't upgrade OSX and Xcode just yet.
Cleanup ProgressHUD and publish it in DTFoundation.
Wrong question.
The DTZipArchive subclass for PKZip currently calls unzOpen way to often. This should only be done once lazily and the file if open, should be closed in -dealloc.
I'm having an issue with the stringByURLEncoding category class. Whenever I try to use it I just get a unrecognized selector error. It fails on any string that I use.
For example
NSString *test = @"Test";
NSString *value = [test stringByURLEncoding];
Throws this error:
2014-01-06 14:14:56.437 Echo[38693:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[**NSCFConstantString stringByURLEncoding]: unrecognized selector sent to instance 0x6511d8'
* First throw call stack:
(
0 CoreFoundation 0x04df85e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x03f668b6 objc_exception_throw + 44
2 CoreFoundation 0x04e95903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x04de890b __forwarding + 1019
4 CoreFoundation 0x04de84ee _CF_forwarding_prep_0 + 14
5 Echo 0x000973ed -[MainViewController viewDidLoad] + 397
6 UIKit 0x029b49a8 -[UIViewController loadViewIfRequired] + 696
7 UIKit 0x029da1a5 -[UINavigationController _layoutViewController:] + 39
8 UIKit 0x029da6bb -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235
9 UIKit 0x029da7b3 -[UINavigationController _startTransition:fromViewController:toViewController:] + 78
10 UIKit 0x029db72c -[UINavigationController _startDeferredTransitionIfNeeded:] + 645
11 UIKit 0x029dc349 -[UINavigationController __viewWillLayoutSubviews] + 57
12 UIKit 0x02b1539d -[UILayoutContainerView layoutSubviews] + 213
13 UIKit 0x0290bdd7 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
14 libobjc.A.dylib 0x03f7881f -[NSObject performSelector:withObject:] + 70
15 QuartzCore 0x0277b72a -[CALayer layoutSublayers] + 148
16 QuartzCore 0x0276f514 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
17 QuartzCore 0x0276f380 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
18 QuartzCore 0x026d7156 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294
19 QuartzCore 0x026d84e1 _ZN2CA11Transaction6commitEv + 393
20 QuartzCore 0x02794870 +[CATransaction flush] + 52
21 UIKit 0x028bd979 _afterCACommitHandler + 131
22 CoreFoundation 0x04dc053e CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 30
23 CoreFoundation 0x04dc048f __CFRunLoopDoObservers + 399
24 CoreFoundation 0x04d9e3b4 __CFRunLoopRun + 1076
25 CoreFoundation 0x04d9db33 CFRunLoopRunSpecific + 467
26 CoreFoundation 0x04d9d94b CFRunLoopRunInMode + 123
27 GraphicsServices 0x04bca9d7 GSEventRunModal + 192
28 GraphicsServices 0x04bca7fe GSEventRun + 104
29 UIKit 0x028a194b UIApplicationMain + 1225
30 Echo 0x0007477d main + 141
31 libdyld.dylib 0x0447d70d start + 1
32 ??? 0x00000001 0x0 + 1
Hello, I'm work on static ios framework. I got some issues about it. I configured my project as you did, and it worked. I generated a static framework. The file struct like this:
# |`-- Resources
It works very well on my pc, but it is going wrong on another compute. It cannot recognize the symbolic link file. I searched in google but not result. What is problem about this computer?
Then I delete the symbolic link files and replace them with the real files, the file struct like this:
It can recognize the framework well. But the xcode cannot build succeeded, because of the "Info.plist". What is this file used for? Why I need it?
Did you know the key? It confused me so much.
Getting this error:
DTFoundation/Core/Source/DTLog.m:103:20: error: implicit declaration of function 'asl_next' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
while ((message = asl_next(response)))
^
With the latest DTFoundation
It looks like the cocoapods sub spec for the HTML parser is 'DTHMLParser' rather than 'DTHTMLParser'. The 'T' is missing from HTML.
When i use start/stop the folder monitor more then once the app will crash because the file descriptor is closed when stopMonitoring is called. So when calling startMonitoring and stopMonitoring again the filedescriptor is invalid which will lead to a crash inside the cancel handler.
Please check and update master.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.