Do you mean it stops selling its products in China? Or stop assembling iPhones in China? Or both?
According to this page (https://www.macworld.co.uk/feature/apple/where-are-apple-pro...), 'the assembly of Apple's devices is for the most part done in China'.
If Apple leaves China suddenly, I don't think it can build that large an assembly line quickly to satisfy the global demand of iPhones.
And according this document (https://www.apple.com/newsroom/pdfs/fy17-q4/Q4FY17DataSummar...), half of Apple's Q4 2017 revenue come from iPhone. So, if the supply of iPhones is greatly reduced, the cash Apple sits on will quickly run out. Then Apple will be in great trouble.