- Changed default MGLine label shadow colour to
clearColor
- Added
innerSize
MGBox property, and deprecatedinnerWidth
andinnerHeight
(useinnerSize.width
/innerSize.height
instead) - Improved MGLine label vertical centring
- Added
onHighlightChanged
MGBox block property, for performing actions on touch up, down, and cancel - Added
allowSimultaneousTaps
MGBox property - Removed various previously deprecated classes and properties
- Various misc bug fixes
- Fixed box provider reuse bug when data changes near content bounds.
- Moved
MGMushParser
to a separate CocoaPod.
- Deprecated
MGTableBox
,MGTableBoxStyled
andMGLineStyled
. - Removed previously deprecated properties and methods.
- Big documentation reshuffle.
- Added text background colour markup to Mush /
MGMushParser
. Set text background colour with {bg#123456|the text}. - Added inline docs to
MGBoxProvider
.
- Fixed bufferedViewport for scrollers not at origin 0,0
- Minor import change to use single MGEvents import
-
Separated
MGEvents
into a separate CocoaPod and added it as a dependency -
MGBoxProvider
box reuse now includes a "type", allowing for multiple classes of boxes in a single container. -
new box block properties
onWillMoveToIndex
,onMovedToIndex
triggered during when box index positions change. -
Optimised box reuse code for smoother scrolling.
-
MGMushParser
cachesCTFont
instances for better performance.
- The
MGBoxProvider
API changed, to accommodate box reuse "types". YourboxProvider
code will need adjusting to accommodate.
-
MGScrollView
offset correction on rotate accounts forcontentInsets
-
Fixed box/scroller post layout resizing to use
bottomPadding
andrightPadding
-
Boxes laid out via
MGBoxProvider
now properly respect theirzIndex
values.
-
When using a
boxProvider
, your data's state is tracked internally, thus eliminating the need to inform the provider of data changes. To use auto change tracking, you need to set aboxProvider.boxKeyMaker
block property that returns a unique key for each data item. Calllayout
orlayoutWithDuriation:completion:
and the provider will automatically perform the appropriate appear/move/disappear animations based on data changes. -
You can now provide custom animations for appear/move/disappear when using a
boxProvider
. See #116 for details. -
New
MGScrollView methods
saveScrollOffsetand
restoreScrollOffset` for ensuring that tables/grids fall in the same visible offset after rotation.
See #124 for example code.
-
layoutWithSpeed:completion:
has been deprecated in favour oflayoutWithDuration:completion:
. I've been wanting to do that since forever. -
boxProvider.boxSizeMaker
should now return sizes without margins. Margins are now provided separately byboxProvider.boxMarginMaker
.
MGBoxProvider
andMGLayoutManager
fixes for keeping internal box reuse data clean
MGBoxProvider
bug fix for updating visible indexes during fast scrolling
- Added
appeared
anddisappeared
methods andonAppear
andonDisappear
block properties which fire when a box is automatically added or removed during box reuse / offscreen culling.
- Added
[self when:object does:Something do:Thing]
custom event observing. See #118 for details.
- the
screenshot:
method changed signature toscreenshotWithShadow:scale:
MGBoxProvider
box reuse and offscreen culling, allowing for much larger tables/gridsMGLine
can auto resize the width ofUITextField
items to fit- new setters for
top
,right
,bottom
,topLeft
etc - arm64 fixes
- There shouldn't be any backwards compatibility breaks. Please let me know if you find any!
- Note that the project, repo, and folders have been renamed to MGBoxKit
- Optional non-recursive layout:
dontLayoutChildren
- Optional
minWidth
property - Text colour Mush markup: "this string has {#123456|coloured text}"
- New block properties for
onTouchesBegan
,onTouchesEnded
,
onTouchesCancelled
- New UIView convenience CGFloat getters for
top
,right
,bottom
,left
- New line spacing properties for MGLine content:
leftLineSpacing
,middleLineSpacing
,rightLineSpacing
MGBox
now requires theCoreText
framework. Add this to your project.- Also add these new files to your project:
MGLineStyled.m/h
MGMushParser.m/h
Categories/NSAttributedString+MGTrim.m/h
Categories/UIColor+MGExpanded.m/h
MGLine
now has a defaultunderlineType
of none. For tables usingMGTableBoxStyled
, replaceMGLine
withMGLineStyled
, or set yourMGLine
instances to have aborderStyle
ofMGBorderEtchedTop | MGBorderEdgedBottom
.
- Mush Lightweight Markup
- Markup similar to Markdown/Textile, providing bold, italic, underline, and monospace.
- MGLine Now Accepts NSAttributedStrings
- MGBox Borders
- Set individual border colours with
topBorderColor
,rightBorderColor
,bottomBorderColor
,leftBorderColor
. - Set all border colours in one go with
borderColors
. - Optionally modify borders directly with
topBorder
,rightBorder
,bottomBorder
,leftBorder
.
- Set individual border colours with
- MGBox Etched Border Style
borderStyle
property replaces the deprecatedunderlineType
, and is available in allMGBox
subclasses. Allows an etched border style optionally for top/right/bottom/left.
- New MGLine Text Style Properties
- Properties for left/middle/right text colours, shadow colours, shadow offsets, alignments.
See the documentation for usage examples of the new APIs.
-[MGLine underlineType]
, replaced by-[MGBox borderStyle]