It was reckless of him to try to swim in ice-cold water.

Literal

Ice [like-のように] cold water [possessive-の] inside [in-で] swimming [try-ようとする] [nominalizer-なんて] he [also-も] reckless thing [object-を] did [copula-ものだ].

氷のように冷たい水 uses のように for the simile 'water cold like ice.' 泳ごうとする uses the volitional + とする ('try to'). 無茶なことをしたものだ expresses retroactive judgment — ものだ conveys 'what a thing to do!'