How to divide item stack in MC PE?

To divide a stack press and hold on it until a green bar starts filling right above the item. The amount the green bar fills is the amount that is being selected. If half the bar is filled then half the stack is selected. Release the hold when the green bar fills to your desired amount. Tap an empty space in your inventory to move the selected items to the new slot.