GithubHelp home page GithubHelp logo

0xnshuman / timelinecards Goto Github PK

View Code? Open in Web Editor NEW
430.0 430.0 52.0 5.98 MB

Presenting timelines as cards, single or bundled in scrollable feed!

License: MIT License

Swift 77.60% Objective-C 21.22% Ruby 1.18%
card cards feed milestones timeline

timelinecards's People

Contributors

0xnshuman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timelinecards's Issues

Issue with Layout Constraints

Hi,

i have an issue with the following code in TimelineFeed:

	private func addCard(_ card: TimelineCard) {
		self.card = card
        
		card.reload()
		
		card.frame = CGRect(origin: CGPoint(x: 0.0, y: (headerView?.frame.origin.y ?? 0.0) + (headerView?.frame.height ?? 0.0)), size: card.bounds.size)
		
		self.insertSubview(card, at: subviews.count)
        
		let constraints: [NSLayoutConstraint] = [
			NSLayoutConstraint(item: headerView ?? self, attribute: headerView != nil ? .bottom : .top, relatedBy: .equal, toItem: card, attribute: .top, multiplier: 1, constant: 1),
			NSLayoutConstraint(item: self, attribute: .leading, relatedBy: .equal, toItem: card, attribute: .leading, multiplier: 1, constant: 1),
			NSLayoutConstraint(item: self, attribute: .trailing, relatedBy: .equal, toItem: card, attribute: .trailing, multiplier: 1, constant: 1),
			NSLayoutConstraint(item: self, attribute: .bottom, relatedBy: .equal, toItem: card, attribute: .bottom, multiplier: 1, constant: bottomPadding),
			NSLayoutConstraint(item: card, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: card.bounds.size.height)
		]

		constraints.forEach { $0.isActive = true }
	}

It generates the following error messages:

2021-01-06 18:07:02.636373+0100 EinfachLeichterLeben[20536:946407] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x60000250d630 _TtC20EinfachLeichterLebenP33_CD7A8457D9CF40B1C3DACE082F374E5216TimelineFeedCell:0x7fa758d40cc0'TimelineFeedCell'.top == EinfachLeichterLeben.TimelineCard:0x7fa758d414a0.top + 1 (active)>",
"<NSLayoutConstraint:0x60000250d270 V:[EinfachLeichterLeben.TimelineCard:0x7fa758d414a0]-(20)-| (active, names: '|':_TtC20EinfachLeichterLebenP33_CD7A8457D9CF40B1C3DACE082F374E5216TimelineFeedCell:0x7fa758d40cc0'TimelineFeedCell' )>",
"<NSLayoutConstraint:0x60000250f160 EinfachLeichterLeben.TimelineCard:0x7fa758d414a0.height == 192 (active)>",
"<NSLayoutConstraint:0x600002574870 'UIView-Encapsulated-Layout-Height' _TtC20EinfachLeichterLebenP33_CD7A8457D9CF40B1C3DACE082F374E5216TimelineFeedCell:0x7fa758d40cc0'TimelineFeedCell'.height == 211.333 (active)>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x60000250f160 EinfachLeichterLeben.TimelineCard:0x7fa758d414a0.height == 192 (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

Latest Xcode, iOS 13 Target

Do you have any ideas, what i could do? It think it also breaks the delegate methods for the header and the card elements.

Thanks! Kay.

EXC_BAD_ACCESS during cleanUp() only with Group Items

Hi,

Everything works until I add sub-items to a group, at which point the above error occurs. If I add a Group item without any items, the Group heading displays.

It's all good, except for the oddity with Group Items.

Any ideas?

TIA.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.